ALLMEM source:
/* REXX */
/*--------------------------------------------------------------------*/
/* */
/* Routine to run the edit macro ALL against all members of a */
/* library. */
/* */
/* COMPONENTS */
/* 1. REXX routine 'ALLMEM' */
/* 2. REXX routine 'ALL ' */
/* */
/*--------------------------------------------------------------------*/
address "TSO"
Arg PARMSTR
Parse value PARMSTR with PARM1 LEFTOVER
'ISPEXEC VGET (ZUSER ZTIME ZDATE)'
if PARM1 \= '' then LDSN = PARM1
else
do
Say 'Parameter missing. Expecting a PDS name'
exit
end
LDSN = strip(LDSN,,"'")
say LDSN
X = OUTTRAP("LCAT.")
"LISTDS '" || LDSN ||"' MEMBERS"
X = OUTTRAP("OFF")
N = 1
STARTMEM = 'N'
RLC = 0
Say "Enter Edit macro to run "
Pull macname
x =,
"ADDRESS 'ISPEXEC' 'EDIT DATASET('''LDSNM''') MACRO(",
macname")'"
do A=1 to LCAT.0
if STARTMEM = 'Y' then
do
MEMBER = strip(LCAT.N,B,' ')
say MEMBER
LDSNM = LDSN'('MEMBER')'
INTERPRET x
end
if LCAT.N = '--MEMBERS--' then STARTMEM = 'Y'
N = N + 1
if LCAT.N = '#END#' then RLC = 99
end
Return
And the EDIT macro, for example ALL
/* REXX */
ADDRESS "ISREDIT"
ADDRESS 'ISPEXEC' 'CONTROL ERRORS RETURN'
"MACRO (PARM) NOPROCESS"
"C ALL P'=' ' ' 73 80 "
In this example I use the Picture notation P'=' so anything in cc73-80 is
matched and set to spaces.
PDS with 3 numbered members:
Command - Enter "/" to select action
-------------------------------------
allmem BDB204.PDS
BDB204.PDS
Enter Edit macro to run
ALL
ALL
A
B
C
***
"END"
On Wed, Jan 13, 2021 at 6:43 PM Wayne Bickerdike <[email protected]> wrote:
> I have a REXX called ALLMEM, it gets the member list and calls an edit
> macro.
>
> I usually run it from 3.4. I'll post it here when I get my system going.
>
> On Wed, Jan 13, 2021 at 5:00 AM Paul Gilmartin <
> [email protected]> wrote:
>
>> On Tue, 12 Jan 2021 13:46:07 -0400, Clark Morris wrote:
>> >>
>> >>And a general note: when using ISPF edit to remove sequence numbers
>> from a
>> >>(large) number of (large) members, you might need to cater for the fact
>> that a
>> >>PDS might need to be compressed at some stage in the middle of your
>> processing!
>> >
>> >Use of update in place should work if all that is being done is
>> >sequence number stripping since the size of the member does not
>> >change.
>> >
>> Does ISPF Edit update in place, even optionally? I think PDS usually
>> creates a new member.
>>
>> -- gil
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO IBM-MAIN
>>
>
>
> --
> Wayne V. Bickerdike
>
>
--
Wayne V. Bickerdike
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN