Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Mass comment and edit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
elixir1986

New User


Joined: 10 Nov 2015
Posts: 2
Location: USA

PostPosted: Thu Mar 02, 2017 10:09 pm    Post subject: Mass comment and edit
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: 662
Location: Pennsylvania

PostPosted: Thu Mar 02, 2017 11:25 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7309

PostPosted: Fri Mar 03, 2017 2:39 am    Post subject: Reply to: Mass comment and edit
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: 2
Location: USA

PostPosted: Fri Mar 03, 2017 3:56 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Use of Edit & FTOV migusd SYNCSORT 3 Wed Jun 08, 2016 1:49 am
No new posts How storage is calculated for AN-Edit... Raghu navaikulam COBOL Programming 2 Wed Mar 09, 2016 3:51 pm
No new posts Too many edit macro's and too few PF ... don.leahy TSO/ISPF 7 Wed Feb 17, 2016 3:00 am
No new posts EDIT END(SAVE) or CANCEL? Steve Coalbran TSO/ISPF 9 Sat Feb 06, 2016 7:11 pm
No new posts How to create/edit/update a new GDG V... karthikbalakumar8 JCL & VSAM 2 Fri Feb 05, 2016 6:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us