IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Multiple find/replace on the same dataset


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Sep 15, 2021 3:47 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Sep 15, 2021 4:39 am
Reply with quote

disregard, i'm able to resolve it now using HIT=NEXT parameter
Back to top
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Sep 15, 2021 4:39 am
Reply with quote

my other question is:

can i make the change to the exact same dataset? the sortin dsn = sortout dsn?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2022
Location: USA

PostPosted: Wed Sep 15, 2021 5:18 am
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Sep 15, 2021 10:45 am
Reply with quote

dot1q3 wrote:
disregard, i'm able to resolve it now using HIT=NEXT parameter
please use code tags going forward.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top