|
View previous topic :: View next topic
|
| Author |
Message |
mkk157
Active User

Joined: 17 May 2006 Posts: 310
|
|
|
|
My file length is 120 characters.
My requirement is to change
1) the string @ location 12 from 'A1' to 'K7'
AND
2) the string @ location 43 from 'B1' to 'K8'
I used the following sort card.
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(12,2,CH,EQ,C'A1'),OVERLAY=(12:C'K7'),
IFTHEN=(WHEN=(43,2,CH,EQ,C'B1'),OVERLAY=(43:C'K8'))
/* |
Result:
A1 is replacing with K7 successfully, since the first condition is satisfied, the second condition is not being processed and the record gets processed.
Please let me know how to achieve this requirement. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Read about HIT=NEXT. . . |
|
| Back to top |
|
 |
mkk157
Active User

Joined: 17 May 2006 Posts: 310
|
|
|
|
thanks dbzTHEdinosauer & dick.
I got it now. |
|
| Back to top |
|
 |
dick scherrer
Moderator Emeritus

Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
| Back to top |
|
 |
|
|