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

Repeat a DD line- comment and insert with new dataset name


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
justjpr

New User


Joined: 03 Nov 2022
Posts: 10
Location: INDIA

PostPosted: Tue Nov 08, 2022 7:57 pm
Reply with quote

My requirement:

INPUT LINE :
Code:
//FEEDFL     DD DISP=SHR,DSN=A.B.C


OUTPUT LINES :
Code:
 
//*FEEDFL     DD DISP=SHR,DSN=A.B.C
//FEEDFL     DD DISP=SHR,DSN=X.Y.Z


One of the feed datasets is going to be changed from A.B.C to X.Y.Z. This feed is used in multiple jobs (we have 8 PDS with multiple jobs). DD name is always "FEEDFL" in all jobs (obviously, the position of the DD name is fixed). DISP is either SHR or OLD. DD/ DISP=SHR/ DISP=OLD positions may vary.

I can easily modify the existing line by replacing the old file name with the new file name using SORT/ ICETOOL/ FILEAID. But I don't know how to retain the existing line commented. The following (FILEAID) code works fine without inserting the comment. We prefer FILEAID as we need to check (and modify) all the members in a PDS.
Code:

//SYSIN    DD  *
$$DD01 UPDATE ME=9999,EA=(1,0,T"DSN=A.B.C",
                C"DSN=X.Y.Z")
/*

I can write a rexx to fetch all the members and modify them, but I know this can easily be done in fileaid.
SORT/ ICETOOL/ FILEAID- anything is fine. Our mainframe has SYNCSORT; we don't have DFSORT.

It is not an urgent request. I have to complete this change in my local PDS in a week (before November 15, 2022).

Thank you.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 940
Location: Bamberg, Germany

PostPosted: Tue Nov 08, 2022 11:04 pm
Reply with quote

Use IEBPTPCH to unload PO to a PS dataset, then use DFSORT to modify the record in question. The latter can be achieved with OUTFIL BUILD command. Then reload the PO dataset using IEBUPDTE.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 1650

PostPosted: Tue Nov 08, 2022 11:15 pm
Reply with quote

Joerg.Findeisen wrote:
Use IEBPTPCH to unload PO to a PS dataset, then use DFSORT to modify the record in question. The latter can be achieved with OUTFIL BUILD command. Then reload the PO dataset using IEBUPDTE.


Detailing the steps

Stage 1: train yourself with DFSORT: DD-changes applied to a single PDS member.

Stage 2: train yourself with IEBPTPCH: to unload PDS to PS

Stage 3: train yourself with DFSORT: DD-changes applied to the PS unloaded from PDS

Stage 4: get yourself familiar with IEBUPDTE, to upload any data from PS to several PDS members

Stage 5: train yourself with DFSORT: to prepare the PS with unloaded PDS for further uploading it back to PDS using IEBUPDTE

Stage 6: run all previous stages together, as one JCL stream.

P.S.
In practical life, there is no difference between SYNCSORT, and DFSORT.
Both are considered different only at this forum.
Back to top
View user's profile Send private message
Joerg.Findeisen

Active Member


Joined: 15 Aug 2015
Posts: 940
Location: Bamberg, Germany

PostPosted: Wed Nov 09, 2022 2:03 am
Reply with quote

See also https://ibmmainframes.com/about40794.html for a sample using FileAid.

I don't know if FileAid can assist your requirement with variable positions of the keywords, but DFSORT is able to do this.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Dataset size increase on adding 1 byt... DFSORT/ICETOOL 8
No new posts Best way to create an automated line ... TSO/ISPF 3
No new posts SORT - To repeat a string in same col... SYNCSORT 3
No new posts JCL - To repeat a string in same colu... JCL & VSAM 2
Search our Forums:

Back to Top