Passing values from program to JCL



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Passing values from program to JCL

Postby sugavanesh » Tue Feb 21, 2012 7:55 pm

How to pass values from a program to JCL ? ......
sugavanesh
 
Posts: 9
Joined: Sat Nov 05, 2011 9:03 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Passing values from REXX to JCL

Postby Akatsukami » Tue Feb 21, 2012 8:28 pm

File tailoring.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Passing values from REXX to JCL

Postby enrico-sorichetti » Tue Feb 21, 2012 9:30 pm

there are quite a few examples on this forum
and also on http://www.ibmmainframes.com/index.php
on how to build jcl using both plain REXX or REXX and ISPF

for REXX/ISPF both the coding and the maintenance are much simpler
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3003
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Passing values from program to JCL

Postby steve-myers » Tue Feb 21, 2012 10:58 pm

sugavanesh wrote:How to pass values from a program to JCL ? ......
We've been through this before but ...

the only value a program can supply to JCL that can be used by JCL is a return code. And the only way JCL can use a return code is in evaluating an EXEC statement or JOB statement COND parameter, or in a // IF statement.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Passing values from program to JCL

Postby NicC » Wed Feb 22, 2012 2:02 am

Please give an example of what you mean. Akatsukami and Enrico understand one thing Steve and I understand another thing. Remember that by the time your job runs the JCL has been interpreted and it is the interpreted information that is used when the job runs.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Passing values from program to JCL

Postby steve-myers » Wed Feb 22, 2012 6:27 am

NicC is correct: your initial subject read "How can I pass a value from a program being run by JCL to influence the remainder of the JCL?" Well, that's how I read it, anyway. Other people read it as, "How can I insert a value (or values) into JCL being submitted for another job?" This is a whole different thing: you just have to alter the JCL text before submitting it, and there are many, many ways to do this. From the early days of OS/360 through early MVS releases the system programmer prepared a system description using Assembler macro calls, and then ran this description through the Assembler. The output from this assembly was a very large job that used the Assembler, linkage editor and other system utility programs to create the system libraries. Regardless of methods, the final result was identical to what you propose. At various times in my career I used the exact same technique to generate JCL.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post