Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to convert column to row

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

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Tue Mar 27, 2012 5:02 pm    Post subject: How to convert column to row
Reply with quote

Hi,

Could you please let me know if there are any techniques or any keywords used in sort card to convert columns to rows or vice verca.

I have a scenario where in I need the convert a column to row.

I/P file

Code:


ZIPCODES
---------

560001
560002
560003
560004
560005


O/P file should look like
Code:


ZIPCODES
----------

'560001','560002','560003','560004','560005'


Can this be obtained using SORT?
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Mar 27, 2012 5:24 pm    Post subject: Reply to: How to convert column to row
Reply with quote

You've posted in the JCL forum, which is where Syncsort questions go.

Do you have Syncsort?

EDIT: Also, do you have rules for which are to be blocked together, or is it just the entire file?
Back to top
View user's profile Send private message
Raghuraman_New

New User


Joined: 03 Oct 2008
Posts: 43
Location: Chennai,India.

PostPosted: Tue Mar 27, 2012 5:48 pm    Post subject:
Reply with quote

Yes I do have a SYNCSORT. I need to convert the column of the entire file.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Tue Mar 27, 2012 5:57 pm    Post subject: Reply to: How to convert column to row
Reply with quote

Try this one out.
Back to top
View user's profile Send private message
xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Wed Mar 28, 2012 10:34 am    Post subject:
Reply with quote

Hello,

As you posted, your O/P file displays with the records enclosed in quotes and comma was included to seperate the other records.

Is this also expected in your O/P file.
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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Convert CLIST to REXX cvnlynn CLIST & REXX 12 Tue Jun 27, 2017 2:06 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us