How to convert a Flat PS file to CSV file using sort card.

In this Mainframe Forum - You can post your queries on DFSORT, ICETOOL , SyncSort & JCL Utilities

Moderators: Frank Yaeger, Moderator Group

Post Reply
AnithaReddyT
Member
Posts: 2
Joined: Wed Nov 07, 2012 5:40 am

How to convert a Flat PS file to CSV file using sort card.

Post by AnithaReddyT » Wed Nov 07, 2012 5:48 am

Can anyone please help me by provinding a sort card for conversion of a flat file to a CSV file. Thanks!

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Wed Nov 07, 2012 8:33 am

Not until you provide enough detail for someone to help you.

Show some input records and the output you want from the sample input records.

If there are any selecton or processing rules, you need to mention them.
Have a good one

AnithaReddyT
Member
Posts: 2
Joined: Wed Nov 07, 2012 5:40 am

Post by AnithaReddyT » Wed Nov 07, 2012 9:53 am

Hi

My PS file with Record Lentgh = 320, RECFM = FB, has below rows
04QF 1938 04NOV1201Y0115115000051 PER ASP
04QF 1938 04NOV1202Y0115040064104 ASP DRW

My output file i.e., (Comma Separated Value/.CSV) should come as

04,QF ,1938, ,04NOV12,01,Y,0,115,115,000,051, ,PER, ,ASP,
04,QF ,1938, ,04NOV12,02,Y,0,115,040,064,104, ,ASP, ,DRW,

I want to write my input flat file into CSV file format because I want the data exported to excel sheet directly from the mainframe dataset.
Please let me know if you want more details.
Thanks & Regards

William Collins
Active Member
Posts: 732
Joined: Thu May 24, 2012 4:07 am

Post by William Collins » Wed Nov 07, 2012 12:46 pm

Code: Select all

OPTION COPY

INREC BUILD=(1,4,C','14,1,C',',6,4,C','...

etc

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others