Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Pass value from Rexx to JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Tue Apr 29, 2008 5:46 pm    Post subject: Pass value from Rexx to JCL
Reply with quote

I have a requirement to pass information from REXX to JCL.

To make the requirement more clear

I have a file HLQ.FIRST and I need to create a new file HLQ.SECOND with all the units same except record length.
I want the lrec of second file to be Lrec of 1st file + some variable (20 or 50 for example).

So I am getting the record length of the 1st file from REXX and want to add it to lrec of second file
I want the creation of 2nd file only by JCL and not through REXX.

Hope the requirement is clear.
Could someone please help me out?
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 29, 2008 5:56 pm    Post subject: Reply to: Pass value from Rexx to JCL
Reply with quote

OK. I'm not clear to what your problem or question is. Your process seems to be rather straight-forward.
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Apr 29, 2008 6:01 pm    Post subject:
Reply with quote

Passing data from a step back to the job stream has been discussed many times, the only thing you can pass back to the job stream from a step is a return code.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 29, 2008 6:05 pm    Post subject: Reply to: Pass value from Rexx to JCL
Reply with quote

Maybe I'm reading more into this topic than was intended. I'm thinking that the O/P is going to create and submit the JCL from this REXX exec to create and catalog the dataset as per the requirements. Or, in my opinion a better process, to create SORT SYSIN records for a subsequent step that copies the exisiting dataset to a new dataset with the record length modified.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 29, 2008 6:06 pm    Post subject:
Reply with quote

But you could invoke ISPF to use a skeleton to create and submit a batch job
Back to top
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Tue Apr 29, 2008 6:12 pm    Post subject:
Reply with quote

superk,

I will make my problem more clear.

I want to create a flat file using a jcl.
when i submit the jcl for the first time the lrec of newly created file should be 80 say( i have hardcoded 80 in my jcl). i am using this flat file in my rexx program.
That will be fine.
the program is over.

When i used the same rexx exec next time then
i want to create the flat file again now lrec should be 80+x
where x is a value that differs each time and it will be present in the rexx exec.

i want to pass that x value in rexx ecex to jcl.
is that possible???
Back to top
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Tue Apr 29, 2008 6:15 pm    Post subject:
Reply with quote

So,

From the above discussion can i conclude saying that

Quote:
the only thing you can pass back to the job stream from a step is a return code.


and we can not pass a Variable to the JCL.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Apr 29, 2008 6:18 pm    Post subject: Reply to: Pass value from Rexx to JCL
Reply with quote

Correct.
Back to top
View user's profile Send private message
kavya123
Warnings : 1

New User


Joined: 11 Jul 2007
Posts: 34
Location: hyderabad

PostPosted: Wed Apr 30, 2008 9:33 am    Post subject:
Reply with quote

Thank you Superk, Expert and Craq Giegerich.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Apr 30, 2008 9:53 am    Post subject:
Reply with quote

He is "expat" not 'expert' but it's a kinda good name.. icon_smile.gif


P.S.: (..just peeping into the thread..)
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Wed Apr 30, 2008 4:34 pm    Post subject:
Reply with quote

Hi kavya123 !

But you could store the LRECL in a variable in profile pool. So at the next use, you could read and modify the Lrecl. Then you could use FileTailoringServices for Skeleton-JCL.

Regards, UmeySan
Back to top
View user's profile Send private message
Paruchuri sujatha

New User


Joined: 19 Dec 2007
Posts: 7
Location: Hyderabad

PostPosted: Sat Jul 26, 2008 9:51 pm    Post subject: passing variables from rexx to jcl
Reply with quote

Hi all,
Please help me, i have a requirement in REXX where i have to delete the datasets for region refresh. can i pass variable(contains dataset name) from rexx to a jcl, and this jcl is written in the same rexx code.

Thanks,
Ameer
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Sat Jul 26, 2008 11:06 pm    Post subject: Reply to: Pass value from Rexx to JCL
Reply with quote

Yes, you can use any standard acceptable JCL variable.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Jul 26, 2008 11:08 pm    Post subject:
Reply with quote

Hello Ameer,

Did you read all of the entries in this topic? If not, read them. If yes, please re-read them for better understanding. . .

You cannot directly pass information (other than return-code) from your code to "jcl".

You could use File Tailoring (mentioned above) or you could create new jcl to be submitted thru the internal reader (many examples in the forum).
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us