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

pass data as symbolic parameter from batch rexx toother step


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

New User


Joined: 20 Apr 2022
Posts: 70
Location: India

PostPosted: Tue Jun 14, 2022 6:52 am
Reply with quote

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

Global Moderator


Joined: 01 Sep 2006
Posts: 2355
Location: Silicon Valley

PostPosted: Tue Jun 14, 2022 8:17 am
Reply with quote

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

Senior Member


Joined: 29 Apr 2008
Posts: 1533

PostPosted: Tue Jun 14, 2022 6:29 pm
Reply with quote

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
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 Reference for COND parameter. JCL & VSAM 1
No new posts PS file parameter JCL & VSAM 4
No new posts Setting CA7 user variable from data s... CA Products 7
No new posts ISPF END or EXIT in Rexx CLIST & REXX 13
No new posts Issues with executing a REXX MACRO th... TSO/ISPF 4
Search our Forums:

Back to Top