View previous topic :: View next topic
|
Author |
Message |
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
Hi, trying to do multiple find/replace on the same dataset via sort/iceman:
for example, 2 changes:
C 'N1' 'N2' 22 ALL
C X'10' X'01' 8 ALL
This is what i have:
//SYSIN DD *
OPTION COPY
INREC IFTHEN=(WHEN=(22,2,CH,EQ,C'N1'),OVERLAY=(22:C'N2')),
IFTHEN=(WHEN=(8,1,CH,EQ,X'10'),OVERLAY=(8:X'01'))
/*
the 1st IFTHEN works, but 2nd does not.
also, another question:
can i make the change to the exact same dataset? the sortin dsn = sortout dsn?
thanks |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
disregard, i'm able to resolve it now using HIT=NEXT parameter |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
my other question is:
can i make the change to the exact same dataset? the sortin dsn = sortout dsn? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2022 Location: USA
|
|
|
|
dot1q3 wrote: |
my other question is:
can i make the change to the exact same dataset? the sortin dsn = sortout dsn? |
Yes you can specify the same DSN for both //SORTIN and //SORTOUT.
Nevertheless, the change is not done in-place; the dataset will be overwritten in full (using a hidden intermediate dataset).
The SORT utilities do have no option to update in-place.
P.S.
The same DSN cannot be specified twice in the same job step for a temporary dataset (such as DSN=&&TEMPDATA). Even DSN-reference like DSN=*.SORTIN works only for permanent DSNs.
P.P.S.
When I had exactly the same questions during my career, I was simply running my own tiny tests, rather than appealing to forums with every thingy. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
dot1q3 wrote: |
disregard, i'm able to resolve it now using HIT=NEXT parameter |
please use code tags going forward. |
|
Back to top |
|
|
|