Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
REXX panel problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
Author Message
jz1b0c

Active User


Joined: 25 Jan 2004
Posts: 180
Location: Toronto, Canada

PostPosted: Wed Feb 25, 2004 7:07 pm    Post subject: REXX panel problem
Reply with quote

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
View user's profile Send private message
References
PostPosted: Wed Feb 25, 2004 7:07 pm    Post subject: Re: REXX panel problem Reply with quote

bluebird

Specialist


Joined: 03 Feb 2004
Posts: 144

PostPosted: Thu Feb 26, 2004 7:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
RobertL

New User


Joined: 02 Jan 2004
Posts: 4
Location: Portugal

PostPosted: Thu Feb 26, 2004 7:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
RobertL

New User


Joined: 02 Jan 2004
Posts: 4
Location: Portugal

PostPosted: Thu Feb 26, 2004 7:38 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1