IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to issue the system command using rexx?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Fri Jul 11, 2014 10:42 pm
Reply with quote

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
View user's profile Send private message
Paul Voyner

New User


Joined: 26 Nov 2012
Posts: 52
Location: UK

PostPosted: Mon Jul 14, 2014 12:16 pm
Reply with quote

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
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Mon Jul 14, 2014 7:02 pm
Reply with quote

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
View user's profile Send private message
jackzhang75

Active User


Joined: 09 Jun 2014
Posts: 125
Location: US

PostPosted: Mon Jul 14, 2014 7:21 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
Search our Forums:

Back to Top