Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Dynamically allocate Sysexec

698 views
Skip to first unread message

Steve Neeland

unread,
Jun 20, 2001, 4:50:40 PM6/20/01
to
If I have libraries PDS1, PDS2 and PDS3 in my DD=SYSEXEC (allocated in my
logon procedure), how would I dynamically add another library (i.e. PDS4)
from within a Rexx exec to DD=SYSEXEC that will be calling a Rexx exec
stored in PDS4?

===================================
Steve Neeland
America West Airlines

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

Keith Bower

unread,
Jun 20, 2001, 5:12:54 PM6/20/01
to
Since I haven't seen an answer yet, I will take a stab, something to get
you started.

Since you asked this, I assume FREEing and re-ALLOCating DD SYSEXEC might
not be an option for you, although people have created utilities that will
do that (dynamically, without knowing the current concatenation) at least
from TSO READY.

Therefore, I think you should research the TSO ALTLIB command to logically
concatenate new CLIST or REXX libraries in front of the current allocation.
Or wait for someone to reply with a better message than mine. Here is an
example of some REXX statements I use in an ISPF dialog (where "PREFIX" is
some variable):

"ALTLIB ACT APPL(CLIST) DATASET('"||PREFIX||".CLIST')"
'ISPEXEC SELECT CMD(%RSPMAIN HIGHLVL('||PREFIX||')) NEWAPPL(RC)',
'PASSLIB'
'ALTLIB DEACT APPL(CLIST)'

Depending on your environment, you may need "APPL(EXEC)".


Steve Neeland
<Steve.Neeland@AMERIC To: TSO-...@VM.MARIST.EDU
AWEST.COM> cc:
Sent by: TSO REXX Subject: Dynamically allocate Sysexec
Discussion List
<TSO-...@VM.MARIST.E
DU>


06/20/01 04:33 PM
Please respond to TSO
REXX Discussion List

Mark Hammack

unread,
Jun 20, 2001, 5:17:53 PM6/20/01
to
ALTLIB ACTIVATE/ALTLIB DEACTIVATE is the best way.

Steve Neeland

unread,
Jun 20, 2001, 5:41:29 PM6/20/01
to
So will the sample below replace the existing allocation or add to what is
already allocated?

-----Original Message-----
From: Keith Bower [mailto:kbo...@PHEAA.ORG]
Sent: Wednesday, June 20, 2001 2:09 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: Dynamically allocate Sysexec


Since I haven't seen an answer yet, I will take a stab, something to get
you started.

Since you asked this, I assume FREEing and re-ALLOCating DD SYSEXEC might
not be an option for you, although people have created utilities that will
do that (dynamically, without knowing the current concatenation) at least
from TSO READY.

Therefore, I think you should research the TSO ALTLIB command to logically
concatenate new CLIST or REXX libraries in front of the current allocation.
Or wait for someone to reply with a better message than mine. Here is an
example of some REXX statements I use in an ISPF dialog (where "PREFIX" is
some variable):

"ALTLIB ACT APPL(CLIST) DATASET('"||PREFIX||".CLIST')"
'ISPEXEC SELECT CMD(%RSPMAIN HIGHLVL('||PREFIX||')) NEWAPPL(RC)',
'PASSLIB'
'ALTLIB DEACT APPL(CLIST)'

Depending on your environment, you may need "APPL(EXEC)".

Keith Bower

unread,
Jun 20, 2001, 6:16:58 PM6/20/01
to
As shown, this will *add* the library (or libraries in necessary) logically
in front of the system libraries, as they will be searched first and the
search will continue on with the normal concatenation if not found. ALTLIB
also has "USER" and "SYSTEM" keywords in addtion to "APPL/APPLICATION" that
would allow you to DEACTIVATE and re-ACTIVATE SYSUEXEC or SYSUPROC and
SYSEXEC or SYSPROC respectively. There is also a "FILE" keyword if the
dataset(s) are pre-allocated. Check out the manual for all the nuances and
other keywords.

Gotta go - I'm late already.

-Keith Bower
OS/390 Systems Programmer
Pennsylvania Higher Education Assistance Agency


Steve Neeland
<Steve.Neeland@AMERIC To: TSO-...@VM.MARIST.EDU
AWEST.COM> cc:

Sent by: TSO REXX Subject: Re: Dynamically allocate Sysexec
Discussion List
<TSO-...@VM.MARIST.E
DU>


06/20/01 05:28 PM


Please respond to TSO
REXX Discussion List

Steve Neeland

unread,
Jun 20, 2001, 6:19:20 PM6/20/01
to
ALTLIB was what I was looking for. Thanks so much!

