is it possible to get the variables in the expression?



IBM's Command List programming language & Restructured Extended Executor

is it possible to get the variables in the expression?

Postby SKANDA » Wed Aug 31, 2016 11:37 am

hi,
I want to compare the working storage variables with the operands used in the expression.

eg:
if (ab = c + gf) | (klh = klg +tre) then
do
stm1
end

here I want to get the operands alone used in the above expressions and want to store those operands in an array.
please help me out..
SKANDA
 
Posts: 30
Joined: Thu Aug 04, 2016 7:50 pm
Has thanked: 17 times
Been thanked: 0 time

Re: is it possible to get the variables in the expression?

Postby willy jensen » Wed Aug 31, 2016 1:08 pm

First of all, REXX do not have arrays. REXX have stems, which looks like but are not arrays.
You can do

mystem.1=c
mystem.2=gf
 

and so on. Not really sure what you want to accomplish though.
If all you want to do is display the values as your program runs, then look at the 'trace' instruction, specifically 'trace i' in this case.
willy jensen
 
Posts: 467
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 70 times

Re: is it possible to get the variables in the expression?

Postby Pedro » Wed Aug 31, 2016 9:43 pm

compare the working storage variables with the operands used in the expression.

They are the same. They are the same unless you somehow made changes that you have not shown.

Like Willy, I do not really understand what you mean. Perhaps you can elaborate on your terminology.
Pedro Vera
User avatar
Pedro
 
Posts: 686
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Re: is it possible to get the variables in the expression?

Postby SKANDA » Thu Sep 01, 2016 5:23 pm

Hi,
My requirement is, to check if all the variables used in the arithmetic expressions of COBOL program are defined in comp3 type or not ..
I want to verify this using rexx coding
for that ,initially I stored all the variable in working storage section in stems
and then I tried to extract the variables used by the expressions in cobol program , to compare with the working storage section ..
but I couldn't .
how to fix this using REXX code...?

Many Thanks
SKANDA
SKANDA
 
Posts: 30
Joined: Thu Aug 04, 2016 7:50 pm
Has thanked: 17 times
Been thanked: 0 time

Re: is it possible to get the variables in the expression?

Postby enrico-sorichetti » Thu Sep 01, 2016 5:31 pm

topic locked, duplicate of

clist-rexx/topic11243.html
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 3006
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 165 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post