Posted: Tue Oct 12, 2004 5:01 am Post subject: MVS Console problem
Dear all,
I am using two consoles for the mainframe, one is Primary and other one is secondary.There is problem with secondary console,the device is online but when tried to vary that device as a console am getting the following error.there is no hardware connection problem also.
But all the console parameters are coreect, I have cross checked in the member consol** in sys1.parmlib.But stil it is refusing to come as a console. _________________ Cheers
kolusu,
Greetings.
Long time MVS'r, new to forum. I am trying to put together REXX code to do system monitoring and need to be able to find status of tape drives. I can issue the OPER command, then issue the d u,,, (or any other valid command) but cannot capture or outtrap the results. Can't find if it is writing this to a DDNAME, ran it in batch and it always goes to JES3.
Environment is ISPF v5, z/OS 1.6, running on a 2086.
kolusu, REXX code still in development. Unusable unless I can get a way to trap the output from a console command.
When a mount happens, you get the typical M 480,VOL=... whatever message highlighted on the console.
I can easily trap that one by a console monitoring program I have in place.
But it is not so easy to determine when the mount has been satisfied. All that happens is the highlighted message becomes unhighlighted and scrolls off.
What I want to do is have a function that issues something like D U,,,480,1 every ten minutes or so. If the response comes back and has MTP (mount pending) then I send an alert. If not, I cancel any outstanding alerts for that drive. (because I can't detect that the mount pending message has scrolled off)
This is all part of an automated operations/lights out type of endeavor. Computer room is getting sealed off except for absolute necessary access.
But I am also curious about something else. Does the system do a second WTO to the console to turn the non-scrollable message to scrollable? If so, I can probably capture that.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Thu Feb 08, 2007 1:13 am Post subject:
There are products that do what you want, and there are interfaces for console interaction that these products use (probably authorized code?). Writing your own operations automation system is non-trivial. It has taken companies many years to get them right... but having said that...
I don't think OPER output can be captured. Maybe you can use SDSF. I hadn't tried before your query, but I played with it a little and it seems that to capture output, you need to run it im batch. Here is a quick hack that is definitely not industrial strength! but may be a starting point in your explorations. This will send stuff to the console so better routing might be in order.
<Silly hack alert>
Code:
//USER1 JOB (OHSURE),'IEHMOVE',CLASS=A,MSGCLASS=Z,NOTIFY=&SYSUID.,
// MSGLEVEL=(0,0)
//*-------------------------------------------------------------------*
//* Create Startup CLIST *
//*-------------------------------------------------------------------*
//GENER0 EXEC PGM=IEBGENER
//SYSUT1 DD *
/* REXX - monitor outstanding replies every 5 seconds (poorly) */
command = 'D R,A,CN=(ALL)'
Call syscalls 'ON'
'ALLOC F(ISFIN) REU SHR LREC(80) RECF(F B) UNIT(VIO) NEW DEL'
'ALLOC F(ISFOUT) REU SHR LREC(80) RECF(F B) UNIT(VIO) NEW DEL'
Queue '/'command
Queue 'LOG'
Queue 'F "'command'" last'
Queue 'END'
'EXECIO 'queued()' DISKW ISFIN (FINIS'
Do 2
Say center(' 'date() time()' ',60,'=')
'ISFAFD'
'EXECIO * DISKR ISFOUT (FINIS STEM RESP.'
target = "CHARS '"command
started = 0
Do a= 1 for resp.0
If pos(target,resp.a) >0 Then
started = 1
If started Then
Do /* add your own scan logic here */
p= translate(substr(resp.a,80,3),'*9999999999','*0123456789')
If p='*99' Then
Do
id = substr(resp.a,44,8)
Do a=a to resp.0 While substr(resp.a,44,8) = id
Say substr(resp.a,80)
End
End
End
End
Address syscall 'sleep 5'
End
//SYSUT2 DD DISP=(,PASS),DSN=&&CLIST0(TEMPNAME),
// SPACE=(TRK,(1,1,2),RLSE),UNIT=VIO,DCB=(LRECL=80,RECFM=FB)
//SYSPRINT DD DUMMY
//SYSIN DD DUMMY
//*-------------------------------------------------------------------*
//BATCHTSO EXEC PGM=IKJEFT01,DYNAMNBR=128
//SYSPROC DD DSN=&&CLIST0,DISP=(OLD,DELETE)
//SYSTSPRT DD SYSOUT=H
//SYSTSIN DD *
%TEMPNAME
/*
//*-------------------------------------------------------------------*
gives
Code:
READY
%TEMPNAME
=================== 8 Feb 2007 01:01:07 ====================
*04 IEF238D USER1I - REPLY DEVICE NAME OR
'CANCEL'.
IEF878I END OF IEF877E FOR USER1I WHAZITS SYSIN
IEF877E USER1I NEEDS 1 UNIT(S)
FOR WHAZITS SYSIN
FOR VOLUME SNERT1
OFFLINE, NOT ACCESSIBLE
0500 0590
:
CSQ3111I %CSQ1 CSQ3UR00 - EARLY PROCESSING
PROGRAM IS V5.3.1 LEVEL 002-006
=================== 8 Feb 2007 01:01:13 ====================
*04 IEF238D USER1I - REPLY DEVICE NAME OR
'CANCEL'.
IEF878I END OF IEF877E FOR USER1I WHAZITS SYSIN
IEF877E USER1I NEEDS 1 UNIT(S)
FOR WHAZITS SYSIN
FOR VOLUME SNERT1
OFFLINE, NOT ACCESSIBLE
0500 0590
:
CSQ3111I %CSQ1 CSQ3UR00 - EARLY PROCESSING
PROGRAM IS V5.3.1 LEVEL 002-006
READY
END
Or you could approach this from another angle by writing a screen scraping application. Not too hard with Rexx and PCOMM or probably many emulator macro packages. HLLAPI will even give you the attribute bytes so you could just check that.
semigeezer,
Thanks.
Not sure it will fit into the model I am trying to develop. Rexx has the unfortunate(depending on your view) problem of losing all variables between invocations.
Has anyone seen Rexx code that can look up a UCB? I am sure there is a mount pending bit set in there somewhere.
I (and others) have always considered the failure to trap TPUT output to be a miserable hole in Rexx, something that had so much promise then turns into a kluge because you have to work around the limitation.
This is not a total Automated Ops package, rather a way to do alerts over events (like tape mounts, or CICS crashing, or whatever)
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
Posted: Thu Feb 08, 2007 8:49 am Post subject:
You can set MIH (missing interrupt handling) to issue MOUNT PENDING messages every xx minutes, if a mount is still outstanding. Set a proper interval for those devices in IECIOSxx and just look for the MOUNT PENDING msgs. _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis, Most of the MVS type folks I know have sold out and gone distributed... I hung in there and do contracting/consulting.
Prefer stuff thats project oriented (just got done upgrading from CICS4.1 to CICS/TS 3.1)
Still alot of big iron out there. More on the way. Watch for Linux partitions on the mainframe to start replacing instances of Windows servers. Happening as we speak.
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Fri Feb 09, 2007 2:13 am Post subject:
re the storing vars between invocations, if you can run your exec in ISPF, you can use its services to store your variables by always using the same profile data set. Or you can use EXECIO to write a file that stores what you need. One trick that is pretty cool for that is to just write a file of name/value pairs (eg xyz=5) and on input, use parse var inputline var '=' val ; call Value var, val
Syntax there might be a bit off, let me know if you need the exact syntaxes, but anyway, using that makes reading in variable values easy. You can even store a variable that contains names of other variables so that you can do all of the input and output in just a few lines of code.
And... I couldn't help myself... As much as I hate programs that submit batch jobs and wait, this does at least get output from the CONSOLE command. Requires CONSOLE authority, and be aware that your JES messages may be formatted differently than mine,and you need to change the job msgclass to your hold class. Also, this won't work if you are in SDSF interactively while the job runs.
Code:
/* Rexx - trap commands from jesmsglg section of job using console */
"PROFILE NOMSGID PROMPT"
Call syscalls 'ON'
Queue "//USER1M JOB 'USER1',CLASS=A,MSGCLASS=H,MSGLEVEL=(0,0)"
Queue "//BATCHTSO EXEC PGM=IKJEFT01"
Queue "//SYSTSPRT DD DUMMY"
Queue "//SYSTSIN DD *"
Queue " CONSOLE ACTIVATE"
Queue " CONSOLE SYSCMD(D R,L)"
Queue " CONSOLE SYSCMD(D U,TAPE)"
Queue " CONSOLE SYSCMD(D IPLINFO)"
Queue " CONSOLE DEACTIVATE"
Queue "/*"
Queue ""
Call outtrap "J."
"SUBMIT *"
Call outtrap "OFF"
Parse Var j.2 . jobname sub
If sub <> "SUBMITTED" Then Do; Say "Submit error"; Exit; End
Do Until pos("NOT FOUND",j.1) > 0| pos("OUTPUT",j.1) > 0
Address syscall "sleep 1"
Call outtrap "J."
"STATUS "jobname
Call outtrap "OFF"
End
"OUTPUT "jobname" PRINT('USER1.COMMAND.OUT')"
"ALLOC F(A) REUSE DA('USER1.COMMAND.OUT') OLD DEL"
"EXECIO * DISKR A (FINIS STEM X."
started = 0
Do a = 1 to x.0
If word(x.a,3) = "IEA630I" Then started = 1
If word(x.a,3) = "IEA631I" Then started = 0
If started Then Say strip(delstr(x.a,1,18),"T")
End
"FREE F(A)"
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Mon Feb 12, 2007 4:25 pm Post subject:
I don't know whether this will help or not but I have some code that uses the free MXI package (now stabilized but I think available from Rocket Software) to build an ISPF panel display of all of our online tape drives on all lpars.
Basically doing a remote console command to sysa and storing the results in the sysa stem and then sysb and so on then using that to display a panel. Our tape drives start with UCB 0400.
It helps our operations staff know what is online and where.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum