View previous topic :: View next topic
|
Author |
Message |
raj12vel
New User
Joined: 20 Dec 2008 Posts: 43 Location: New Jersey
|
|
|
|
Hi All,
Input file has LRECL of 600 Fixed Bytes.
There are some numeric fields presents in the input file with two decimals.
For Ex:
36,744.00
Comma and decimal point needs to be removed from these values.So I have used FINDREP option to perform this.
Code: |
//SYSIN DD *
OPTION COPY
INREC FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150)
//* |
It worked fine. Now I want to use the same concept for all the numeric fields which are at different positions. Below code ended with syntax
error.
Code: |
//SYSIN DD *
OPTION COPY
INREC FINDREP=((INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150),
(INOUT=(C',',C'',C'.',C''),STARTPOS=193,ENDPOS=198))
//* |
Can any one help me out from this issue? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You have to use IFTHEN clauses for that. Here's the correct DFSORT syntax:
Code: |
OPTION COPY
INREC IFTHEN=(WHEN=INIT,
FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=117,ENDPOS=150),
HIT=NEXT),
IFTHEN=(WHEN=INIT,
FINDREP=(INOUT=(C',',C'',C'.',C''),STARTPOS=193,ENDPOS=198))
|
|
|
Back to top |
|
|
raj12vel
New User
Joined: 20 Dec 2008 Posts: 43 Location: New Jersey
|
|
|
|
It worked fine.
Thanks alot Frank. Its always great to learn new things from you!!!
I have used the same technique in different places where i have been struck with multiple conditions. |
|
Back to top |
|
|
|
|