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
 

 

Syncsort to Convert records to Column

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
sreejeshcs

New User


Joined: 28 May 2007
Posts: 26
Location: Pune

PostPosted: Sun Nov 03, 2013 2:50 am    Post subject: Syncsort to Convert records to Column
Reply with quote

I need a help to convert to the below row data to columns

I/P:
4770900777
4770979464
4770977464
4770220674
4779077492
4779249942
4779707770
4779406079
4779442744
4772704490
4772727777
4772727702

O/P
4770900777, 4770979464, 4770977464, 4770220674, 4779077492
4779249942, 4779707770, 4779406079, 4779442744, 4772704490
4772727777, 4772727702

Grouping of 5 records to Columns.

Can some one help?
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Mon Nov 04, 2013 10:29 am    Post subject:
Reply with quote

Hi,

try this
Code:
  SORT FIELDS=COPY                                                 
  INREC IFTHEN=(WHEN=INIT,                                         
                OVERLAY=(11:SEQNUM,3,ZD)),                         
        IFTHEN=(WHEN=INIT,                                         
                OVERLAY=(14:11,3,ZD,MOD,+5,EDIT=(T))),             
        IFTHEN=(WHEN=GROUP,END=(14,1,ZD,EQ,0),PUSH=(15:ID=1)),     
        IFTHEN=(WHEN=GROUP,BEGIN=(14,1,ZD,EQ,01),PUSH=(016:1,10)), 
        IFTHEN=(WHEN=GROUP,BEGIN=(14,1,ZD,EQ,02),PUSH=(026:1,10)), 
        IFTHEN=(WHEN=GROUP,BEGIN=(14,1,ZD,EQ,03),PUSH=(036:1,10)), 
        IFTHEN=(WHEN=GROUP,BEGIN=(14,1,ZD,EQ,04),PUSH=(046:1,10)), 
        IFTHEN=(WHEN=GROUP,BEGIN=(14,1,ZD,EQ,00),PUSH=(056:1,10))   
 OUTREC IFTHEN=(WHEN=(14,1,ZD,EQ,01),                               
               BUILD=(1,25)),                                       
        IFTHEN=(WHEN=(14,1,ZD,EQ,02),                               
               BUILD=(1,25,C',',26,10)),                           
        IFTHEN=(WHEN=(14,1,ZD,EQ,03),                               
               BUILD=(1,25,C',',26,10,C',',36,10)),                 
        IFTHEN=(WHEN=(14,1,ZD,EQ,04),                               
               BUILD=(1,25,C',',26,10,C',',36,10,C',',46,10)), 
        IFTHEN=(WHEN=(14,1,ZD,EQ,00),                           
   BUILD=(1,25,C',',26,10,C',',36,10,C',',46,10,C',',56,10))   
   OUTFIL REMOVECC,NODETAIL,BUILD=(16,54),                     
   SECTIONS=(15,1,TRAILER3=(16,54))                             




Gerry
Back to top
View user's profile Send private message
sreejeshcs

New User


Joined: 28 May 2007
Posts: 26
Location: Pune

PostPosted: Mon Nov 04, 2013 1:30 pm    Post subject: Reply to: Syncsort to Convert records to Column
Reply with quote

Its working icon_smile.gif

What to do if I need to present 7 rows in one line. ?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Nov 04, 2013 2:12 pm    Post subject: Reply to: Syncsort to Convert records to Column
Reply with quote

Work out how this one is working. Then you'll know what to do for seven.
Back to top
View user's profile Send private message
sreejeshcs

New User


Joined: 28 May 2007
Posts: 26
Location: Pune

PostPosted: Mon Nov 04, 2013 9:19 pm    Post subject: Reply to: Syncsort to Convert records to Column
Reply with quote

Can some one explain, the below 2 lines. I made changes but getting error in below 2 lines.

OUTFIL REMOVECC,NODETAIL,BUILD=(16,54),
SECTIONS=(15,1,TRAILER3=(16,54))
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1715
Location: UK

PostPosted: Mon Nov 04, 2013 10:04 pm    Post subject:
Reply with quote

1 - What error? Show it.
2 - REMOVECC, I believe, stands for REMOVE Carriage Control i.e. remove any printer control characters in column 1. The rest I do not know well enough to say but I m not going to look up the manual because you can do that yourself.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Mon Nov 04, 2013 10:20 pm    Post subject: Reply to: Syncsort to Convert records to Column
Reply with quote

OUTFIL REMOVECC,NODETAIL,BUILD=(16,54),
SECTIONS=(15,1,TRAILER3=(16,54))

REMOVECC - as NicC says
NODETAIL - don't show detail lines, only HEADERn/TRAILERn lines
SECTIONS - define a section of a report, based on a control field, with HEADER3/TRAILER3 available
BUILD - I'm sure you know. I don't think it is necessary here (make that part of your investigation and let us know)

Gerry defined a GROUP with an ID, and the report produced (SECTIONS is a reporting feature, as are HEADERn/TRAILERn, hence the Printer Control Character in the first place) is your output file of "total lines". The TRAILER3 record simply contains bytes from position 16 for a length of 54 from the last record in the group..
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
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 Convert +9999999999999.99 to S9(12)V9(3) vnktrrd DFSORT/ICETOOL 8 Thu Nov 17, 2016 8:15 pm


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