Discussion:
Follow On: Copying Selected Members by Various Methods
(too old to reply)
Sevetson, Phil
2015-09-02 15:30:59 UTC
Permalink
Raw Message
Okay, all - I've been able to interpret and make use of several helpful suggestions yesterday and today. While this isn't REXX, it does what I was trying to do with REXX in expeditious fashion.

Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which demonstrate the capability I need, or a close variant of it. Particular thanks to Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY suggestion. All this code has been tested (After testing, I removed identifying marks like jobnames and filenames for security reasons). Freely share, if you don't have something like it already.

FILEAID Searched copy based on the presence of a specified string in the source member:
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//********************************************************************
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//********************************************************************
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//

FILEAID Copy of a predetermined list of members:
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//********************************************************************
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//********************************************************************
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//

IEBCOPY Copy of a predetermined list of members:
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*********************************************************************
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*********************************************************************
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//

--Phil Sevetson
***@fisa.nyc.gov<mailto:***@fisa.nyc.gov>
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Lizette Koehler
2015-09-02 15:56:09 UTC
Permalink
Raw Message
This will only work for shops with FileAid.

To make it more generic, you could look at using LISTD 'datasetname' MEMBERS
Then parse the member list.

Lizette
-----Original Message-----
Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it. Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying marks like
jobnames and filenames for security reasons). Freely share, if you don't have
something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Sevetson, Phil
2015-09-02 16:19:05 UTC
Permalink
Raw Message
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.

My preferred method is to take a generated list of members (by whatever means) and put them in an EXCEL spreadsheet; use CONCATENATE() to assemble the statement I wish at the member level; Windows-Copy the result, and either paste it directly onto a 3270 EDIT session or save as a txt file and FTP it up and copy it. (This assumes, of course, that the task is a one-off. If this were for a regular production job, I would instead use OUTTRAP and LISTDSI)

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Lizette Koehler
Sent: Wednesday, September 02, 2015 11:54 AM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

This will only work for shops with FileAid.

To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.

Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Anania, Philip D
2015-09-03 00:03:25 UTC
Permalink
Raw Message
Hi Phil,

Of course reading the available manuals is a great way to really dig down
into REXX and other things. There are two books that helped me
tremendously when I first started working with REXX that you might want to
try to hunt down. They are a bit of a fast track to some of the nifty
things you can do. They are hard to find but can be found if you search a
little. The two books I speak of are:

1) Practical Usage of ISPF Dialog Management and 2) Practical Usage of MVS
REXX both by Anthony S Rudd. The publisher was Springer. These cover the
basics and provide some really good examples of the types of things that
can be done. The Dialog Management one covers Library Management Services
and was extremely helpful to me. Anything you can do in 3;4 can be done
from within REXX using LMS so definitely worth spending some time with if
you want to get into automations with REXX.

Also the Cowlishaw book: The REXX Language - A Practical Approach To
Programming which is a great book to keep within reach. Cowlishaw wrote
REXX as you probably know. I am guessing you may have this one already but
as an after thought figured I'd mention just in case.

P
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one
statement per member. It can easily be customized for multiple members by
any of several methods.
My preferred method is to take a generated list of members (by whatever
means) and put them in an EXCEL spreadsheet; use CONCATENATE() to assemble
the statement I wish at the member level; Windows-Copy the result, and
either paste it directly onto a 3270 EDIT session or save as a txt file and
FTP it up and copy it. (This assumes, of course, that the task is a
one-off. If this were for a regular production job, I would instead use
OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname'
MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
--

"Go about your Music citizen" - PdotDdot

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Peete Baer
2015-09-03 00:08:11 UTC
Permalink
Raw Message
Confirming:

I have all 3 of those texts and they are dog-eared and coffee stained from excessive use.

Cordially,

Peete W. Baer



Journal Technologies, Inc.
(510) 682 – 5743 (Cell-Text)


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Anania, Philip D
Sent: Wednesday, September 02, 2015 5:03 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Hi Phil,

Of course reading the available manuals is a great way to really dig down into REXX and other things. There are two books that helped me tremendously when I first started working with REXX that you might want to try to hunt down. They are a bit of a fast track to some of the nifty things you can do. They are hard to find but can be found if you search a little. The two books I speak of are:

1) Practical Usage of ISPF Dialog Management and 2) Practical Usage of MVS REXX both by Anthony S Rudd. The publisher was Springer. These cover the basics and provide some really good examples of the types of things that
can be done. The Dialog Management one covers Library Management Services
and was extremely helpful to me. Anything you can do in 3;4 can be done from within REXX using LMS so definitely worth spending some time with if you want to get into automations with REXX.

