|
|
| Author |
Message |
jz1b0c
Active User
Joined: 25 Jan 2004 Posts: 180 Location: Toronto, Canada
|
|
|
|
I am displaying a panel
r01c r02c r03c r04c
r11c r12c r13c r13c
.....
....
r71c r72c r73c r74c.
now in my rex I am reading a file and writting the fields r01c to r74c,
while assigning value to each field RijC (i=0,1,2...7, j=1,2,3,4) I am writting code like
R01C= assign(); /* this is a function which returns the value for the filed */
R02C= assign(); and so on for 8 * 4 times,
but it doesnot look good to see 32 assign statements, so i want to keep that in a loop.
but the variable RijC is not a stem/table so how can I put that in a loop
is there any logic by which this can be solved?
your timely help is required.
thanx in advance |
|
| Back to top |
|
 |
References
|
Posted: Wed Feb 25, 2004 7:07 pm Post subject: Re: REXX panel problem |
 |
|
|
 |
bluebird
Specialist
Joined: 03 Feb 2004 Posts: 144
|
|
|
|
here is a loop that may help :
| Code: |
/* rexx */
address tso
hh='ro!!i=ac!!I'
do i =1 to 32
test='ro'!!i!!'c'
m=value(test)
m='acm'!!i <= here code m=assign() instead
end
|
|
|
| Back to top |
|
 |
RobertL
New User
Joined: 02 Jan 2004 Posts: 4 Location: Portugal
|
|
|
|
How about the following...
| Code: |
/* rexx */
address tso
do i = 1 TO 7
do j = 1 TO 4
varname = 'R'||i||j||'C'
a = assign(varname)
CALL VALUE varname,a
END
END
|
Regards,
Robert |
|
| Back to top |
|
 |
RobertL
New User
Joined: 02 Jan 2004 Posts: 4 Location: Portugal
|
|
|
|
How about the following...
oops... its 0-7 not 1-7...
| Code: |
/* rexx */
address tso
do i = 0 TO 7
do j = 1 TO 4
varname = 'R'||i||j||'C'
a = assign(varname)
CALL VALUE varname,a
END
END
|
Regards,
Robert |
|
| Back to top |
|
 |
|
|