MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Horizontol to Vertical format in Syncsort

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
sivafdms
Intermediate


Joined: 29 May 2007
Posts: 165
Topics: 77

PostPosted: Wed May 25, 2016 9:28 am    Post subject: Horizontol to Vertical format in Syncsort Reply with quote

Hi All,

I want my records to be written in veritical format as shown .

LRECL =110
RECFM =FB

Input
Code:


Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 CW           ,2016-05-23,                10                             
000002 CS           ,2016-05-24,                12                             
000003 GS           ,2016-05-23,                 3                             
000004 GS           ,2016-05-24,                48                             
000005 GS           ,2016-05-25,               465                             
000006 FD           ,2016-05-23,                10                             
000007 FD           ,2016-05-24,                20                             
****** **************************** Bottom of Data ****************************


Output

Code:


Command ===>                                                  Scroll ===> CSR             
****** ***************************** Top of Data ******************************           
000001 Date         ,CW                ,CS                ,GS                ,FD                ,
000002 2016-05-23   ,                10,                12,                 3,                10,
000003 2016-05-24   ,                 0,                 0,                48,                20,
000004 2016-05-25   ,                 0,                 0,               465,                 0,
****** **************************** Bottom of Data ****************************                     

Thanks,
Siva
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed May 25, 2016 1:30 pm    Post subject: Reply with quote

sivafdms,

your desired output does not match the input. For GS you don't have a value for 05-23 date but you show it and for 05-24 you have GS data of 12 but you show zero.

Either way since you are using syncsort, here is an outline

1. Sort the file based on date
2. Use OUTREC IFTHEN to arrange the data based on the indicator
3. Use SECTIONS on date to write a single record.
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group