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
 

 

GDG substitution

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 680
Location: NJ

PostPosted: Thu Jul 30, 2009 12:38 am    Post subject: GDG substitution
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: 788
Location: Chennai, India

PostPosted: Thu Jul 30, 2009 12:43 am    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu Jul 30, 2009 12:48 am    Post subject:
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: 680
Location: NJ

PostPosted: Thu Jul 30, 2009 12:53 am    Post subject:
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: 680
Location: NJ

PostPosted: Thu Jul 30, 2009 12:55 am    Post subject:
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: 680
Location: NJ

PostPosted: Thu Jul 30, 2009 11:37 pm    Post subject:
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    Post subject:
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jul 31, 2009 12:25 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts z/OS V2.1 Instream substitution of sy... colin777 JCL & VSAM 0 Thu Dec 05, 2013 10:22 am
No new posts Rexx Variable Substitution with POS c... Mickeydusaor CLIST & REXX 8 Thu Jul 07, 2011 7:21 pm
No new posts Using dynamic substitution in jcl on ... dominickim JCL & VSAM 14 Fri Sep 18, 2009 3:58 pm
No new posts Reg: Copybook Substitution in endevor dick scherrer CA Products 2 Wed Jan 28, 2009 3:55 am
No new posts Substitution jcl not substituting bbxrider JCL & VSAM 9 Sat Jun 07, 2008 4:57 am


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