|
View previous topic :: View next topic
|
| Author |
Message |
Deepti_R
New User
Joined: 07 Nov 2019 Posts: 3 Location: USA
|
|
|
|
Hello everyone,
I'm trying to compare the values at different positions in the file and if the value matches then overlay. Instead of hard coding the value can I compare the values at the positions? If I hard code as
OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,C'111111'),
OVERLAY=(40:C'999999')) then this works file
but instead of hardcoding 111111 if I mention I position then it gives error,
OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6) --- > INCLUDE/OMIT INVALID FORMAT |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
Try this.
| Code: |
| OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6,CH),OVERLAY=(40:C'999999')) |
|
|
| Back to top |
|
 |
Deepti_R
New User
Joined: 07 Nov 2019 Posts: 3 Location: USA
|
|
|
|
Thanks, it worked.. |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2275 Location: USA
|
|
|
|
| Deepti_R wrote: |
Hello everyone,
I'm trying to compare the values at different positions in the file and if the value matches then overlay. Instead of hard coding the value can I compare the values at the positions? If I hard code as
OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,C'111111'),
OVERLAY=(40:C'999999')) then this works file
but instead of hardcoding 111111 if I mention I position then it gives error,
OUTREC IFTHEN=(WHEN=(6,6,CH,EQ,40,6) --- > INCLUDE/OMIT INVALID FORMAT |
WHEN=(6,6,CH,EQ,40,6,CH) |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|