Posted: Tue Feb 01, 2011 1:12 pm Post subject: EZACFSM1 utility
1.Can anyone please let me know if I want to have the month name.
I mean my reqmt is to have JAN,FEB,MAR to DEC rather than having 01 to 12 by coding &MON.
2.If the Job A started running on 31st Jan 11:50PM (TSO time/mainframe server time) and ended at 1st Feb 12:02 AM, I would like to have date as 31 and month as Jan and not FEB populated in the file name.
3.if the Job A that is scheduled to run by everyday evening 11.50PM and because of previous jobs in late queue, JOB A is delayed to start running by 12.10AM the next day, the file name should be the scheduled run date date and month. I am using OPC scheduler. My shop expert is not aware about this.
Please help me in this scenario. I tried in google and other searches... iam yet to find a solution.
I don't see any that exist for the month name. You'll have to use some other program for that value.
I'm not familiar enough with OPC to even venture a guess. Maybe you could look at defining all of the necessary variables way ahead of time at the start of your daily batch cycles, and just base them on the current time-of-day clock.
Additional details :
My actual reqmt is to have ftp control card like below :
Code:
MKDIR wwm\fgr\2011\feb\01\file\filename.
2011\feb\01\ will be changing on every run. 2011 is fitted by&YR4 and date with &day.
But the problem I cited in point 2 and 3 is pretty complex. Always job runs delay.
i.e 31st Jan file generates on 1st Feb.
I have to refer 31st Jan file but as per symbolics, it denotes 1st FEB. Close to subtracting 1 from date. (even it is Mar 1 st or Feb 1st) Iam not sure whether I can subtract date from symbolic itself. And FINDREP will not be a perfect choice. if i take care of date I miss month manipulation in case 1feb and 31st jan. Can anyone update me your viewpoint.
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Wed Feb 02, 2011 1:39 pm Post subject:
radkrish82 wrote:
My actual reqmt is to have ftp control card like below :
Code:
MKDIR wwm\fgr\2011\feb\01\file\filename.
2011\feb\01\ will be changing on every run. 2011 is fitted by&YR4 and date with &day.
But the problem I cited in point 2 and 3 is pretty complex. Always job runs delay.
i.e 31st Jan file generates on 1st Feb.
I have to refer 31st Jan file but as per symbolics, it denotes 1st FEB. Close to subtracting 1 from date. (even it is Mar 1 st or Feb 1st) Iam not sure whether I can subtract date from symbolic itself. And FINDREP will not be a perfect choice. if i take care of date I miss month manipulation in case 1feb and 31st jan. Can anyone update me your viewpoint.
If I understand correctly, your job runs daily at 11:50 pm and sometimes it gets delayed and may run the next day. You can also validate the time of job running and adjust the month name accordingly. You can give a buffer upto 10 AM on the following day and it would still have yesterday's date.
If the job runs between 00.00.00 (midnight) - 10:00:00 AM (morning 10 am) then the job will have current date - 1 day date if not then it will have current date. Is that ok with you? _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Wed Feb 02, 2011 4:05 pm Post subject:
just thinking out loud...
create a dataset with what you want for a date in a format that can be manipulated when the job runs as it's only record.
For example: 2011031
then before your ftp runs... read that record and
That date can then be formatted using rexx or what ever into the control card that you need for your FTP.
Then run your ftp.
Then use rexx or whatever again to add one day to that date so it can be used for the next days run.
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Thu Feb 03, 2011 11:48 am Post subject:
radkrish82,
Use the following DFSORT JCL which will give you the desired results. If the job runs between midnight (000000) and 10 am (100000) then you will have current date-1 else you will have current date.
techincally awesome. I will try tomrw morning once i reach my desk.
Instead of build i will use overlay IFTHEN=(WHEN=1,5,ch,eq,'MKDIR').
I think i need to give the condition(MKDIR is found) in OUTREC IFTHEN before findrep
Thanks, Kolusu.
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
Posted: Wed Feb 23, 2011 12:15 pm Post subject:
radkrish82,
You really need to understand how the control cards work. You just can't use the same when your input changes. I showed you an example of how to check the time and adjust the date without any regards to what the input is. I was just building the record with just date and time using INREC
Use the following DFSORT JCL which will build a dynamic FINDREP statement to replace the 'YEAR\JAN\01' with appropriate year\month\day with a test of time.
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