Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Concatenate two stem/compound variables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Concatenate two stem/compound variables
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

Moderator


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

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

Try something like
Code:

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

Senior Member


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

PostPosted: Sat Jun 29, 2013 8:27 pm    Post subject: Reply to: Concatenate two stem/compound variables
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: 1712
Location: UK

PostPosted: Sat Jun 29, 2013 10:41 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sun Jun 30, 2013 3:53 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts RFE: Additional compound operators fo... prino PL/I & Assembler 1 Wed Jun 08, 2016 3:31 pm
No new posts TWS 'global' or 'local' variables Steve Coalbran IBM Tools 2 Thu Mar 17, 2016 7:40 pm
No new posts Concatenate different LRECL GDG's Rohit Umarjikar DFSORT/ICETOOL 6 Wed Nov 18, 2015 3:30 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us