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

Sort vertical rows into horizontal


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

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Wed Aug 18, 2010 5:37 pm
Reply with quote

Hi,
I have FB file of length 80 with the data like this.

0001
ABCDE
0002
DEFGH
DEFGH
0003
JKLMN
JKLMK
0003
ABCDE
ABCDE
ABCDE

I want to have the output file like this.
0001 ABCDE
0002 DEFGH
0002 DEFGH
0003 JKLMN
0003 JKLMK
0003 ABCDE
0003 ABCDE
0003 ABCDE

Is this possible thru SYNCTOOL RELEASE 1.6.0 ?

Thanks
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 496
Location: USA

PostPosted: Thu Aug 19, 2010 12:28 am
Reply with quote

Here are the control statements for a SyncSort for z/OS 1.3.2 job that will do what you asked:
Code:
//SYSIN   DD *
  SORT FIELDS=COPY 
  OUTREC IFTHEN=(WHEN=GROUP,BEGIN=(1,4,ZD,EQ,NUM),PUSH=(81:1,4))
  OUTFIL INCLUDE=(1,4,ZD,NE,NUM),BUILD=(81,4,1X,1,80)
/*         

However, since you had asked for a SYNCTOOL 1.6.0 job, I assume that you are running an older release of SyncSort which does not support the WHEN=GROUP function. If this is true, then you will need an alternate solution.
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 To get the count of rows for every 1 ... DB2 3
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top