View previous topic :: View next topic
|
Author |
Message |
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
Hi,
I am new to rexx I have requirement explained below.
I have a data set containing 3 fields 3 rows i want to pass this 3rd row field as symbolic parameter to my JCL is it possible? i researched about it and it says it is possible through rexx.
below is my file:
Code: |
sssssssssssssssssssssssssssssssssssssssssssssssss
VIEW ALT0.Q.NDVR.INTERNAL.ETT3
Command ===>
****** ***************************** Top of Data *
000100 P761993
000200 QSYS
000300 0202251 --this one i want to use as symbolic parm
to my next job
****** **************************** Bottom of Data |
what i have done:
prepared a job my 1st step is calling rexx and my rexx is reading this input file my question is..is it possible to pass this field as symbolic parameter in my subsequent step in same jcl where i calling this rexx to read the file..?
If not how i can achieve this ..? if not possible do i neeed to use file tailoring concept and call the another JCL(skelton) thorugh that rexx ..?
I hope we can pass this as symbolic parameter to susequent step with in same jcl but just assuming if anyone can confirm this..? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
I do not think you can use JCL symbols for this.
The easiest is to submit another job from your rexx program, as you suggest.
But depending on the complexity of that next step, you may think it is easier to execute it directly from that first rexx program, instead of as a separate job step. Just allocate any required DD names and call the program.
Code: |
sym = '0202251' /*actually, read this from file */
Address TSO
"ALLOC F(SYSPRINT) CLASS(H) REUSE"
"ALLOC F(SYSIN) DUMMY REUSE"
"ALLOC F(SYSUT1) DSN('my.dsn.D"sym"') SHR REUSE"
"ALLOC F(SYSUT2) CLASS(H) REUSE"
"CALL *(IEBGENER)"
|
You did not provide the JCL for the second step, so I substituted an IEBGENER example. untested. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Digvijay Singh wrote: |
I hope we can pass this as symbolic parameter to susequent step with in same jcl but just assuming if anyone can confirm this..? |
Any JCL parameter or SET-variable is resolved and substituted (as text string at this moment) during JCL parsing, and syntax checking. Only after this stage the finalized JCL with all substituted parameters is submitted to the input JES queue for further execution.
During execution time it is not possible to manipulate with JCL parameters, or SET-variables in any manner.
For clarity: it would be about the same as replacing some parts of a car engine while driving!
For your task (if it is really needed?) you have to use one of available dynamic allocation tools; one example of using REXX for that purpose is shown in the previous response.
From my experience, about 90% of such pseudo-tasks do appear due to misunderstanding of the system architecture. Almost always such job like this one can be done in a much more simple way. |
|
Back to top |
|
|
|