View previous topic :: View next topic |
Author |
Message |
mainframemouli Beginner
Joined: 23 Feb 2005 Posts: 87 Topics: 33
|
Posted: Thu Jul 05, 2007 9:02 am Post subject: Date from previous step and use in next step |
|
|
I Have a program which reads the date given in the //SYSIN DD *
The date given in the SYSIN DD * is a Control-M date. The program is executed at the STEP0030.
Code: |
//SYSIN DD *
%%DATE1 %%DATE1
/*
|
But now the Requirement got changed stating that the Date is no more the Control-M date. The date from header record of the Input file used in the Previous step (i.e) STEP0020 , can be used as a date in the //SYSIN DD *.
Now there is 1 possibility I can see is....
We can read the input file in the step20 and in the step 25 the date in the header can be put into a separate file.
This file can be used in the step30 instaed of having date in SYSIN card....
but this will require a change in the Program executed in the step30.
I don't want the program to be changed.......can anyone help me out in finding the way i can use the date available in the file in the previous step and use it in the next step's inline data card.... |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Thu Jul 05, 2007 9:09 am Post subject: |
|
|
mainframemouli,
Quote: |
This file can be used in the step30 instaed of having date in SYSIN card....
but this will require a change in the Program executed in the step30.
|
I don't understand this portion. Why do you think the program in STEP30 needs to be changed ? I believe that the program in STEP30 is a COBOL pgm and it is currently doing an COBOL ACCEPT to read the data from Sysin card. If my assumption is correct then read on .....
1. You can allocate the output of STEP25 to //SYSIN of STEP30. In this case the program need not be changed.
2. All you need to do in STEP25 is to format the data which you take from STEP20 input into a format that program in STEP30 can understand. You can use SORT to pick up the date from header and do any re-formatting..
Does this solve your problem ?
Thanks,
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Thu Jul 05, 2007 9:10 am Post subject: |
|
|
Quote: |
We can read the input file in the step20 and in the step 25 the date in the header can be put into a separate file.
This file can be used in the step30 instaed of having date in SYSIN card....
but this will require a change in the Program executed in the step30.
|
mainframemouli,
says who? you don't have to change the program. Just create 1 line 80 byte file in step25 and assign that to sysin of step30 and you don't have to change program in step30
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
mainframemouli Beginner
Joined: 23 Feb 2005 Posts: 87 Topics: 33
|
Posted: Fri Jul 06, 2007 6:00 am Post subject: |
|
|
You are correct....
Thanks kolusu and phantom |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Tue Oct 16, 2007 1:43 am Post subject: |
|
|
Hi Kolusu,
Could you please let me know how can we assign 80 byte file created in step25 to sysin of step30. Sorry may be it's a simple one but i'm not getting the idea.
Thanks
kirank. |
|
Back to top |
|
|
vivek1983 Intermediate
Joined: 20 Apr 2006 Posts: 222 Topics: 24
|
Posted: Tue Oct 16, 2007 2:25 am Post subject: |
|
|
kirank wrote: | Hi Kolusu,
Could you please let me know how can we assign 80 byte file created in step25 to sysin of step30. Sorry may be it's a simple one but i'm not getting the idea.
Thanks
kirank. | kirank,
Code: |
//STEP30 EXEC PGM=XXXX
//STEPLIB...
.....
//SYSIN DD DSN=your 80 byte file created in step25, DISP=SHR.
|
_________________ Vivek G
--------------------------------------
A dream is just a dream. A goal is a dream with a plan and a deadline. (Harvey Mackay) |
|
Back to top |
|
|
kirank Beginner
Joined: 21 Apr 2004 Posts: 61 Topics: 33 Location: hyderabad
|
Posted: Tue Oct 16, 2007 5:46 am Post subject: |
|
|
Thanks vivek |
|
Back to top |
|
|
|
|