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

Sort records by keeping order intact.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Sun Jan 17, 2010 7:51 pm
Reply with quote

Hi

My input (RECFM=FB, LRECL=34) appears as shown below:

Code:

----+----1----+----2----+----3----+
0187               XONTROP
0187               ZBASEON+BASETO+
0159               XONYLKM
0159               ZBASEZK+BASEMO+
0112               XONFAIL
0112               ZBASEFA+BASEFA+
0159               XONFALL
0159               ZBASEFL+BASEFL+
0187               XONFREE
0187               ZBASEFR+BASE11+


I need the output to be like shown below:

Code:

0112               XONFAIL
0112               ZBASEFA+BASEFA+
0159               XONYLKM
0159               ZBASEZK+BASEMO+
0159               XONFALL
0159               ZBASEFL+BASEFL+
0187               XONTROP
0187               ZBASEON+BASETO+
0187               XONFREE
0187               ZBASEFR+BASE11+


Please help.

Thanks.
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Sun Jan 17, 2010 7:52 pm
Reply with quote

Sorry I missed out this.... icon_smile.gif
We are at Syncsort v1.3.2.

Thanks.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Sun Jan 17, 2010 11:35 pm
Reply with quote

ramsri,
try this sort card.

Code:

 SORT FIELDS=(1,4,CH,A),EQUALS

 


Thanks
Krishy
Back to top
View user's profile Send private message
ramsri

Active User


Joined: 18 Oct 2008
Posts: 380
Location: India

PostPosted: Mon Jan 18, 2010 9:37 pm
Reply with quote

Hi,

Thanks.

How to change sort card if the i/p data has headers and trailers?

Input:
Code:

----+----1----+----2----+----3----+
HDR
0187               XONTROP
0187               ZBASEON+BASETO+
0159               XONYLKM
0159               ZBASEZK+BASEMO+
TLR
HDR
0112               XONFAIL
0112               ZBASEFA+BASEFA+
0159               XONFALL
0159               ZBASEFL+BASEFL+
0187               XONFREE
0187               ZBASEFR+BASE11+
TLR


Output:
Code:

----+----1----+----2----+----3----+
HDR
0159               XONYLKM
0159               ZBASEZK+BASEMO+
0187               XONTROP
0187               ZBASEON+BASETO+
TLR
HDR
0112               XONFAIL
0112               ZBASEFA+BASEFA+
0159               XONFALL
0159               ZBASEFL+BASEFL+
0187               XONFREE
0187               ZBASEFR+BASE11+
TLR


Thanks.
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 -> JCL & VSAM

 


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 Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top