op
New User
Joined: 31 Oct 2006 Posts: 48 Location: Chennai
|
|
|
|
Hi,
I have an request as follows:
The input file is as follows:
The input file is of LRECL 6.
It represents 3 variables each of length 2 characters(Totally 6 characters)
If any of the fields is SPACES, it should be replaced with '00'.
Note: More than 1 field can be spaces in a single record.
Please provide an optimum solution.
Thanks in advance.
Regards,
OP |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
op,
Here's a DFSORT job that will I think you asked for. I assumed that if any character in a field is not '0'-'9', you want '00' for that field. If that's not what you want, then please explain exactly what you do want.
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (FB/6)
//SORTOUT DD DSN=... output file (FB/6)
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(1,2,FS,NE,NUM),OVERLAY=(1:C'00'),HIT=NEXT),
IFTHEN=(WHEN=(3,2,FS,NE,NUM),OVERLAY=(3:C'00'),HIT=NEXT),
IFTHEN=(WHEN=(5,2,FS,NE,NUM),OVERLAY=(5:C'00'))
/*
|
|
|