Posted: Mon Feb 02, 2009 6:49 am Post subject: dynamic sort card generation
Hi,
I want to construct the sort card to extract records in current date.
INCLUDE COND=(65,10,CH,EQ,C'02/02/2009')
Here the date needs to be changed based on current date.
Is it possible to do it in jcl itself? or do i need to write a cobol program to construct this sort card?
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Feb 02, 2009 11:38 am Post subject:
It's not a new feature. PICKDATE is a DFSORT Symbol created from system symbols for the parts of the date (mon, day, year) using an S-constant. The use of S-constants for DFSORT Symbols has been available since April, 2006. It's fully documented in "z/OS DFSORT Application Programming Guide" available at:
Thanks a lot kolusu. It works.
Also, is there any S constant available for time?
My requirement is to filter records having "current time - 1 hour " in the time field of the record. In the input record, time field is in "HH:MM" format.(E.G 22.10, 07.10)
From the ibm link provided by Frank, I could see the reserved words TIME1, TIME1P etc.. but am not able to find out the usage of those keywords.. Please help me in this..
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Tue Feb 03, 2009 11:09 am Post subject:
kanitha-mvs wrote:
My requirement is to filter records having "current time - 1 hour " in the time field of the record. In the input record, time field is in "HH:MM" format.(E.G 22.10, 07.10)
What happens if the Job is running between midnight (12:00 and 01:00 AM)? _________________ Kolusu
www.linkedin.com/in/kolusu
This job would be scheduled in OPCE in one hour interval. So it would run exactly at 00.00 and 01.00. In 00.00 run, I would need to check the records with value in time column between 11.00 PM and 00.00 AM. Is this possible to do in JCL? or should I write cobol program to accomplish this task? Please give me suggestion..
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Feb 05, 2009 11:50 am Post subject:
kanitha-mvs,
The following JCL will give you the desired results. I assumed that your input file is 80 bytes LRECL and FB format. The date in the file begins at pos 65 and the time at pos 75 for 5 bytes.
This job picks the records in range hh.00 - hh.59
Code:
If job rub = 00.00 - 00.59
pick records with (current date -1) and time 23.00 - 23.59
else
pick records with current date and time (hh-1).00 - (hh-1).59
end-if
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