Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 22
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: 22
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: 1239
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 Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us