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

Pass value from Rexx to JCL


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Apr 29, 2008 5:56 pm
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
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

Global Moderator


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

PostPosted: Tue Apr 29, 2008 6:05 pm
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 29, 2008 6:06 pm
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
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
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

Global Moderator


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

PostPosted: Tue Apr 29, 2008 6:18 pm
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
Reply with quote

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

Superior Member


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

PostPosted: Wed Apr 30, 2008 9:53 am
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: 771
Location: Germany

PostPosted: Wed Apr 30, 2008 4:34 pm
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
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

Global Moderator


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

PostPosted: Sat Jul 26, 2008 11:06 pm
Reply with quote

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

Moderator Emeritus


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

PostPosted: Sat Jul 26, 2008 11:08 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top