IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Concatenate two stem/compound variables


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Andy85

New User


Joined: 25 Dec 2008
Posts: 35
Location: India

PostPosted: Sat Jun 29, 2013 3:03 am
Reply with quote

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
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Sat Jun 29, 2013 8:24 am
Reply with quote

Try something like
Code:

Outrec.I = File1.I||File2.I
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Sat Jun 29, 2013 8:27 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Sat Jun 29, 2013 10:41 pm
Reply with quote

why not keep it simple and do two writes - one for each stem?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sun Jun 30, 2013 3:53 pm
Reply with quote

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
View user's profile Send private message
Andy85

New User


Joined: 25 Dec 2008
Posts: 35
Location: India

PostPosted: Mon Jul 01, 2013 8:15 pm
Reply with quote

Thanks expat !!! I did the second approach of using both datasets during allocation and thus got all the contents in the same stem variable. icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts JCL with variables JCL & VSAM 1
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL Variables JCL & VSAM 1
No new posts reset/clear ALL application profile v... TSO/ISPF 3
Search our Forums:

Back to Top