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
 

 

Sort vertical rows into horizontal

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

Active User


Joined: 30 Jul 2005
Posts: 182
Location: hyderabad

PostPosted: Wed Aug 18, 2010 5:37 pm    Post subject: Sort vertical rows into horizontal
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: 500
Location: USA

PostPosted: Thu Aug 19, 2010 12:28 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 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
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Row-Numbers of distinct rows? Auryn DB2 1 Thu Oct 20, 2016 4:38 pm


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