Page 1 of 2
Multiple Sel/endsel in skeleton
Posted:
Fri Apr 23, 2021 4:45 pm
by shiisama
Hi,
I did a rexx panels where you can enter some choices, i use the variables &W and &K.
And i did a squels (skeleton) where i want to use the SEL/ENDSEL function.
I want when &K= O && &W = N
It doessomething
And when &W= O && &K = N
Do an other thing.
Actually when &K = O && W = N , it work but the other function doesn't.
Do someone know how to do it ?
Thanks
Re: Multiple Sel/endsel in skeleton
Posted:
Fri Apr 23, 2021 10:51 pm
by willy jensen
Try listing the values before the )SEL statement, just to make sure that they are as you expect, i..e
K = &K
W =&W
Re: Multiple Sel/endsel in skeleton
Posted:
Fri Apr 23, 2021 10:52 pm
by willy jensen
And please use the 'code' tags instead of screen shots.
Re: Multiple Sel/endsel in skeleton
Posted:
Fri Apr 23, 2021 11:47 pm
by sergeyken
Why not:
)IF &K= O && &W = N THEN )DO
It does something
)ENDDO
)ELSE )IF &W= O && &K = N THEN )DO
Do another thing.
)ENDDO
Re: Multiple Sel/endsel in skeleton
Posted:
Sat Apr 24, 2021 5:09 am
by shiisama
willy jensen wrote:And please use the 'code' tags instead of screen shots.
If i list the variable before the sel statement it doesn't work anymore
Re: Multiple Sel/endsel in skeleton
Posted:
Sat Apr 24, 2021 7:28 am
by shiisama
sergeyken wrote:Why not:
)IF &K= O && &W = N THEN )DO
It does something
)ENDDO
)ELSE )IF &W= O && &K = N THEN )DO
Do another thing.
)ENDDO
i tried the loop with if and it doesn't work too
only the sel loop is working
Re: Multiple Sel/endsel in skeleton
Posted:
Sat Apr 24, 2021 1:40 pm
by willy jensen
What do you mean, it doesnt work anymore if you add those 2 displays? Do you get an error message from the FTINCL command?
Anyway, I did a quick test and it works as expected, including listing the variables:
)SET W = O
)SET K = N
K = &K
W = &W
)SEL &K = O && &W = N
k=O and W=N
)ENDSEL
)SEL &K = N && &W = O
k=N and W=O
)ENDSEL
Re: Multiple Sel/endsel in skeleton
Posted:
Sat Apr 24, 2021 9:32 pm
by willy jensen
Re error messages, I recommend that you do something like this:
Address ispexec "control errors return"
Address ispexec "TBOPEN ..."
zerrlm=''
Address ispexec "TBINCL" skelname
if rc<>0 then say 'Include skel' skelname 'rc' rc 'msg' zerrlm
Re: Multiple Sel/endsel in skeleton
Posted:
Sat Apr 24, 2021 11:19 pm
by shiisama
[quote="willy jensen"]What do you mean, it doesnt work anymore if you add those 2 displays? Do you get an error message from the FTINCL command?
I don't have any error but the loop doesn't execute anymore.
For example when i just have the sel loop for w = o
The rexx gonna execute and work
And if i had before the sel loop
w =&w
The rexx execute, it say "the program have been executed" but it doesn't work
Re: Multiple Sel/endsel in skeleton
Posted:
Sun Apr 25, 2021 2:49 am
by willy jensen
I am confused, you started talking about a problem in skeleton services, but now you say that you have a logical problem in a REXX?
I would really like to see a trace of the REXX portion that fails, especially the part with the FTINCL command. Please list the ZERRLM variable after FTINCL, like SAY 'errlm='ZERRLM. Also a list of the skeleton would be helpful.