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
 
How to sort record type code within the same policy ?

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

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Mon Apr 07, 2014 4:33 pm    Post subject: How to sort record type code within the same policy ?
Reply with quote

This is the current state of records in the file:
Code:

03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
02        11    YHB0004489
01        11    YHB0004489
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
02        11    YHB0004536
01        11    YHB0004536


I want to achieve this:

Code:

01        11    YHB0004489
02        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
03        11    YHB0004489
01        11    YHB0004536
02        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536
03        11    YHB0004536


My shop uses SYNCSORT.

Please advise, how to achieve the above.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 07, 2014 4:47 pm    Post subject:
Reply with quote

I'm not sure if I've missed something to follow the output from input, but is not it a simple case of sorting data on 3rd filed and then on 1st?

Code:
  SORT FIELDS=(f3,length,UFF,A,f1,length,CH,A)
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1950
Location: UK

PostPosted: Mon Apr 07, 2014 4:48 pm    Post subject: Reply to: How to sort record type code within the same polic
Reply with quote

What have you tried? What was wrong with that? It looks as though you want to sort on columns 1 & 2 within columns wherever YHB0004xxx are. Is that the case? If so , your major sort key is the column where YHB starts for 10 bytes and your minor key is column1 for 2 bytes. Unless there is something that you have not told us?
Back to top
View user's profile Send private message
mohammad amir ashraff

New User


Joined: 08 Feb 2008
Posts: 23
Location: Hyderabad

PostPosted: Mon Apr 07, 2014 4:55 pm    Post subject:
Reply with quote

Thank you Anuj, your option worked.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Apr 07, 2014 5:15 pm    Post subject:
Reply with quote

Thanks for the feedback - as they say, even a blind squirrel finds an acorn once in a while.

Nic had the same suggestion too but a timestamp error occurred in between, looks like... icon_smile.gif
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1950
Location: UK

PostPosted: Mon Apr 07, 2014 8:39 pm    Post subject: Reply to: How to sort record type code within the same polic
Reply with quote

Anuj, Nope - I was just more verbose. Your post was not there when I started but was there when I finished.
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 How to select record x+7 or x+2 based... JoAnn Kulcyk SYNCSORT 6 Tue Jan 16, 2018 10:49 pm
No new posts SORT BUT RETAIN HIGHEST VALUE ON NON-... leondan22 DFSORT/ICETOOL 2 Thu Dec 14, 2017 8:13 pm
No new posts IBEGENER RETURN CODE 12 anilkumar922 All Other Mainframe Topics 5 Wed Dec 13, 2017 11:41 am
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Finding the plan when code compiled u... Ahemad DB2 1 Fri Dec 01, 2017 6:38 pm

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