I am posting again the question, so that it will help someone who is looking for the original question.
Hi Kolusu,
Need your Help.
We will receive Trigger File (ENV.TRIGGER.FILE) and This Trigger file(ENV.TRIGGER.FILE) has a value which will a file name like(ABC.PROD.INPUT.FILE.M201410).
This file(ABC.PROD.INPUT.FILE.M201410) changes every 1/2 months. How to read Dataset(ABC.PROD.INPUT.FILE.M201410) as an input
in our JCL?
The JCL will call COBOL/SAS Program to proces the Dataset(ABC.PROD.INPUT.FILE.M201410)
Coming to the requirement it is quite simple. If you understoood the problem, then it is already more than once here. All you need is to pick a file name from another file and submit the jcl.
Assuming that you want the first file listed in the trigger file as input file, use the following jcl
The File ABC.DEF.D1 is appended with YYMMDD ----> DD is weekend(Sat) date. We are planning to run
on Monday by function DATE1 -2 to pick the previous Saturday.
With the Below command , we receive output with CCYY.
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Mon Dec 09, 2019 4:25 am Post subject:
Is this JCL question or a sort question? The two things are not the same. And why is it tagged onto a 5 year old topic? _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Mon Dec 09, 2019 9:24 am Post subject: Re: Parameterize Dataset Name
jayram99 wrote:
The File ABC.DEF.D1 is appended with YYMMDD ----> DD is weekend(Sat) date. We are planning to run
on Monday by function DATE1 -2 to pick the previous Saturday.
With the Below command , we receive output with CCYY.
Please advise if there is any function to capture previous weekend date if job is run Next Week( Sunday or Monday)
DFSORT has PREVDday function which can be used to calculate the previous specified day for a date field. As a simple example, you could use the following to calculate the previous Saturday for a P'CCYYMMDD' date as a C'YYMMDD' date:
Code:
81,8,Y4T,PREVDSAT,TOGREG=Y2T
The above will pick the prior Saturday date when this job runs on Mon - Sat. For example today is Monday December 9th and you can run this job from today till December 14th(Saturday( and it will show the date as 191207 which is a prior Saturday(December 7th). But if you run it on Sunday December 15th then it will show the date as 191214.
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