set variable in SYSIN DD *

JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: set variable in SYSIN DD *

Postby NicC » Thu Jun 09, 2016 4:47 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Global moderator
Posts: 2514
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 86 times

Re: Re: set variable in SYSIN DD *


Re: set variable in SYSIN DD *

Postby crazydoc » Fri Jun 10, 2016 2:31 pm

Thanks for sharing, solved the problem the following tools:
1) pass a variable in REXX and the REXX execution(found here:
//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: 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.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.38 ="//IN DD UNIT=SYSDA,DSN=yyy."WORD3".yyy,DISP=SHR"        
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.
Posts: 44
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set variable in SYSIN DD *

Postby crazydoc » Tue Jun 14, 2016 2:12 pm

Comment to the previous post for the lines:
ADDRESS "TSO"                                                          

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
part of 'Running an Exec in the Background'
Posts: 44
Joined: Fri Jul 24, 2015 12:27 pm
Has thanked: 2 times
Been thanked: 0 time


Return to JCL


  • Related topics
    Last post