View previous topic :: View next topic
|
Author |
Message |
sen_1983us
New User
Joined: 21 May 2005 Posts: 21 Location: Hyderabad
|
|
|
|
I want to format this record using the delimiter ",",please advise
Input:
BOTH,123456789,1234567Q,123456,0,DB,Q1
Output :
BOTH 123456789 1234567Q 123456 0 DB Q1
Note : 4th and 5th filed is variable field (maximun 15 bytes) |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
you can try this
Code: |
//STEP0001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
BOTH,123456789,1234567Q,123456,0,DB,Q1
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
* CHANGE ',' TO ' '
ALTSEQ CODE=(6B40)
OUTREC BUILD=(1,80,TRAN=ALTSEQ)
/*
|
Gerry |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I'd use these DFSORT control statements (don't have to worry about field length):
Code: |
OPTION COPY
INREC FINDREP=(IN=C',',OUT=C' ')
|
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:
www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000080 |
|
Back to top |
|
|
|