View previous topic :: View next topic
|
Author |
Message |
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
I have 2 columns in the file and want to seperate the two columns with a space using the DFSORT. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You need to provide more information (your use of the term "columns" is amibiguous).
Please show an example of the records in the input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file. |
|
Back to top |
|
|
mkk157
Active User
Joined: 17 May 2006 Posts: 310
|
|
|
|
Frank,
Below are the Example records.
Code: |
Input File
4501989762520021
1243875415450033
4201384242520022
3456789162520012
Output File:
450198976252 0021
124387541545 0033
420138424252 0022
345678916252 0012 |
|
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hello M KK,
Please use below sortcard depending upon ur inputs
Code: |
OPTION COPY
OUTREC FIELDS=(1,12,X,13,4) |
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If your input file has RECFM=FB and you want the output file to have RECFM=FB and LRECL=n where n > 26, you can use a DFSORT job like the following:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
OUTREC FIELDS=(1,12,X,13,4,n:X)
/*
|
So if you want output LRECL=80, you would use 80:X.
If you want output LRECL=26, use:
Code: |
OUTREC FIELDS=(1,12,X,13,4)
|
|
|
Back to top |
|
|
|