View previous topic :: View next topic
|
Author |
Message |
Andy85
New User
Joined: 25 Dec 2008 Posts: 35 Location: India
|
|
|
|
Hi,
I have a REXX that reads contents from 2 files, edits the lines and concatenates into a single output file. I am reading the data into different stem variables. Is there any way to concatenate both the stem variables into a single stem variable? I tried using "PIPE" but its giving RC=-193, probably due to a library issue. Are there any alternate ways (other than looping through the stem) to concatenate these two stem/compound variables?
Code: |
ADDRESS TSO
"PIPE STEM FILE1. | APPEND STEM FILE2. | STEM OUTFILE. "
|
|
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Try something like
Code: |
Outrec.I = File1.I||File2.I |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
I think they want all of the records of file1 followed by all of the records of file2 in the same stem.
The answer is no, there is no way other than to loop through.
I am not a plumber (someone who uses PIPES), but think you should investigate that problem more. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
why not keep it simple and do two writes - one for each stem? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
As I read this, you read two files into two stems.
Why not do the file concatenation in
a) The JCL if in batch
b) At allocation time if foreground
Code: |
//DDNAME DD DSN=..................,DISP=SHR
// DD DSN=..................,DISP=SHR
|
Code: |
"ALLOC FI(DDNAME) DA('dataset name' 'dataset name') SHR" |
|
|
Back to top |
|
|
Andy85
New User
Joined: 25 Dec 2008 Posts: 35 Location: India
|
|
|
|
Thanks expat !!! I did the second approach of using both datasets during allocation and thus got all the contents in the same stem variable. |
|
Back to top |
|
|
|