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
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!
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
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
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?
Thanks all.
Steve
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
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
Regards,
John Kalinich
Computer Sciences Corp
> -----Original Message-----
> From: Ahmad Farzanegan [mailto:ahmad.fa...@BTCLICK.COM]