NicC wrote:... I noticed that one post on the forum used the command CONCAT but that must be a "home-grown" thing as I get "COMMAND NOT FOUND" here. It is probably a simple little exec but...
The easiest is the standard ALLOCATE command:
ALLOCATE FILE(SYSLIB) SHR REUS DATASET('SYS1.MACLIB' 'SYS1.MODGEN')
This has been in the ALLOCATE command for a very long time, possible going back to the original TSO/E.
Many shops have a CONCAT command of some sort, and it is possible to write a CLIST or Rexx EXEC, as NicC suggests. A CONCAT command is a good assignment for a beginner Assembler programmer. The simplest is frequently something like
CONCAT (DD-name DD-name ... DD-name)
The dd names in the list must be allocated, and they are concatenated so the first name is the name of the concatenation.
For example -
ALLOCATE FILE(SYSLIB) SHR REUS DATASET('SYS1.MACLIB')
ALLOCATE FILE(S2) SHR REUS DA('SYS1.MODGEN')
CONCAT (SYSLIB S2)
A CONCAT command is usually paired with a DECONCAT command to break the concatenation. There are fancier commands, like
CONCAT FILE(DD-name) DATASET(data set list)
That will insert the data set to the beginning of the concatenation if the file is already allocated, or just do the allocation, usually SHR.