Page 2 of 2

Re: set variable in SYSIN DD *

PostPosted: Thu Jun 09, 2016 4:47 pm
by NicC
in REXX, what tool to use?

Tool to do what? I am lost now.
Did not understand how to use it(understand how to run, but not about getting a practical result)

Use what? What result? What did you try? What was the result? What is that a link to? Why not use the official IBM manuals?

You had better get back to basics and start explaining again with examples. We are not at you desk looking over your shoulder, we are not inside your head. We cannot read your mind.

Re: set variable in SYSIN DD *

PostPosted: Fri Jun 10, 2016 2:31 pm
by crazydoc
Thanks for sharing, solved the problem the following tools:
1) pass a variable in REXX and the REXX execution(found here: http://billlalonde.tripod.com/back/mvsh017.htm):
//REXXJOB  JOB  MSGLEVEL=(1,1),MSGCLASS=A,CLASS=A,REGION=0M  
//S1 EXEC PGM=IRXJCL,REGION=0M,                              
//  PARM='REXXEXAM xxx yyyxxx yyyyyy'                        
//SYSEXEC  DD DISP=SHR,DSN=yyy.yyy.yyy                      
//SYSTSPRT DD SYSOUT=*                                      
//SYSTSIN  DD DUMMY                                          
//CARDS    DD DSN=yyy.yyy.yyy(yyyyyy),DISP=SHR,UNIT=SYSDA,
//   VOL=SER=yyyyyy                                          

2) Change using REXX JOB cards and submitting for execution(if you are a beginner in REXX I advise you to look here: http://publibfp.dhe.ibm.com/epubs/pdf/ikj4c310.pdf keywords: PARSE, MVSVAR, EXECIO, stem. In order to understand how the REXX example in link part 1):
PARSE ARG PARM                                                          
PARSE VAR PARM WORD1 WORD2 WORD3                                        
'EXECIO * DISKR CARDS (STEM NEWVAR. FINIS'                              
NEWVAR.1 ="//"WORD3"yy JOB MSGLEVEL=(1,1),MSGCLASS=A,CLASS=A,REGION=0M"
NEWVAR.5 ="/*$VS,'V'" WORD1",OFFLINE'"                                  
NEWVAR.12 ="INIT UNIT("WORD1") VFY("WORD2") VTOC(0,1,179)"              
NEWVAR.16 ="/*$VS,'V'" WORD1",ONLINE'"                                  
NEWVAR.23 ="//IN       DD   UNIT=SYSDA,DISP=OLD,VOL=SER="WORD3          
NEWVAR.25 ="// VOL=SER="WORD2",DSNTYPE=LARGE,DSN=yyy."WORD3".yyy"    
NEWVAR.38 ="//IN DD UNIT=SYSDA,DSN=yyy."WORD3".yyy,DISP=SHR"        
NEWVAR.39 ="//OUT DD UNIT=SYSDA,VOL=SER="WORD2",DISP=(NEW,CATLG),"      
NEWVAR.40 ="// DSN=yyy."WORD3".yyy,SPACE=(TRK,(65000,15000)),"        
NEWVAR.57 ="PUT" WORD3".yyy"                                          
'EXECIO * DISKW CARDS (STEM NEWVAR. FINIS'                              
DSNA = "'yyy.yyy.yyy(yyyyyy)'"                                        
ADDRESS "TSO"                                                          
"SUBMIT "DSNA                                      
EXIT 0                                                                  

There are nicer solutions to this issue, however, since REXX is studied by me, only the second day - took advantage of the simplest. I hope this will help someone.

Re: set variable in SYSIN DD *

PostPosted: Tue Jun 14, 2016 2:12 pm
by crazydoc
Comment to the previous post for the lines:
ADDRESS "TSO"                                                          
"SUBMIT "DSNA

you want to use the program(start jcl) IKJEFT01. Otherwise the command 'submit'(in the TSO address space, not available space) does not work. For this reason read
http://publibfp.dhe.ibm.com/epubs/pdf/ikj4c310.pdf
part of 'Running an Exec in the Background'