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
Warnings : 2

Senior Member


Joined: 29 Apr 2008
Posts: 1231

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: 2815
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 passing symbolic parameters through d... JCL & VSAM 3
No new posts Read file names from existing file th... DFSORT/ICETOOL 6
No new posts define 1 DCB parms for multiple outpu... JCL & VSAM 9
No new posts Copy a DS Member to multiple users at... TSO/ISPF 8
No new posts Cobol code- to find a string in a str... COBOL Programming 3
Search our Forums:

Back to Top