Steve

Frank Clarke

unread,
Jun 20, 2001, 6:54:44 PM6/20/01
to
On 20 Jun 2001 14:41:29 -0700, Steve....@AMERICAWEST.COM (Steve
Neeland) wrote:

>So will the sample below replace the existing allocation or add to what is
>already allocated?

It layers another allocation above (in a preferential position).
(This is not --literally-- true, but that's what it feels like.)

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn
Join us at www.rexxla.org

Lindy Mayfield

unread,
Jun 21, 2001, 3:30:11 AM6/21/01
to
What is most of the time done in this situation is that a LISTA ST command
is done, the output is OUTTRAPped and scanned for all the datasets allocated
to a particular DD, like SYSEXEC or SYSPROC, then this DD is reallocated
with the new library concatenated either in front of or behind the rest.

I used to have a rexx exec that did this, but I lost it. Here we have a tso
command QCONCAT which stores all the dataset names in a particular DD to a
clist variable.

I'm sure that there are lots of utilities on CBT or other mvs sites that
will do this for you. Or, you could write your own. It is a challenge
parsing through the LISTA ST output because of how it is formatted.

Cheers,
Lindy

-----Original Message-----
From: Steve Neeland [mailto:Steve....@AMERICAWEST.COM]
Sent: Wednesday, June 20, 2001 22:33
To: TSO-...@VM.MARIST.EDU
Subject: Dynamically allocate Sysexec

Charles Merrythought

unread,
Jun 21, 2001, 7:34:27 AM6/21/01
to
There are a number of concatenation exec's that would allow you to dynamically add another library from within your exec. I'd suggest looking at File 357 of the CBT Tape (WWW.CBTTAPE.ORG) for CONCATDD.

... how would I dynamically add another library (i.e. PDS4)
from within a Rexx exec to DD=SYSEXEC that will be calling a Rexx exec...

__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

Ryerse, Robin

unread,
Jun 21, 2001, 8:27:24 AM6/21/01
to
A word of caution related to ALTLIBs. Pre-allocating DDname
SYSUEXEC/SYSUPROC and activating ALTLIB at the Ready prompt does not make
the USER(EXEC/CLIST) persist into the ISPF environment. In fact activation
of USER(EXEC/CLIST) within one ISPF will not persist to another ISPF
"split". This foible may be peculiar to my shop.

-----Original Message-----
From: Steve Neeland [mailto:Steve....@AMERICAWEST.COM]

Sent: Wednesday, June 20, 2001 6:18 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: Dynamically allocate Sysexec

Steve

So will the sample below replace the existing allocation or add to what is
already allocated?

-----Original Message-----
From: Keith Bower [mailto:kbo...@PHEAA.ORG]
Sent: Wednesday, June 20, 2001 2:09 PM
To: TSO-...@VM.MARIST.EDU
Subject: Re: Dynamically allocate Sysexec


Since I haven't seen an answer yet, I will take a stab, something to get
you started.

Since you asked this, I assume FREEing and re-ALLOCating DD SYSEXEC might
not be an option for you, although people have created utilities that will
do that (dynamically, without knowing the current concatenation) at least
from TSO READY.

Therefore, I think you should research the TSO ALTLIB command to logically
concatenate new CLIST or REXX libraries in front of the current allocation.
Or wait for someone to reply with a better message than mine. Here is an
example of some REXX statements I use in an ISPF dialog (where "PREFIX" is
some variable):

"ALTLIB ACT APPL(CLIST) DATASET('"||PREFIX||".CLIST')"
'ISPEXEC SELECT CMD(%RSPMAIN HIGHLVL('||PREFIX||')) NEWAPPL(RC)',
'PASSLIB'
'ALTLIB DEACT APPL(CLIST)'

Depending on your environment, you may need "APPL(EXEC)".

If I have libraries PDS1, PDS2 and PDS3 in my DD=SYSEXEC (allocated in my
logon procedure), how would I dynamically add another library (i.e. PDS4)
from within a Rexx exec to DD=SYSEXEC that will be calling a Rexx exec
stored in PDS4?

===================================
Steve Neeland
America West Airlines

----------------------------------------------------------------------

Seibert, Dave

unread,
Jun 21, 2001, 10:28:04 AM6/21/01
to
Hi Robin,
I don't believe those foibles are peculiar to your shop.

I don't see a reason I would use altlib at the READY prompt and then invoke
ISPF. If I'm at the ready prompt, I can easily modify the concatenation of
SYSEXEC/SYSPROC. (in fact, there are cases where you can modify
SYSEXEC/SYSPROC concatenations while in ISPF. I think that's inadviseable
and I don't do it, but I've seen code successful in doing so.)
So I've never tried that.

But altlib for as long as I've been using it, benefits only the session (in
split screen mode) in which it's executed.

