Posted: Mon May 21, 2007 11:31 am Post subject: sort card that filters records with current date
Hi,
I have a input file that has a date as one of its fields. I need to sort and filter the records from the input file to the output file with records that
has the date value as the current date in the date field of input file.
It worked fine, but my input file has the date in the format CYYMMDD
(For Example: 1060510) and the type is packed decimal. Can you pls let me know will the sort card work for this input???
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Mon May 21, 2007 12:21 pm Post subject:
nagarajan.dharani,
Assuming that your input file is 80 bytes FB recfm dataset and the date field starts at position 1 for 4 bytes the following control cards will give the desired results
Thanks a lot for your help...It worked fine for me.
I've another requirement that if the current date is not taken from the system but the current date of a particular application is stored in a VSAM file(May be called date file). Now I have to check whether the date in my input file is equal to the date in the date file as we checked if the date is equal to the current date. Can you pls let me know is it possible to do a sort now?
Thanks a lot for your help!!! It worked fine for my requirement.
Is there any command to get the current century and year from the system using sort card?? I am not so much aware of sort card. So can you pls help me out??
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
Posted: Thu May 24, 2007 8:05 am Post subject:
are you aware of the Sort manual - there is a link to it at the top of the page. It can tell you all you need to know - and more whereas we can only tell you what we know - which in my case is next to nothing _________________ Utility and Program control cards are NOT, repeat NOT, JCL.
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Thu May 24, 2007 8:28 am Post subject:
Quote:
Is there any command to get the current century and year from the system using sort card?? I am not so much aware of sort card. So can you pls help me out??
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 14:23 ON THU MAY 24, 2007 -
SORT FIELDS=COPY
INCLUDE COND=(01,10,CH,EQ,&DATE1(/))
$
ICE113A E COMPARISON FIELD ERROR
ICE751I 0 C5-K05352 C6-Q95214 C7-K90000 C8-K05352 E7-K90000
ICE052I 3 END OF DFSORT
Is it that i do not have latest version of DFSORT April 2006 PTF not installed ? _________________ Shekar
Grow Technically
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Sat May 26, 2007 1:04 pm Post subject:
shekhar123,
You can do what you want without the April, 2006 PTF like this:
Code:
SORT FIELDS=COPY
INCLUDE COND=(01,10,CH,EQ,DATE1(/))
The &DATE forms were added to DFSORT with the April, 2006 PTF, but the DATE forms without the & were available long before that.
(I've never understood the need for the & forms, but we added the ones we were missing for ease of migration.) _________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
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