View previous topic :: View next topic
|
Author |
Message |
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
I want to write a field if it greater than spaces into a file using OUTREC.
Please suggest.
Field is from 6(start pos) and is of 8 bytes and is character format. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I believe that you really do need to give just a whole lot more detail than you have.
Which sort product and release level are you using.
DSORG, RECFM and LRECL of both input and output files.
Exactly what do you want to write out, just that field or the whole record, or subsets of that record. |
|
Back to top |
|
|
sandhyaimmadi
New User
Joined: 18 Aug 2008 Posts: 50 Location: Bangalore
|
|
|
|
I am using DFSORT.
DSORG is PS,RECFM=FM , LRECL=400 is for both inp and output files
I just want to write only that field to output file. |
|
Back to top |
|
|
smijoss
Active User
Joined: 30 Aug 2007 Posts: 114 Location: pune
|
|
|
|
its still unclear wat you want. Do u mean to bypass records that have spaces in position 6 to 13
in that case sort card should be
Code: |
OPTION COPY
INCLUDE COND=(6,8,CH,NE,C' ')
OUTREC BUILD=(6,8)
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I want to write a field if it greater than spaces into a file using OUTREC. |
If that's what you really want to do, then you could use a DFSORT job like this:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
R1 ABCDEFGH
R2
R3 A
R4 B
R5
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INCLUDE COND=(6,8,CH,GT,C' ')
OUTREC BUILD=(6,8)
/*
|
SORTOUT would have these records:
If that's not what you want, then you need to do a better job of explaining what you do want. Show an example of your input records and expected output records. |
|
Back to top |
|
|
|