Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Join two stem variables?

Status
Not open for further replies.

vsiano

Programmer
Sep 7, 2007
2
US
hello,
i have 2 stem variables i would like to join into 1 large one. dataA. and dataB. to create dataALL.

is there a way to do this without looping?

thanks,
val
 
There's no native way to do this, but looping will be lightning fast.

Why don't you want to do this in a loop?

Frank Clarke
--Now officially with no one I can vote for in '08...
 
Hi Val,

You can do it using the PIPE command. Like this example:

/* */
a.1='a1'
a.2='a2'
a.0=2
b.1='b1'
b.2='b2'
b.0=2
'pipe stem a. | append stem b. | stem c.'
say c.0
do i=1 to c.0
say c.i
end

Stem c. is the concatenation of a. and b.
 
Under straight z/OS you can do this like so:

do i=1 to dataA.0
dataAll.i = dataA.i
end

do j=1 to dataB.0
i=j+dataA.0
dataAll.i = dataB.j
end

dataAll.0 = dataA.0 + dataB.0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top