View previous topic :: View next topic
|
Author |
Message |
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Hi Guys,
How can i issue system command using rexx and get back the result ?
The command like refresh Linklist ... etc..
/RO *ALL,F LLA,UPDATE=PP
Thanks |
|
Back to top |
|
|
Paul Voyner
New User
Joined: 26 Nov 2012 Posts: 52 Location: UK
|
|
|
|
Something like this (warning: I did not test this)
Code: |
rc=isfcalls("ON")
if rc <> 0 then exit 16
cmd = "/RO *ALL,F LLA,UPDATE=PP"
Address "SDSF" "ISFEXEC '"cmd"'"
do i = 1 to ISFULOG.0
say "MSG="isfulog.i
end
rc=isfcalls("OFF")
exit |
I know you're going to have follow-up questions but please go and read the SDSF Operation & Customization book first. SDSF-REXX is very powerful and is well documented.
You may want to have a closer look at ISFSLASH and ISFDELAY. |
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
Hi Paul,
Thank you for your reply.
I tested the code and using it to display the IPL information ,it works perfect !!
The only thing is about the disply , why it display the output after command is like this order ??
Code: |
MSG=XSYS 2014195 09:30:57.99 IEE421I RO *ALL,D IPLINFO 006
MSG= XSYS RESPONSES -------------
--------------------------------------
MSG= IEE254I 09.30.56 IPLINFO DISPLA
Y 005
MSG= SYSTEM IPLED AT 11.21.08 ON 07/
12/2014
MSG= RELEASE z/OS 02.01.00 LICENS
E = z/OS
MSG= USED LOADX1 IN SYS1.IPLPARM ON
050A9
MSG= ARCHLVL = 2 MTLSHARE = N
MSG= IEASYM LIST = (00,JP,ZP,NV,SW,T
T)
MSG= IEASYS LIST = X1 (OP)
MSG= IODF DEVICE: ORIGINAL(050A9) CU
RRENT(050A9)
MSG= IPL DEVICE: ORIGINAL(051C3) CUR
RENT(051C3) VOLUME(SYSXRS)
MSG= YSYS RESPONSES -------------
--------------------------------------
MSG= IEE254I 09.30.56 IPLINFO DISPLA
Y 122 |
This is correct order :
Code: |
ESPONSE=XSYS
IEE254I 09.25.17 IPLINFO DISPLAY 898
SYSTEM IPLED AT 11.21.08 ON 07/12/2014
RELEASE z/OS 02.01.00 LICENSE = z/OS
USED LOADX1 IN SYS1.IPLPARM ON 050A9
ARCHLVL = 2 MTLSHARE = N
IEASYM LIST = (00,JP,ZP,NV,SW,TT)
IEASYS LIST = X1 (OP)
IODF DEVICE: ORIGINAL(050A9) CURRENT(050A9)
IPL DEVICE: ORIGINAL(051C3) CURRENT(051C3) VOLUME(SYSXRS) |
|
|
Back to top |
|
|
jackzhang75
Active User
Joined: 09 Jun 2014 Posts: 125 Location: US
|
|
|
|
I just found the resaon , becuase orignal ouput form Ulog is not full , you have to PF10 move to left to show the whold log, so i substr to get the right output disply , the code :
Code: |
JOBNAME=HAO
RX=ISFCALLS("ON")
IF RX<>0 THEN EXIT 16
CMD="/RO *ALL,D IPLINFO"
ADDRESS "SDSF" "ISFEXEC '"CMD"'"
DO I=1 TO ISFULOG.0
QUEUE SUBSTR(ISFULOG.I,45,60)
END
"ALLOC DA('TTAT.TSP.TU14.DR("||JOBNAME||")') F(MYOUTDD) SHR REUSE"
"EXECIO * DISKW MYOUTDD (FINIS"
"FREE F(MYOUTDD)"
RC=ISFCALLS("OFF")
EXIT |
|
|
Back to top |
|
|
|