IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to sort record type code within the same policy ?


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
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
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

Superior Member


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

PostPosted: Mon Apr 07, 2014 4:47 pm
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: 2455
Location: Hampshire, UK

PostPosted: Mon Apr 07, 2014 4:48 pm
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
Reply with quote

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

Superior Member


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

PostPosted: Mon Apr 07, 2014 5:15 pm
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: 2455
Location: Hampshire, UK

PostPosted: Mon Apr 07, 2014 8:39 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
Search our Forums:

Back to Top