Joined: 16 Oct 2007 Posts: 3 Location: Hyderabad,India
I have sort a card where I am filtering data from 93 to 99 in present. Going forward, in year 2009, I need to fetch data from 93 to 2000. In 2010 it should be 93 to 2001, and so on.
My input file has a year fileds as 75,80,99,00 for 2000, 02 for 2002. i.e data are from 1975 to current 2008.
To fulfill my requirement, what is your advice?
1.any technique in syncsort where I can update a sort card dynamically
2.simple,write a COBOl program for same.
Joined: 16 Oct 2007 Posts: 3 Location: Hyderabad,India
Very Very thanks for your reply.
I have some problem in my execution.Please describe some fileds in detail.Below is my explanation,please correct me,if I am wrong..
1,2 - columns in input file
Date is funtion but I didn't get you about &DATE2 logic
Also please explain COND=(1,2,Y2C,GE,93,AND,1,2,Y2C,LT,5,2,Y2C)
Thank you.
&DATE2-108 inserts the current system date and subtracts 108 months (9 years) as per your specifications. The format of this field is yyyymm.
INCLUDE COND=(1,2,Y2C,GE,93,AND,1,2,Y2C,LT,5,2,Y2C) says to include the records when field 1,2 in Y2C format (which is yy) is greater than or equal to 93, AND when this field is also less than field 5,2 which is the last 2 digits of the year portion we inserted via INREC.
For example, if we ran this job today, the &DATE2-108 field in the INREC statement would be processed as 199909. So if your data record was originally 93, then after INREC processing it would be 93199909 (Field 5,2 is 99).
Hope this helps. Let me know if you have any further questions.
Please note, support for &DATEx-n was included in SyncSort for z/OS 1.3. If you are attempting to run this job with an earlier release of the product, you will get the following error:
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Sharad Kumar,
If you don't have the latest version installed, still you can achieve this using the below Syncsort job which works with my version which is SyncSort for z/OS 1.2.