View previous topic :: View next topic
|
Author |
Message |
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
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
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 |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
elixir1986
New User
Joined: 10 Nov 2015 Posts: 45 Location: USA
|
|
|
|
Thanks for the wonderful replies!
Any answers for other questions from File-Aid perspective(or other) is much appreciated. |
|
Back to top |
|
|
|