MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Date from previous step and use in next step

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Thu Jul 05, 2007 9:02 am    Post subject: Date from previous step and use in next step Reply with quote

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
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Thu Jul 05, 2007 9:09 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Thu Jul 05, 2007 9:10 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
mainframemouli
Beginner


Joined: 23 Feb 2005
Posts: 87
Topics: 33

PostPosted: Fri Jul 06, 2007 6:00 am    Post subject: Reply with quote

You are correct....
Thanks kolusu and phantom
Back to top
View user's profile Send private message
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Tue Oct 16, 2007 1:43 am    Post subject: Reply with quote

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
View user's profile Send private message
vivek1983
Intermediate


Joined: 20 Apr 2006
Posts: 222
Topics: 24

PostPosted: Tue Oct 16, 2007 2:25 am    Post subject: Reply with quote

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
View user's profile Send private message
kirank
Beginner


Joined: 21 Apr 2004
Posts: 61
Topics: 33
Location: hyderabad

PostPosted: Tue Oct 16, 2007 5:46 am    Post subject: Reply with quote

Thanks vivek Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group