David Seibert
Compuware Corporation File-AID Product Architect
Dave.S...@Compuware.com

Metz, Seymour

unread,
Jun 21, 2001, 12:23:36 PM6/21/01
to
Performance. Except that it is BAD.


Shmuel (Seymour J.) Metz

> -----Original Message-----
> From: Seibert, Dave [SMTP:Dave_S...@COMPUWARE.COM]
> Sent: Thursday, June 21, 2001 10:15 AM
>
> I don't see a reason I would use altlib at the READY prompt and then
> invoke
> ISPF. If I'm at the ready prompt, I can easily modify the concatenation of
> SYSEXEC/SYSPROC.

----------------------------------------------------------------------

Charles Merrythought

unread,
Jun 21, 2001, 6:19:49 PM6/21/01
to
SYSPROC and SYSEXEC may be modified while in ISPF. Take a look at CONCATDD on File 357 of the CBT Tape (WWW.CBTTAPE.COM)... my apologies if I'm repeating myself, my system took a sudden break when I tried to send this before.

>
> > I used to have a rexx exec that did this, but I lost it. Here we have
> > a tso command QCONCAT which stores all the dataset names in a
> > particular DD to a clist variable.
>
> > I'm sure that there are lots of utilities on CBT or other mvs sites that
> > will do this for you. Or, you could write your own. It is a challenge
> > parsing through the LISTA ST output because of how it is formatted.
>
> I didn't think this was advisable once you'd got away from the tSO READY
> prompt (ie into ispf) and had opened SYSPROC.
>
> --
> Jeremy C B Nicoll - my opinions are my own.

>
> ----------------------------------------------------------------------
> For TSO-REXX subscribe / signoff / archive access instructions,
> send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
>
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

----------------------------------------------------------------------

Jeremy C B Nicoll

unread,
Jun 21, 2001, 6:21:41 PM6/21/01
to
On 20 Jun, Keith Bower <kbo...@PHEAA.ORG> wrote:
> As shown, this will *add* the library (or libraries in necessary)
> logically in front of the system libraries, as they will be searched
> first and the search will continue on with the normal concatenation if
> not found. ALTLIB also has "USER" and "SYSTEM" keywords in addtion to
> "APPL/APPLICATION" that would allow you to DEACTIVATE and re-ACTIVATE
> SYSUEXEC or SYSUPROC and SYSEXEC or SYSPROC respectively. There is
> also a "FILE" keyword if the dataset(s) are pre-allocated. Check out
> the manual for all the nuances and other keywords.