Also the Cowlishaw book: The REXX Language - A Practical Approach To Programming which is a great book to keep within reach. Cowlishaw wrote REXX as you probably know. I am guessing you may have this one already but as an after thought figured I'd mention just in case.

P
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used
one statement per member. It can easily be customized for multiple
members by any of several methods.
My preferred method is to take a generated list of members (by
whatever
means) and put them in an EXCEL spreadsheet; use CONCATENATE() to
assemble the statement I wish at the member level; Windows-Copy the
result, and either paste it directly onto a 3270 EDIT session or save
as a txt file and FTP it up and copy it. (This assumes, of course,
that the task is a one-off. If this were for a regular production job,
I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname'
MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
--

"Go about your Music citizen" - PdotDdot

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Sevetson, Phil
2015-09-03 14:15:09 UTC
Permalink
Raw Message
Phil,

I have copes of the Howard Fosdick book, Rudd, Gargiulo, and Goldberg. I'm using them as reference, but actually haven't read any of them cover-to-cover, as I can usually get what I need done with short readings of relevant passages. I also have the Ranade series work on ISPF -- very old -- is that the one you're referring to in #1? It isn't all that helpful on understanding ISPF Dialog Management Services, nor is the Murach TSO/Clist/REXX book, as its reference to ISPF DM is to one very limited scenario. Murach's work is much better at REXX, though.

What I've really been lacking over the years is a good comprehensive manual/userguide of the IBM z/OS (batch?) utilities, SuperC, IEBCOPY, IEBGENER, IEFBR14; ditto for FA/MVS and FA/DB2 batch; and I'm not sure where to look to best understand using ISPF EDIT in a Rexx/Clist program.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Anania, Philip D
Sent: Wednesday, September 02, 2015 8:03 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Hi Phil,

Of course reading the available manuals is a great way to really dig down into REXX and other things. There are two books that helped me tremendously when I first started working with REXX that you might want to try to hunt down. They are a bit of a fast track to some of the nifty things you can do. They are hard to find but can be found if you search a little. The two books I speak of are:

1) Practical Usage of ISPF Dialog Management and 2) Practical Usage of MVS REXX both by Anthony S Rudd. The publisher was Springer. These cover the basics and provide some really good examples of the types of things that
can be done. The Dialog Management one covers Library Management Services
and was extremely helpful to me. Anything you can do in 3;4 can be done from within REXX using LMS so definitely worth spending some time with if you want to get into automations with REXX.

Also the Cowlishaw book: The REXX Language - A Practical Approach To Programming which is a great book to keep within reach. Cowlishaw wrote REXX as you probably know. I am guessing you may have this one already but as an after thought figured I'd mention just in case.

