Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Want to sort on the following scenario using SYNCSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
bshkris

New User


Joined: 21 Mar 2005
Posts: 29
Location: pune

PostPosted: Wed Jan 17, 2007 9:04 pm    Post subject: Want to sort on the following scenario using SYNCSORT
Reply with quote

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
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jan 17, 2007 9:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bshkris

New User


Joined: 21 Mar 2005
Posts: 29
Location: pune

PostPosted: Tue Jul 08, 2014 1:02 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Jul 08, 2014 6:40 pm    Post subject:
Reply with quote

Please start a new topic instead of adding onto a 7-yr old one.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts OC4 in SORT Mohan Kothakota DFSORT/ICETOOL 2 Tue Sep 12, 2017 6:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us