I've used ALTLIB this way lots. The SYSUEXEC possibility, which I've
never tried, implies that simply allocating the new pds to SYSUEXEC might
be enough (assuming it isn't in use already) - the implication is that
the search order for rexx execs includes SYSUEXEC before SYSEXEC.


I have a distant *warning* in my head for a gotcha, and I can't remember
all the details. I *think* it is that ALTLIB works for rexx execs being
loaded because, implicitly or explicitly, a TSO EXEC command is being
issued - so (under tso) an exec could have "newexec4" in it to pass
control to the new exec (from pds4), or even "%newexec4" and ALTLIB will
locate the newexec4 in PDS4 for you fine because the EXEC command
processor will look in the ALTLIB/SYSEXEC libraries.


However if you call rexx external functions from within your rexx execs,
and these functions are written in rexx and placed in PDS4, ALTLIB does
not locate them (because EXEC isn't called to run the external function
and so the look-in-ALTLIB logic doesn't get run). This hit me because I
was tending to put an entire application's rexx execs in a single PDS;
the mainline routine got control fine but subsidiary routines did not.
I opened a uk pmr for this and found that this was working as designed -
posting from home so can't dig out pmr number. Maybe it has been fixed,
but it struck me as undoing much of the good of ALTLIB in the first place.

--
Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------

Jeremy C B Nicoll

unread,
Jun 21, 2001, 6:23:42 PM6/21/01
to
On 21 Jun, Lindy Mayfield <lindy.m...@EUR.SAS.COM> wrote:
> What is most of the time done in this situation is that a LISTA ST
> command is done, the output is OUTTRAPped and scanned for all the
> datasets allocated to a particular DD, like SYSEXEC or SYSPROC, then
> this DD is reallocated with the new library concatenated either in
> front of or behind the rest.

> I used to have a rexx exec that did this, but I lost it. Here we have
> a tso command QCONCAT which stores all the dataset names in a
> particular DD to a clist variable.

> I'm sure that there are lots of utilities on CBT or other mvs sites that
> will do this for you. Or, you could write your own. It is a challenge
> parsing through the LISTA ST output because of how it is formatted.

I didn't think this was advisable once you'd got away from the tSO READY


prompt (ie into ispf) and had opened SYSPROC.

--


Jeremy C B Nicoll - my opinions are my own.

----------------------------------------------------------------------

Lindy Mayfield

unread,
Jun 22, 2001, 2:58:26 AM6/22/01
to
Most of the time it works with SYSPROC and SYSEXEC. Sometimes it doesn't,
and I'm not sure why. Even when you issue a close command on the DD, which
I cannot remember right now.

-----Original Message-----
From: Jeremy C B Nicoll [mailto:Jer...@OMBA.DEMON.CO.UK]
Sent: Thursday, June 21, 2001 21:01
To: TSO-...@VM.MARIST.EDU
Subject: Re: Dynamically allocate Sysexec

Jeremy C B Nicoll

unread,
Jun 22, 2001, 8:31:23 AM6/22/01
to
On 21 Jun, Charles Merrythought <UserC...@NETSCAPE.NET> wrote:
> SYSPROC and SYSEXEC may be modified while in ISPF. Take a look at
> CONCATDD on File 357 of the CBT Tape (WWW.CBTTAPE.COM)... my apologies
> if I'm repeating myself, my system took a sudden break when I tried to
> send this before.

I was assuming that the CBT-tape utils use some of the more-versatile
parts of SVC99, whereas anything written in CLIST/Rexx just uses FREE and
ALLOC and perhaps the latter doesn't work so well?

Apart from that, changing SYSPROC/SYSEXEC crudely from one application
under ispf while others are perhaps using the original seems ugly to me.
If it was as simple as FREE & ALLOC then why did IBM provide ALTLIB?

Charles Merrythought

unread,
Jun 22, 2001, 11:15:34 AM6/22/01
to
I'm a travelling programmer (read consultant) who brings along a spate of REXX EXEC's. I've used the relatively simple concatenation to SYSPROC (I have a few CLIST's too or I'd go with SYSEXEC) at 4 different sites, either manually within ISPF or at LOGON if the site has some automation within its start up process. This has worked well for me over the past 5-6 years. The CONCATDD EXEC allows me access to all my toys.

ALTLIB is quite useful within an EXEC to set up temporary access without re-allocating, but I thought the original issue was one of allowing access for general, repeated use.

I'd think twice about SVC 99 (see BLDR within File 357 of the CBT Tape for at least a macro driven version) - there are reasons for using it within programs, but I'd suspect it would be overkill here.

> I was assuming that the CBT-tape utils use some of the more-versatile
> parts of SVC99, whereas anything written in CLIST/Rexx just uses FREE and
> ALLOC and perhaps the latter doesn't work so well?

> Apart from that, changing SYSPROC/SYSEXEC crudely from one application
> under ispf while others are perhaps using the original seems ugly to me.
> If it was as simple as FREE & ALLOC then why did IBM provide ALTLIB?

Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

Stephen E. Bacher

unread,
Jun 22, 2001, 1:12:52 PM6/22/01
to
Check out the EXECUTIL command.

If you specify EXECUTIL EXECDD(NOCLOSE), then you will not be able
to reallocate SYSEXEC from within a REXX exec. Specifying EXECUTIL
EXECDD(CLOSE) will permit such reallocation.

It has nothing to do with FREE/ALLOC vs. CBT utilities. All use the
same SVC 99 routines under the covers, and the failure arises from
SYSEXEC being open when the reallocation is attempted vs. its not
being open.

- seb

Frank Clarke

unread,
Jun 22, 2001, 7:29:40 PM6/22/01
to
On 22 Jun 2001 10:12:52 -0700, s...@DRAPER.COM (Stephen E. Bacher)
wrote:

>If you specify EXECUTIL EXECDD(NOCLOSE), then you will not be able
>to reallocate SYSEXEC from within a REXX exec. Specifying EXECUTIL

>EXECDD(CLOSE) will permit such reallocation...

...as soon as you run something from SYSEXEC.

Weizman_Arbel

unread,
Jun 23, 2001, 12:22:50 PM6/23/01
to
you can free sysexec and realloc
with pds1,pds2,pds3,pds4 (it is work from ispf too)
look at doug site ISPFlab
0 new messages