Page 1 of 1

Concatanate datasets

PostPosted: Mon Jun 22, 2009 9:05 pm
by manojlives
I need to allocate multiple datatset to a common name, is it possible?


Alloc da('dataset1') f(inpt) shr reuse

Now i need to allocate dataset 1,2,3 to inpt , is this possible?

Re: Concatanate datasets

PostPosted: Mon Jun 22, 2009 9:17 pm
by MrSpock
Read the documentation on the ALLOCATE command, or us the TSO HELP ALLOCATE command for the details. Some specifics:

- DATASET(dsname) specifies the name or a list of names of the data sets that are to be allocated. If a list of data set names is entered, ALLOCATE allocates and concatenates non-VSAM data sets.

- The data sets specified in the list must be cataloged.

- The maximum number of data sets that you can concatenate is 255.

- The data set group is concatenated. You must free it to deconcatenate it. The file name specified for the FILE or DDNAME operand on the ALLOCATE command must be the same as that specified for the FILE or DDNAME operand on the FREE command.

So, in your case, use Alloc da('dataset1','dataset2','dataset3') f(inpt) shr reuse