/* REXX */
/* THIS UTILITY WILL ACCEPT ANY VALID CA7 COMMAND, AND EXECUTE THAT COMMAND */
/* ON THE JES SPECIFIED. EX. TSO CA7CMD 1 LRLOG,JOB=CJOB1234 */
trace e
LOGID = USERID()
PARSE UPPER ARG CHK10.1
RSLT = CAL2X2WA()
IF CHK10.1 = ' ' THEN
do
"alloc fi(CHK10) da('TS.REXXCHECK.CHK10') shr" /* allocate file */
if rc > 0 then
do
say 'Error opening input file, return code = ' rc
exit
end
"EXECIO * DISKR CHK10 (STEM CHK10. FINIS"
"free fi(CHK10)" /* free the file */
end
ELSE CHK10.0 = 1
DO J = 1 TO CHK10.0
PARSE VALUE CHK10.J WITH CMDNODE CA7CMD
IF CMDNODE = 1 THEN CA7_NODE = 'FIRB'
ELSE IF CMDNODE = 2 THEN CA7_NODE = 'SECB'
ELSE IF CMDNODE = 3 THEN CA7_NODE = 'THRA'
CALL RUNCMD
END
EXIT
RUNCMD:
SAY 'EXECUTING YOUR CA7 COMMAND..........'
LJOBCMD = '/LOGON '||LOGID||',xxxx;'||CA7CMD||';/LOGOFF'
ADDRESS CA7 LJOBCMD
DROP LINEIN.
X = QUEUED()
DO A = 1 TO X
PULL LINEIN.A
LINEIN.0 = A
SAY LINEIN.A
END
RETURN
/* THIS UTILITY WILL ACCEPT ANY VALID CA7 COMMAND, AND EXECUTE THAT COMMAND */
/* ON THE JES SPECIFIED. EX. TSO CA7CMD 1 LRLOG,JOB=CJOB1234 */
trace e
LOGID = USERID()
PARSE UPPER ARG CHK10.1
RSLT = CAL2X2WA()
IF CHK10.1 = ' ' THEN
do
"alloc fi(CHK10) da('TS.REXXCHECK.CHK10') shr" /* allocate file */
if rc > 0 then
do
say 'Error opening input file, return code = ' rc
exit
end
"EXECIO * DISKR CHK10 (STEM CHK10. FINIS"
"free fi(CHK10)" /* free the file */
end
ELSE CHK10.0 = 1
DO J = 1 TO CHK10.0
PARSE VALUE CHK10.J WITH CMDNODE CA7CMD
IF CMDNODE = 1 THEN CA7_NODE = 'FIRB'
ELSE IF CMDNODE = 2 THEN CA7_NODE = 'SECB'
ELSE IF CMDNODE = 3 THEN CA7_NODE = 'THRA'
CALL RUNCMD
END
EXIT
RUNCMD:
SAY 'EXECUTING YOUR CA7 COMMAND..........'
LJOBCMD = '/LOGON '||LOGID||',xxxx;'||CA7CMD||';/LOGOFF'
ADDRESS CA7 LJOBCMD
DROP LINEIN.
X = QUEUED()
DO A = 1 TO X
PULL LINEIN.A
LINEIN.0 = A
SAY LINEIN.A
END
RETURN
My next goal with this segment is to figure out how to get it to not have to logoff and back on after each job it checks in order to save some junk space on the display