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
 

 

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: 1712
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: 1712
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 What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm


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