sdsf in rexx
Using sdsf in rexx with command $DO JOBQ,READY,DEST COMMAND = '$DO JOBQ,READY,DEST' IF ISFCALLS('ON') <> 0 THEN EXIT 99 ADDRESS SDSF "ISFEXEC '/"COMMAND"' (WAIT" DO S1 = 1 TO ISFULOG.0 SAY ISFULOG.S1 END Its supposed to return the $HASP686 messages in ISFULOG array, which are same as when issued at console Sometimes it does and other times it doesn't return anything even when there are jobs available It just returns these 2 and not the ones with $HASP686 "CPAC 2017030 10:45:11.13 ISF031I CONSOLE DPP ACTIVATED" "CPAC 2017030 10:45:11.13-$DO JOBQ,READY,DEST" $DO JOBQ,READY,DEST $HASP686 OUTPUT(FSP96A12) ROUTECDE=LLW001 $HASP686 OUTPUT(FSP96A12) ROUTECDE=LW001 $HASP686 OUTPUT(CAP81T43) ROUTECDE=LOCAL $HASP686 OUTPUT(CAP81T44) ROUTECDE=LOCAL $HASP686 OUTPUT(XTBPRT)ROUTECDE=LX509 Tim Brown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
If (l_cnt = 0) Then Do l_cnt = l_cnt + 1 l.l_cnt = ' /* no data produced */' End l.0 = l_cnt Address MVS "ExecIO "l_cnt" DiskW "ddnm" (Finis Stem l.)" l_cnt = 0 Return _ Dave Jousma Manager Mainframe Engineering, Assistant Vice President david.jou...@53.com 1830 East Paris, Grand Rapids, MI 49546 MD RSCB2H p 616.653.8429 f 616.653.2717 -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Monday, January 30, 2017 10:58 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: sdsf in rexx Using sdsf in rexx with command $DO JOBQ,READY,DEST COMMAND = '$DO JOBQ,READY,DEST' IF ISFCALLS('ON') <> 0 THEN EXIT 99 ADDRESS SDSF "ISFEXEC '/"COMMAND"' (WAIT" DO S1 = 1 TO ISFULOG.0 SAY ISFULOG.S1 END Its supposed to return the $HASP686 messages in ISFULOG array, which are same as when issued at console Sometimes it does and other times it doesn't return anything even when there are jobs available It just returns these 2 and not the ones with $HASP686 "CPAC 2017030 10:45:11.13 ISF031I CONSOLE DPP ACTIVATED" "CPAC 2017030 10:45:11.13-$DO JOBQ,READY,DEST" $DO JOBQ,READY,DEST $HASP686 OUTPUT(FSP96A12) ROUTECDE=LLW001 $HASP686 OUTPUT(FSP96A12) ROUTECDE=LW001 $HASP686 OUTPUT(CAP81T43) ROUTECDE=LOCAL $HASP686 OUTPUT(CAP81T44) ROUTECDE=LOCAL $HASP686 OUTPUT(XTBPRT)ROUTECDE=LX509 Tim Brown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail transmission contains information that is confidential and may be privileged. It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
Thanks definitely a different method, still confused why mine doesn't always capture the result of $DO JOBQ,READY,DEST' Tim -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jousma, David Sent: Monday, 30 January, 2017 11:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx ** THIS IS AN EXTERNAL EMAIL ** Use caution before opening links / attachments. Never supply UserID/PASSWORD information. Tim, I have a REXX exec I use to issue operator commands using the ISFSLASH keyword and writes the output to a temp file. I think I may have stole it then enhanced it for my use either from IBM, or someone on this list, but the processing of the ISFULOG array is somewhat more complicated than you have listed. I am posting the entire exec for you to play with, along with the JCL I use to execute. You can have as many commands as you want in SYSIN. //VARYOFF EXEC PGM=IKJEFT1B,PARM='%OPERCMDB' //SYSEXEC DD DSN=your.sysexec.dataset,DISP=SHR //SYSTSIN DD DUMMY //SYSTSPRT DD DUMMY //SYSINDD *,SYMBOLS=JCLONLY RO *ALL,V &TARGUCB.,OFFLINE /* /* REXX */ /* this REXX exec will issue operator commands via SDSF REXX interface security is based on the person using the command. this exec is to be used for batch only */ 'EXECIO * DISKR SYSIN (STEM mycmd. FINIS' if rc > 0 then do say 'Return code from OPEN was' rc say 'Aborting...' exit end /* Allocate results output file */ ddnm = 'DD'||random(1,9) Address TSO "Alloc Fi("ddnm") SYSOUT" /* Process all input commands*/ Do c=1 to mycmd.0 oper_command.0 = 1 oper_command.1 = mycmd.c Call Main_process End /* Free results output file */ Address TSO "Free Fi("ddnm")" Return 0 Main_process: /* process all data from SYSIN */ rc=isfcalls('ON') Address SDSF ISFSLASH "("oper_command.") (WAIT)" l_cnt = 0 If datatype(isfulog.0) = "NUM" Then Do If isfulog.0 <> 0 Then Do l_cnt = l_cnt + 1 l.l_cnt = substr(isfulog.1,1,43) Do ix=1 to isfulog.0 ll = length(isfulog.ix) if ll <> 0 Then qdata = substr(isfulog.ix,44,ll-43) else qdata = isfulog.ix l_cnt = l_cnt + 1 l.l_cnt = qdata End End Else Do l_cnt = l_cnt + 1 l.l_cnt = "No command response avail
Re: sdsf in rexx
Tim, I'm wondering if it ignores the WAIT because you didn't include a closing parenthesis on your option. So (WAIT) rather than (WAIT . Bart -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Monday, January 30, 2017 12:44 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx Thanks definitely a different method, still confused why mine doesn't always capture the result of $DO JOBQ,READY,DEST' Tim -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jousma, David Sent: Monday, 30 January, 2017 11:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx ** THIS IS AN EXTERNAL EMAIL ** Use caution before opening links / attachments. Never supply UserID/PASSWORD information. Tim, I have a REXX exec I use to issue operator commands using the ISFSLASH keyword and writes the output to a temp file. I think I may have stole it then enhanced it for my use either from IBM, or someone on this list, but the processing of the ISFULOG array is somewhat more complicated than you have listed. I am posting the entire exec for you to play with, along with the JCL I use to execute. You can have as many commands as you want in SYSIN. ... _ Dave Jousma Manager Mainframe Engineering, Assistant Vice President david.jou...@53.com 1830 East Paris, Grand Rapids, MI 49546 MD RSCB2H p 616.653.8429 f 616.653.2717 -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Monday, January 30, 2017 10:58 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: sdsf in rexx Using sdsf in rexx with command $DO JOBQ,READY,DEST COMMAND = '$DO JOBQ,READY,DEST' IF ISFCALLS('ON') <> 0 THEN EXIT 99 ADDRESS SDSF "ISFEXEC '/"COMMAND"' (WAIT" DO S1 = 1 TO ISFULOG.0 SAY ISFULOG.S1 END Its supposed to return the $HASP686 messages in ISFULOG array, which are same as when issued at console Sometimes it does and other times it doesn't return anything even when there are jobs available It just returns these 2 and not the ones with $HASP686 "CPAC 2017030 10:45:11.13 ISF031I CONSOLE DPP ACTIVATED" "CPAC 2017030 10:45:11.13-$DO JOBQ,READY,DEST" $DO JOBQ,READY,DEST $HASP686 OUTPUT(FSP96A12) ROUTECDE=LLW001 $HASP686 OUTPUT(FSP96A12) ROUTECDE=LW001 $HASP686 OUTPUT(CAP81T43) ROUTECDE=LOCAL $HASP686 OUTPUT(CAP81T44) ROUTECDE=LOCAL $HASP686 OUTPUT(XTBPRT)ROUTECDE=LX509 Tim Brown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
Never mind, I see the manual states the closing parenthesis is optional. Bart -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of van der Grijn, Bart (B) Sent: Monday, January 30, 2017 1:10 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx Tim, I'm wondering if it ignores the WAIT because you didn't include a closing parenthesis on your option. So (WAIT) rather than (WAIT . Bart -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Monday, January 30, 2017 12:44 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx Thanks definitely a different method, still confused why mine doesn't always capture the result of $DO JOBQ,READY,DEST' Tim -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jousma, David Sent: Monday, 30 January, 2017 11:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx ** THIS IS AN EXTERNAL EMAIL ** Use caution before opening links / attachments. Never supply UserID/PASSWORD information. Tim, I have a REXX exec I use to issue operator commands using the ISFSLASH keyword and writes the output to a temp file. I think I may have stole it then enhanced it for my use either from IBM, or someone on this list, but the processing of the ISFULOG array is somewhat more complicated than you have listed. I am posting the entire exec for you to play with, along with the JCL I use to execute. You can have as many commands as you want in SYSIN. ... _ Dave Jousma Manager Mainframe Engineering, Assistant Vice President david.jou...@53.com 1830 East Paris, Grand Rapids, MI 49546 MD RSCB2H p 616.653.8429 f 616.653.2717 -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Monday, January 30, 2017 10:58 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: sdsf in rexx Using sdsf in rexx with command $DO JOBQ,READY,DEST COMMAND = '$DO JOBQ,READY,DEST' IF ISFCALLS('ON') <> 0 THEN EXIT 99 ADDRESS SDSF "ISFEXEC '/"COMMAND"' (WAIT" DO S1 = 1 TO ISFULOG.0 SAY ISFULOG.S1 END Its supposed to return the $HASP686 messages in ISFULOG array, which are same as when issued at console Sometimes it does and other times it doesn't return anything even when there are jobs available It just returns these 2 and not the ones with $HASP686 "CPAC 2017030 10:45:11.13 ISF031I CONSOLE DPP ACTIVATED" "CPAC 2017030 10:45:11.13-$DO JOBQ,READY,DEST" $DO JOBQ,READY,DEST $HASP686 OUTPUT(FSP96A12) ROUTECDE=LLW001 $HASP686 OUTPUT(FSP96A12) ROUTECDE=LW001 $HASP686 OUTPUT(CAP81T43) ROUTECDE=LOCAL $HASP686 OUTPUT(CAP81T44) ROUTECDE=LOCAL $HASP686 OUTPUT(XTBPRT)ROUTECDE=LX509 Tim Brown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
On Mon, 30 Jan 2017 16:14:42 +, Jousma, David wrote: >... >/* Allocate results output file */ >ddnm = 'DD'||random(1,9) >Address TSO "Alloc Fi("ddnm") SYSOUT" > It's better to let DYNALLOC choose a DDNAME, SYSn, guaranteed unique. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
On Mon, Jan 30, 2017 at 1:59 PM, Paul Gilmartin < 000433f07816-dmarc-requ...@listserv.ua.edu> wrote: > On Mon, 30 Jan 2017 16:14:42 +, Jousma, David wrote: > >... > >/* Allocate results output file */ > >ddnm = 'DD'||random(1,9) > >Address TSO "Alloc Fi("ddnm") SYSOUT" > > > It's better to let DYNALLOC choose a DDNAME, SYSn, guaranteed unique. > Also, I think that it is a far better idea to use BPXWDYN rather than TSO ALLOCATE, being sure to use the RTDDN(...) so that it will return the DD name to you. > > -- gil > > -- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > -- There’s no obfuscated Perl contest because it’s pointless. —Jeff Polk Maranatha! <>< John McKown -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
ProbablyI don’t claim to be an expert in any of this. :) _ Dave Jousma Manager Mainframe Engineering, Assistant Vice President david.jou...@53.com 1830 East Paris, Grand Rapids, MI 49546 MD RSCB2H p 616.653.8429 f 616.653.2717 -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Paul Gilmartin Sent: Monday, January 30, 2017 2:59 PM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx On Mon, 30 Jan 2017 16:14:42 +, Jousma, David wrote: >... >/* Allocate results output file */ >ddnm = 'DD'||random(1,9) >Address TSO "Alloc Fi("ddnm") SYSOUT" > It's better to let DYNALLOC choose a DDNAME, SYSn, guaranteed unique. -- gil -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN This e-mail transmission contains information that is confidential and may be privileged. It is intended only for the addressee(s) named above. If you receive this e-mail in error, please do not read, copy or disseminate it in any manner. If you are not the intended recipient, any disclosure, copying, distribution or use of the contents of this information is prohibited. Please reply to the message immediately by informing the sender that the message was misdirected. After replying, please erase it from your computer system. Your assistance in correcting this error is appreciated. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
Re: sdsf in rexx
I got it to work using a different a RACF user, not sure what changed for previous user Tim -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jousma, David Sent: Monday, 30 January, 2017 11:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx ** THIS IS AN EXTERNAL EMAIL ** Use caution before opening links / attachments. Never supply UserID/PASSWORD information. Tim, I have a REXX exec I use to issue operator commands using the ISFSLASH keyword and writes the output to a temp file. I think I may have stole it then enhanced it for my use either from IBM, or someone on this list, but the processing of the ISFULOG array is somewhat more complicated than you have listed. I am posting the entire exec for you to play with, along with the JCL I use to execute. You can have as many commands as you want in SYSIN. //VARYOFF EXEC PGM=IKJEFT1B,PARM='%OPERCMDB' //SYSEXEC DD DSN=your.sysexec.dataset,DISP=SHR //SYSTSIN DD DUMMY //SYSTSPRT DD DUMMY //SYSINDD *,SYMBOLS=JCLONLY RO *ALL,V &TARGUCB.,OFFLINE /* /* REXX */ /* this REXX exec will issue operator commands via SDSF REXX interface security is based on the person using the command. this exec is to be used for batch only */ 'EXECIO * DISKR SYSIN (STEM mycmd. FINIS' if rc > 0 then do say 'Return code from OPEN was' rc say 'Aborting...' exit end /* Allocate results output file */ ddnm = 'DD'||random(1,9) Address TSO "Alloc Fi("ddnm") SYSOUT" /* Process all input commands*/ Do c=1 to mycmd.0 oper_command.0 = 1 oper_command.1 = mycmd.c Call Main_process End /* Free results output file */ Address TSO "Free Fi("ddnm")" Return 0 Main_process: /* process all data from SYSIN */ rc=isfcalls('ON') Address SDSF ISFSLASH "("oper_command.") (WAIT)" l_cnt = 0 If datatype(isfulog.0) = "NUM" Then Do If isfulog.0 <> 0 Then Do l_cnt = l_cnt + 1 l.l_cnt = substr(isfulog.1,1,43) Do ix=1 to isfulog.0 ll = length(isfulog.ix) if ll <> 0 Then qdata = substr(isfulog.ix,44,ll-43) else qdata = isfulog.ix l_cnt = l_cnt + 1 l.l_cnt = qdata End End Else Do l_cnt = l_cnt + 1 l.l_cnt = "No command response available"
Re: sdsf in rexx
Tim, I haven't had a chance to try what you are attempting, at least not specifically the command, but something I stumbled upon a while back was when I wrote an SDSF enabled REXX, I tried asking for something that was in the extended screen layout rather than the default screen layout. Is it possible that what you are asking for is on the extended screen layout, the one you get by typing ? in the command line? If so, did your previous user have access to that screen? Chuck Charles (Chuck) Hardee Senior Systems Engineer/Database Administration EAS Information Technology Thermo Fisher Scientific 300 Industry Drive | Pittsburgh, PA 15275 Phone +1 (724) 517-2633 | Mobile +1 (412) 877-2809 | FAX: +1 (412) 490-9230 chuck.har...@thermofisher.com | www.thermofisher.com WORLDWIDE CONFIDENTIALITY NOTE: Dissemination, distribution or copying of this e-mail or the information herein by anyone other than the intended recipient, or an employee or agent of a system responsible for delivering the message to the intended recipient, is prohibited. If you are not the intended recipient, please inform the sender and delete all copies. -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Tim Brown Sent: Tuesday, January 31, 2017 7:25 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx I got it to work using a different a RACF user, not sure what changed for previous user Tim -Original Message- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jousma, David Sent: Monday, 30 January, 2017 11:15 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: sdsf in rexx ** THIS IS AN EXTERNAL EMAIL ** Use caution before opening links / attachments. Never supply UserID/PASSWORD information. Tim, I have a REXX exec I use to issue operator commands using the ISFSLASH keyword and writes the output to a temp file. I think I may have stole it then enhanced it for my use either from IBM, or someone on this list, but the processing of the ISFULOG array is somewhat more complicated than you have listed. I am posting the entire exec for you to play with, along with the JCL I use to execute. You can have as many commands as you want in SYSIN. //VARYOFF EXEC PGM=IKJEFT1B,PARM='%OPERCMDB' //SYSEXEC DD DSN=your.sysexec.dataset,DISP=SHR //SYSTSIN DD DUMMY //SYSTSPRT DD DUMMY //SYSINDD *,SYMBOLS=JCLONLY RO *ALL,V &TARGUCB.,OFFLINE /* /* REXX */ /* this REXX exec will issue operator commands via SDSF REXX interface security is based on the person using the command. this exec is to be used for batch only */ 'EXECIO * DISKR SYSIN (STEM mycmd. FINIS' if rc > 0 then do say 'Return code from OPEN was' rc say 'Aborting...' exit end /* Allocate results output file */ ddnm = 'DD'||random(1,9) Address TSO "Alloc Fi("ddnm") SYSOUT" /* Process all input commands*/ Do c=1 to mycmd.0 oper_command.0 = 1 oper_command.1 = mycmd.c Call Main_process End /* Free results output file */ Address TSO "Free Fi("ddnm")" Return 0 Main_process: /* process all data from SYSIN */ rc=isfcalls('ON')