P
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used
one statement per member. It can easily be customized for multiple
members by any of several methods.
My preferred method is to take a generated list of members (by
whatever
means) and put them in an EXCEL spreadsheet; use CONCATENATE() to
assemble the statement I wish at the member level; Windows-Copy the
result, and either paste it directly onto a 3270 EDIT session or save
as a txt file and FTP it up and copy it. (This assumes, of course,
that the task is a one-off. If this were for a regular production job,
I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname'
MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
--

"Go about your Music citizen" - PdotDdot

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Robzenuk
2015-09-03 04:19:41 UTC
Permalink
Raw Message
Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?

Thanks,

Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by whatever means) and put them in an EXCEL spreadsheet; use CONCATENATE() to assemble the statement I wish at the member level; Windows-Copy the result, and either paste it directly onto a 3270 EDIT session or save as a txt file and FTP it up and copy it. (This assumes, of course, that the task is a one-off. If this were for a regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Paul Gilmartin
2015-09-03 13:29:00 UTC
Permalink
Raw Message
Post by Robzenuk
Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?
I'd attribute the choice of Excel to familiarity, even as I might
expect Sri h Kolusu to advance a solution using DFSORT, or Pedro
Vera ISPF LM, etc.

-- gil

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Sevetson, Phil
2015-09-03 14:46:34 UTC
Permalink
Raw Message
Rob,

Customer business requirement. I was handed a list of 164 production JCL members and told that I needed to make changes to all of those, drawing from current production. Since I thought the chances of missing one or more were high if I did the member copy-to-work-dataset by hand, I looked for an automation solution. I knew that IEBGENER could copy single members, so I wrote a solution in REXX which generated code to use that.

I was also told that what the list of 164 members had in common was the use of a particular PROC, which we were recoding with additional parameters, to improve standardization of production DSNAME HLQ's; so when Martin produced FA/MVS batch search-and-copy syntax, I ran it as a check on the list which I was provided.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Robzenuk
Sent: Wednesday, September 02, 2015 4:27 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?

Thanks,

Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by
whatever means) and put them in an EXCEL spreadsheet; use
CONCATENATE() to assemble the statement I wish at the member level;
Windows-Copy the result, and either paste it directly onto a 3270 EDIT
session or save as a txt file and FTP it up and copy it. (This
assumes, of course, that the task is a one-off. If this were for a
regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Styles, Andy , SD EP zPlatform
2015-09-03 15:07:11 UTC
Permalink
Raw Message
Phil,

Something about this bothers me. I don't want to inflame things further, but copying production JCL member out to a PDS without proper check-out processing sounds wrong. From my developer, SCM and now sysprog background, not using a change control process - such as Endevor, ChangeMan, SCLM...and any others that are still out there - sounds like a recipe for disaster. Or are you implying you don't use a version control system for JCL?


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Sevetson, Phil
Sent: 03 September 2015 15:46
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

-- This email has reached the Bank via an external source --


Rob,

Customer business requirement. I was handed a list of 164 production JCL members and told that I needed to make changes to all of those, drawing from current production. Since I thought the chances of missing one or more were high if I did the member copy-to-work-dataset by hand, I looked for an automation solution. I knew that IEBGENER could copy single members, so I wrote a solution in REXX which generated code to use that.

I was also told that what the list of 164 members had in common was the use of a particular PROC, which we were recoding with additional parameters, to improve standardization of production DSNAME HLQ's; so when Martin produced FA/MVS batch search-and-copy syntax, I ran it as a check on the list which I was provided.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Robzenuk
Sent: Wednesday, September 02, 2015 4:27 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?

Thanks,

Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by
whatever means) and put them in an EXCEL spreadsheet; use
CONCATENATE() to assemble the statement I wish at the member level;
Windows-Copy the result, and either paste it directly onto a 3270 EDIT
session or save as a txt file and FTP it up and copy it. (This
assumes, of course, that the task is a one-off. If this were for a
regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 08457 21 31 41. Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales 2299428. Telephone: 0845 603 1637

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Cheltenham & Gloucester plc is authorised and regulated by the Financial Conduct Authority.

Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester Savings is a division of Lloyds Bank plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Sevetson, Phil
2015-09-03 15:16:42 UTC
Permalink
Raw Message
I am absolutely not free to talk about that, for security reasons. You'll have to draw your own conclusions from what has been said. Sorry.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Styles, Andy (SD EP zPlatform)
Sent: Thursday, September 03, 2015 11:04 AM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Phil,

Something about this bothers me. I don't want to inflame things further, but copying production JCL member out to a PDS without proper check-out processing sounds wrong. From my developer, SCM and now sysprog background, not using a change control process - such as Endevor, ChangeMan, SCLM...and any others that are still out there - sounds like a recipe for disaster. Or are you implying you don't use a version control system for JCL?


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Sevetson, Phil
Sent: 03 September 2015 15:46
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

-- This email has reached the Bank via an external source --


Rob,

Customer business requirement. I was handed a list of 164 production JCL members and told that I needed to make changes to all of those, drawing from current production. Since I thought the chances of missing one or more were high if I did the member copy-to-work-dataset by hand, I looked for an automation solution. I knew that IEBGENER could copy single members, so I wrote a solution in REXX which generated code to use that.

I was also told that what the list of 164 members had in common was the use of a particular PROC, which we were recoding with additional parameters, to improve standardization of production DSNAME HLQ's; so when Martin produced FA/MVS batch search-and-copy syntax, I ran it as a check on the list which I was provided.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Robzenuk
Sent: Wednesday, September 02, 2015 4:27 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?

Thanks,

Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by
whatever means) and put them in an EXCEL spreadsheet; use
CONCATENATE() to assemble the statement I wish at the member level;
Windows-Copy the result, and either paste it directly onto a 3270 EDIT
session or save as a txt file and FTP it up and copy it. (This
assumes, of course, that the task is a one-off. If this were for a
regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



Lloyds Banking Group plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC95000. Telephone: 0131 225 4555. Lloyds Bank plc. Registered Office: 25 Gresham Street, London EC2V 7HN. Registered in England and Wales no. 2065. Telephone 0207626 1500. Bank of Scotland plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC327000. Telephone: 08457 21 31 41. Cheltenham & Gloucester plc. Registered Office: Barnett Way, Gloucester GL4 3RL. Registered in England and Wales 2299428. Telephone: 0845 603 1637

Lloyds Bank plc, Bank of Scotland plc are authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and Prudential Regulation Authority.

Cheltenham & Gloucester plc is authorised and regulated by the Financial Conduct Authority.

Halifax is a division of Bank of Scotland plc. Cheltenham & Gloucester Savings is a division of Lloyds Bank plc.

HBOS plc. Registered Office: The Mound, Edinburgh EH1 1YZ. Registered in Scotland no. SC218813.

This e-mail (including any attachments) is private and confidential and may contain privileged material. If you have received this e-mail in error, please notify the sender and delete it (including any attachments) immediately. You must not copy, distribute, disclose or use any of the information in it or any attachments. Telephone calls may be monitored or recorded.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Robzenuk
2015-09-03 16:53:56 UTC
Permalink
Raw Message
Excellent. Hearing there is a programmatic way to identify the members to copy/update, I would focus on a solution that provides member selection based on search strings.

I think several of us have written tools to do this. But, following my own rules, if you have a package in house that can easily do that, the best code is the code you never have to write.

If Compuware's File-Aid was not available, you could download the free PDS utility from cbttape.org (file 182 I believe) that also provides a search and copy option.

If you were not allowed to download free tools, I would then look at the search-for/superc utilities. These can be used under ISPF (3.14 & 3.15, I think, someone check me I'm on a bus from Nuremburg to Salzburg). These can generate your member list that you can edit in ISPF. With editor commands you can shift, move, overlay to get your raw member list syntactically valid format for IEBCOPY.

Finally, if you expect to do this frequently, you could call superc from REXX then call IEBCOPY from REXX with the tailored member list.

But, you have File-aid and a working example. So, the best solution for the requirements is already available.

Thanks,

Rob
Post by Sevetson, Phil
Rob,
Customer business requirement. I was handed a list of 164 production JCL members and told that I needed to make changes to all of those, drawing from current production. Since I thought the chances of missing one or more were high if I did the member copy-to-work-dataset by hand, I looked for an automation solution. I knew that IEBGENER could copy single members, so I wrote a solution in REXX which generated code to use that.
I was also told that what the list of 164 members had in common was the use of a particular PROC, which we were recoding with additional parameters, to improve standardization of production DSNAME HLQ's; so when Martin produced FA/MVS batch search-and-copy syntax, I ran it as a check on the list which I was provided.
--Phil Sevetson
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 4:27 PM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?
Thanks,
Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by
whatever means) and put them in an EXCEL spreadsheet; use
CONCATENATE() to assemble the statement I wish at the member level;
Windows-Copy the result, and either paste it directly onto a 3270 EDIT
session or save as a txt file and FTP it up and copy it. (This
assumes, of course, that the task is a one-off. If this were for a
regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Behalf Of Lizette Koehler
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Sevetson, Phil
2015-09-03 14:49:23 UTC
Permalink
Raw Message
Rob,

... sorry, I didn't answer about the Excel. I was actually provided a list of members in simple text format. I used Excel because it offers a very fast way of taking a list of supplied values (if one value per line of text) and surrounding individual members with other text (the CONCATENATE function), if the result text can be made to fit on a single line.

--Phil Sevetson
***@fisa.nyc.gov
City of New York / Financial Info Svcs Agcy
New York, NY USA 10001


-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-***@VM.MARIST.EDU] On Behalf Of Robzenuk
Sent: Wednesday, September 02, 2015 4:27 PM
To: TSO-***@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods

Maybe I missed this in your early posts, but what is driving your identification of members? How do you know which members you want to work on? Why is this list kept in Excel? When you do identify the members what are you copying them to, a working dataset?

Thanks,

Rob
Post by Sevetson, Phil
Lizette, the third of those listings was an IEBCOPY example which used one statement per member. It can easily be customized for multiple members by any of several methods.
My preferred method is to take a generated list of members (by
whatever means) and put them in an EXCEL spreadsheet; use
CONCATENATE() to assemble the statement I wish at the member level;
Windows-Copy the result, and either paste it directly onto a 3270 EDIT
session or save as a txt file and FTP it up and copy it. (This
assumes, of course, that the task is a one-off. If this were for a
regular production job, I would instead use OUTTRAP and LISTDSI)
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
-----Original Message-----
Sent: Wednesday, September 02, 2015 11:54 AM
Subject: Re: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
This will only work for shops with FileAid.
To make it more generic, you could look at using LISTD 'datasetname' MEMBERS Then parse the member list.
Lizette
-----Original Message-----
Behalf Of Sevetson, Phil
Sent: Wednesday, September 02, 2015 8:31 AM
Subject: [TSO-REXX] Follow On: Copying Selected Members by Various Methods
Okay, all - I've been able to interpret and make use of several helpful
suggestions
yesterday and today. While this isn't REXX, it does what I was trying to do
with REXX
in expeditious fashion.
Below are three z/OS batch programs (one IEBCOPY, two FILEAID) which
demonstrate the capability I need, or a close variant of it.
Particular
thanks to
Martin Dunkel for the FILEAID help and to Ted McNeil for the IEBCOPY
suggestion.
All this code has been tested (After testing, I removed identifying
marks like jobnames and filenames for security reasons). Freely
share, if you don't have something like it already.
FILEAID Searched copy based on the presence of a specified string in the
source
//xxxxxxxx JOB ,'FILEAID SRCH COPY',MSGLEVEL=(1,1),REGION=32M,
// CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON SEARCH CRITERIA
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPYMEM IF=(1,72,C'searchstring')
/*
//
//xxxxxxxx JOB ,'MBRLIST COPY UTIL',MSGLEVEL=(1,1),REGION=32M,
// CLASS=A,MSGCLASS=Q,NOTIFY=&SYSUID,TIME=60
//*******************************************************************
*
//** COPY FILES FROM $DD01 TO $DD01O BASED ON MEMBER NAME
//*******************************************************************
*
//JS01 EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DISP=SHR,DSN=input.PDS.here
//DD01O DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
$$DD01 COPY OUT=0,MEMBERS=member1
$$DD01 COPY OUT=0,MEMBERS=member2
/*
//
//xxxxxxxx JOB ,'IEBCOPY',CLASS=x,MSGCLASS=x,NOTIFY=&SYSUID,
// MSGLEVEL=(1,1),REGION=32M,TIME=60
//*******************************************************************
**
//* COPYMBR - IEBCOPY FOR SELECTED MEMBERS OF A PDS
//*******************************************************************
**
//COPYMBR EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=T
//SYSUT3 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SYSUT4 DD UNIT=SYSDA,SPACE=(CYL,(100,10),RLSE)
//SOURCE1 DD DISP=SHR,DSN=input.PDS.here
//TARGET DD DISP=SHR,DSN=output.PDS.here
//SYSIN DD *
COPY INDD=SOURCE1,OUTDD=TARGET
SELECT MEMBER=((member1,,R))
SELECT MEMBER=((member2,,R))
/*
//
--Phil Sevetson
City of New York / Financial Info Svcs Agcy New York, NY USA 10001
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions, send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Loading...