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

GDG substitution


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jul 30, 2009 12:38 am
Reply with quote

Hi All,

I have a scenario like sorting a JCL, where as the input is a GDG file.

Now the query is, In first step i have a cobol program which will return me the no.of business days into a file.As per my input. The final result will be 4/3/6/8... as per the date given.

In the next step i am using the sort JCL where as sort in is the GDG name and i need to substitute the above step output in this sortin GDG no.

ie., A.B.C(???)

Can any one help me on this?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Jul 30, 2009 12:43 am
Reply with quote

If you use A.B.C(+1) in first step, you should refer it as A.B.C(+1) until end of the job.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Jul 30, 2009 12:48 am
Reply with quote

Quote:
i need to substitute the above step output in this sortin GDG no.
Once submitted, JCL runs through the JES converter / interpreter. At that point it cannot be changed by any process. If you are really saying that you need the GDG number to be variable (what you are wanting to do is not clear from what you've said), you'll need to set your job up to copy the JCL you need to the internal reader to be submitted as a separate job.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jul 30, 2009 12:53 am
Reply with quote

Hi,

What we are trying exactly here is instead of giving the GDG no manually we are trying to pull the value ie., (-2/-3) thru the program.

If our first step of JCL we have a cobol program which will return how many business days are there for eg. 2 or 4 days. Now this 2 or 4 should be substituted in the next step on the SORTIN.

lET ME KNOW IF I AM NOT CLEAR STILL.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jul 30, 2009 12:55 am
Reply with quote

As you said if i submit with 2 diff job how do i submit this value of this ouput in next JCL SORTIN?
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Jul 30, 2009 11:37 pm
Reply with quote

Any Luck on this?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Thu Jul 30, 2009 11:53 pm
Reply with quote

khamarutheen wrote:
Any Luck on this?
If you are really saying that you need the GDG number to be variable (what you are wanting to do is not clear from what you've said), you'll need to set your job up to copy the JCL you need to the internal reader to be submitted as a separate job.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Fri Jul 31, 2009 12:25 am
Reply with quote

Quote:
What we are trying exactly here is instead of giving the GDG no manually we are trying to pull the value ie., (-2/-3) thru the program.

If our first step of JCL we have a cobol program which will return how many business days are there for eg. 2 or 4 days. Now this 2 or 4 should be substituted in the next step on the SORTIN.
Your COBOL program needs a DD statement that points to the internal reader (SYSOUT=(A,INTRDR) is typical). In your program, copy each line of your JCL that needs to execute to this file to submit the second job. I strongly recommend the last line of JCL copid to the file be a /*EOF to allow the job to start immediately.

If you haven't read the JCL Reference and Programming Guide on using the internal reader, click on the manuals link at the top of the page and read up on them before going any further.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts disable /*XEQ substitution in TWS IBM Tools 4
No new posts z/OS V2.1 Instream substitution of sy... JCL & VSAM 0
No new posts Rexx Variable Substitution with POS c... CLIST & REXX 8
No new posts Using dynamic substitution in jcl on ... JCL & VSAM 14
No new posts Reg: Copybook Substitution in endevor CA Products 2
Search our Forums:

Back to Top