View previous topic :: View next topic
|
Author |
Message |
ravikanth
New User
Joined: 12 Jan 2006 Posts: 29
|
|
|
|
Hi All,
I need to design a panel which will accept 100 employee id's of the same data type. When the user enters, I need to write out each NONBLANK, Numeric values to a file. It could be possible that User can enter any where on the panel, meaning some of them could be blanks in between.
Currently I have defined 100 ZVARS variables and checking each one, which makes my code look bad. I want to avoid this, finally the panel should be capable to accept upto 500 Id's which makes it more bad.
So can i define an Array (EmpId{i}) for ZVARS in the Panel. And loop thru i = 1 to 100 to check for each of the 100 items and then write it out when it NONBLANK and Numeric.
If not what is the best way to achieve this functionality.
Ravikanth Chavali |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Look at ISPF tables and the TBDISPL service. Or you can use something called a 'dynamic area' to do what you want. Either one will work. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Quote: |
Currently I have defined 100 ZVARS variables and checking each one, which makes my code look bad |
Can easily be done in the REXX that controls the panel display. This is a snip from one of my REXX programs, which accepts data entry from 50 fields until the user hits PF3 to end the input process.
Code: |
DO FOREVER
DO A = 1 TO 50
INTERPRET "D"A " = ' '"
END
"ISPEXEC DISPLAY PANEL(xxxxxx)"
IF RC = 8 THEN LEAVE
DO A = 1 TO 50
INTERPRET "DELFLD = D"A
IF DELFLD <> ' '
THEN QUEUE DELFLD
END
END
|
|
|
Back to top |
|
|
|