View previous topic :: View next topic
|
Author |
Message |
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
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 |
|
|
khamarutheen
Active Member
Joined: 23 Aug 2005 Posts: 677 Location: NJ
|
|
|
|
Any Luck on this? |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
|