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

Mass comment and edit


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
elixir1986

New User


Joined: 10 Nov 2015
Posts: 45
Location: USA

PostPosted: Thu Mar 02, 2017 10:09 pm
Reply with quote

1) I have a PDS with ABC.PDS with 100 members in it. (X001-X100)

2) These members have some content. I wish to insert "—" in column 1 & 2 for all members in that PDS.

Example:
X001 – before change
Code:
  SET ABC
  PQS
  ADA


X001 – after change
Code:
--SET X001
--PQS
--ADA


I achieved this using File Aid.

How can this be achieved using SORT as well?

3) Using below JCL, I am able to insert in the line 1 of the output.
Code:
//**********************************************************************
//FILEAID1 EXEC PGM=FILEAID                                             
//SYSPRINT DD SYSOUT=*                                                 
//DD01     DD DSN= ABC.PDS(X001),DISP=SHR                               
//DD01O    DD DSN= ABC.PDS(X001),DISP=SHR                           
//SYSIN    DD *                                                         
$$DD01 USER   MOVE=(1,080C' '),                                         
              MOVE=(1,C'//*%PREP RUNS_ON DEV1'),                       
              WRITE=DD01O,OUT=1,                                       
              MOVE=(1,80,1),                                           
              WRITE=DD01O                                               
$$DD01 USER   MOVE=(1,80,1),                                           
              WRITE=DD01O                                               
//**********************************************************************


Example
X001 – before change
Code:
--SET X001
--PQS
--ADA


X001 – after change

Code:

//*%PREP RUNS_ON DEV1'
--SET X001
--PQS
--ADA


How do I insert 3 lines(say) at the end of member X001?

4) Also, how do I insert something specific for each member,
Example:
X001 – before insert
Code:
--SET X001
--PQS
--ADA




X001 – after insert
Code:
--SET X001
--PQS
--ADA
  THE MEMBER NAME IS X001
  THIS IS COOL



X002 – before insert
Code:
--SET X002
--PQS
--ADA




X002 – after insert
Code:
--SET X002
--PQS
--ADA
  THE MEMBER NAME IS X002
  THIS IS COOL


THE MEMBER NAME IS "XXXX" where XXXX = Member name. How do I achieve this?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Mar 02, 2017 11:25 pm
Reply with quote

You could write an EDIT MACRO.

You can execute this macro on each member separately, or run in batch mode by using a Rexx exec to call the edit macro for each member.

It depends if this is a one tine function or not.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 03, 2017 2:39 am
Reply with quote

You can't do it directly in SORT, because there is no concept in SORT of the processing of multiple members.

You can "flatten" a PDS/PDSE with IEBPTPCH, use the sequential data set created as SORTIN, write code to make the changes to the output, and then recreate the PDS/PDSE from the output (IEBUPDTE).
Back to top
View user's profile Send private message
elixir1986

New User


Joined: 10 Nov 2015
Posts: 45
Location: USA

PostPosted: Fri Mar 03, 2017 3:56 am
Reply with quote

Thanks for the wonderful replies!

Any answers for other questions from File-Aid perspective(or other) is much appreciated.
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 -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Save SYSLOG in a MASS complex All Other Mainframe Topics 3
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
Search our Forums:

Back to Top