Page 1 of 1

concatenate datasets in REXX

PostPosted: Tue Mar 30, 2010 3:14 pm
by Divya_cts2010
Please let me know the REXX command for concatenating datasets in REXX

I gave the following command from Start 6 option in ISPF panel.
CONCAT FILE(SYSPROC) DA('TXBX1.CLIST') SHR REUSE

It says concat command not found

please can someone let me know the exact command?

Thanks,
Divya

Re: concatenate datasets in REXX

PostPosted: Tue Mar 30, 2010 5:05 pm
by MrSpock
I'm not aware of any standard REXX, TSO, or ISPF commands or services that will concatenate datasets. That process is usually handled by the system, either by the way the datasets are allocated in the JCL, or in TSO by using the TSO ALLOCATE command. In ISPF, you can use the QBASELIB Service to obtain the current Library information for a specified DDNAME. You can combine these two together to add datasets to an existing DDNAME.

In TSO/E, you can use the ALTLIB command to define alternative application libraries for REXX execs and CLISTs, if that is your real intent with this.

Re: concatenate datasets in REXX

PostPosted: Fri Apr 02, 2010 2:00 am
by Pedro
You can do this:
1. allocate your new dataset to a new file name, say TEMP2.
ALLOCATE FILE(TEMP2) DA('TXBX1.CLIST') SHR REUSE
2. use bpxwdyn to concatentate the two file names.
CALL *(bpxwdyn) 'CONCAT DDLIST(SYSPROC,TEMP2)'

Re: concatenate datasets in REXX

PostPosted: Fri Apr 16, 2010 4:09 pm
by Maheshk84
Copy the contents of first file into an array 'Array1', second file into another array 'Array2' and write it out to a single file.