Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clist concatenation

3 views
Skip to first unread message

Neeland, Steve

unread,
Feb 8, 2005, 12:31:12 PM2/8/05
to
I have an ISPF panel that prompts for Y or N for four variables (PN, PC,
PD and PE). At least one of the four have to be set to Y.


SET GROUPS = STR()
IF &PN EQ Y THEN SET GROUPS = NPKPROD
IF &PC EQ Y THEN SET GROUPS = &GROUPS CPKPROD
IF &PD EQ Y THEN SET GROUPS = &GROUPS DPKPROD
IF &PE EQ Y THEN SET GROUPS = &GROUPS EPKPROD
WRITE ********** &GROUPS

What I'm trying to do is build a new variable GROUPS that can have any
combination of specific literals with a space separating them based on
the Y/N answer supplied in the panel. My Clist coding skills are
horrible (and my Rexx questionable sometimes) but I know I'm screwing up
these IF statements during the concatenation. Any suggestions?

Thanks.
Steve


----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Dave Salt

unread,
Feb 8, 2005, 12:50:51 PM2/8/05
to
Hi Steve,

Presumably the panel verifies that each of the four fields does have a value
and that the value is either Y or N? If so, then all you need to do in your
CLIST is put an ampersand in front of STR; i.e:

SET GROUPS = &STR()

You can also get rid of the statement entirely as unlike REXX, CLIST doesn't
need to initialize variables to null. Or am I misunderstanding the question?
If so, please give an example of the output you'd like to see.

HTH,

Dave Salt
Soft-Center Solutions Inc.
http://www.soft-center.com
1-877-SoftCen
Bringing you SimpList(tm) - The easiest, most powerful way to surf a
mainframe!

Neeland, Steve

unread,
Feb 8, 2005, 1:05:09 PM2/8/05
to
I'm looking to get the variable GROUPS to contain the text "NPKPROD
CPKPROD" if the variables &PN and &PC both are set to "Y". Yes, the
panel does do the value checking before continuing.

I changed it to &STR() but it still fails when I have more than one of
the four values from the panel set to "Y".

SET GROUPS = &STR()

IF &PN EQ Y THEN SET GROUPS = NPKPROD
IF &PC EQ Y THEN SET GROUPS = &GROUPS CPKPROD
IF &PD EQ Y THEN SET GROUPS = &GROUPS DPKPROD
IF &PE EQ Y THEN SET GROUPS = &GROUPS EPKPROD
WRITE ********** &GROUPS

Robert Zenuk

unread,
Feb 8, 2005, 1:16:55 PM2/8/05
to
In a message dated 2/8/2005 10:31:21 AM US Mountain Standard Time,
Steve....@INGRAMBOOK.COM writes:

SET GROUPS = STR()
IF &PN EQ Y THEN SET GROUPS = NPKPROD
IF &PC EQ Y THEN SET GROUPS = &GROUPS CPKPROD
IF &PD EQ Y THEN SET GROUPS = &GROUPS DPKPROD
IF &PE EQ Y THEN SET GROUPS = &GROUPS EPKPROD
WRITE ********** &GROUPS


I'm reaching way back, but I think this is how you would syntactically do
this.

SET GROUPS = &STR()
IF &PN EQ Y THEN SET GROUPS = &NPKPROD
IF &PC EQ Y THEN SET GROUPS = &GROUPS &CPKPROD
IF &PD EQ Y THEN SET GROUPS = &GROUPS &DPKPROD
IF &PE EQ Y THEN SET GROUPS = &GROUPS &EPKPROD
WRITE ********** &GROUPS

You could also do the concatenation in the panel and avoid the CLIST code.

&GROUPS = '&PN &PC &PD &PE'


Hope This Helps,

Rob

Dave Salt

unread,
Feb 8, 2005, 1:26:13 PM2/8/05
to
Steve,

It works fine exactly as you have it. I executed this:

SET &PN = Y
SET &PC = Y
SET &PD = N
SET &PE = N


IF &PN EQ Y THEN SET GROUPS = NPKPROD
IF &PC EQ Y THEN SET GROUPS = &GROUPS CPKPROD
IF &PD EQ Y THEN SET GROUPS = &GROUPS DPKPROD
IF &PE EQ Y THEN SET GROUPS = &GROUPS EPKPROD
WRITE ********** &GROUPS

And it displayed this:

********** NPKPROD CPKPROD

Isn't that what you want? When you say it "fails", can you be more explicit?

Neeland, Steve

unread,
Feb 8, 2005, 1:53:00 PM2/8/05
to
I'm calling a mulligan on this one. My stupid code I was editing was
the wrong version that I was running. Good thing by co-worker gets the
important work this week!

Thanks all.
Steve

Ahmad Farzanegan

unread,
Feb 9, 2005, 6:03:16 AM2/9/05
to
Hi

Is there a way to read a VSAM file? using whatever is available in rexx i.e.
LM services so on. I like to read a VSAM file using the index as search
criteria, extract the row and display.

Can do all but reading the VSAM file. Converting VSAM to sequential is a
possibility but not preferable. How is it done in File-Aid?

Thanks & kind regards


Ahmad Farzanegan
Technical Specialist
* RBSG Technology

Baldon, David

unread,
Feb 9, 2005, 7:24:08 AM2/9/05
to
There is a package on the CBT tape that will allow you to read the VSAM file
from REXX. Look for a package called RXVSAM by Mark Winges.

Jeff Byrum

unread,
Feb 9, 2005, 7:27:26 AM2/9/05
to
There's a set of routines for accessing VSAM files from Rexx on the CBTTape called "RXVSAM". We use it extensively, and it's easy to use.

First, go to http://cbttape.org/

Click on "CBT" in the upper left hand corner and then look for File 268.

Hope this helps,
Jeff

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU]On Behalf

John Kalinich

unread,
Feb 9, 2005, 8:13:52 AM2/9/05
to
RXVSAM on the CBT tape, http://www.cbttape.org is what you need.

Regards,
John Kalinich
Computer Sciences Corp

> -----Original Message-----
> From: Ahmad Farzanegan [mailto:ahmad.fa...@BTCLICK.COM]

0 new messages