View previous topic :: View next topic
|
Author |
Message |
bshkris
New User
Joined: 21 Mar 2005 Posts: 41 Location: pune
|
|
|
|
Hi,
I am using SYNCSORT utility. I have a challange that i using one input file of length 2500 bytes, and o/p file also having same length.
in input file i have Cliam-Id &Timestamp as fields. Along with theese fields so many fields are presented.
My requirement is i want to sort on the following scenario.
i/p file--
claim id Time stamp
-------- -------------
1234 2002101010
1234 2002103030
1234 2010104999
1235 2010104998
o/p file
------
1234
1235
ws-skip cnt : 1
ws read: 3
The claim id should sorted in ascending, and if it finds more duplicates ,in that case Time stamp should be sorted in Decending order.
Thanks,
Hari |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Just define 2 sort fields. Make the claim-id ascending and the time-stamp descending. It will not matter if there are duplicates in the claim-id.
Something like:
Code: |
SORT FIELDS=(1,4,CH,A,6,10,CH,D), etc. . . |
should do what you want. |
|
Back to top |
|
|
bshkris
New User
Joined: 21 Mar 2005 Posts: 41 Location: pune
|
|
|
|
Hi,
I have 2 date feilds in input file.
Let say the date feilds starts in below positions
Length start pos end pos
DATE1 10 308 317
DATE2 10 318 327
I have date1 value 2014-09-23. Now i want to add 9months to date1 and place it in date2 feild.
I was able to calculate 1 year to date1 but failed to add 9 months.
The below is sort card for adding one year.
OUTREC FIELDS=(1,317,318,4,ZD,ADD,+1,EDIT=(TTTT),322,29)
the file's total length is 350 bytes, our date feilds exists from 308 to 327 bytes.
If any one has idea how to do calculate the 9 months advanced date from given input value by using sort card, please let me know.
Appriciate your help.
Thanks. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Please start a new topic instead of adding onto a 7-yr old one. |
|
Back to top |
|
|
|