I wanted to add a data set to the already allocated ISPTLIB concatenation. You can use the TSO ALLOCate command to allocate a list of data sets, but not to add a data set to an existing definition.
Lionel B. Dyck pointed me to the TSO function bpxwdyn.
When I logon to TSO I invoke a userid.ZLOGON.REXX data set
/* Rexx */
address TSO
userid = userid()
dsn= userid".S0W1.ISPF.ISPPROF"
req = "ALLOC FI(tmp) DA('"dsn"') SHR "
if bpxwdyn(req ) =0 then
call bpxwdyn "concat ddlist(ISPTLIB,tmp) "
"ispf"
- The bpxwdyn(req ) allocates the dataset to the DDNAME TMP.
- The call bpxwdyn “concat ddlist(ISPTLIB,tmp) copies the data set(s) in the tmp DDNAME to the end of the ISPTLIB DDNAME
- ispf starts ISPF.
The TSO ISRDDN command gave me
Current Data Set Allocations Row 68 of 122
Command ===> Scroll ===> CSR
Volume Disposition Act DDname Data Set Name Actions: B E V M F C I Q
B3RES1 SHR,KEEP > ISPTLIB ISP.SISPTENU
...
A4USR1 SHR,KEEP > COLIN.S0W1.ISPF.ISPPROF
Easy once you know how.
On the CBTAPE are KONCAT and CONCAT which do a similar function.