Need help in reformatting the records in output file

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

Moderators: Frank Yaeger, Moderator Group

Post Reply
anandmsteds
Member
Posts: 4
Joined: Fri Aug 01, 2008 6:09 pm

Need help in reformatting the records in output file

Post by anandmsteds » Wed Sep 17, 2008 10:25 pm

Hi Frends,

My Input file contain records like below

0258224KC S51008
0302969PS STS910
0421302RK STC052
0445563RN S5HD01
0461596PC S5HADI


Now i want these records in my output file as below

'0258224KC' 'S51008'
'0302969PS' 'STS910'
'0421302RK' 'STC052'
'0445563RN' 'S5HD01'
'0461596PC' 'S5HADI'


Kindly please help me here......


Thanks
Anand

User avatar
Frank Yaeger
Moderator
Posts: 812
Joined: Sat Feb 18, 2006 5:45 am
Location: San Jose, CA
Contact:

Post by Frank Yaeger » Thu Sep 18, 2008 12:18 am

Here's a DFSORT job that will do what you asked for:

Code: Select all

//S1    EXEC  PGM=ICEMAN 
//SYSOUT    DD  SYSOUT=* 
//SORTIN DD DSN=...  input file 
//SORTOUT DD DSN=...  output file 
//SYSIN    DD    * 
  OPTION COPY 
  INREC BUILD=(C'''',1,9,C''' ''',11,6,C'''') 
/* 
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort

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