IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Array Declaration for ZVARS in Panel


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravikanth

New User


Joined: 12 Jan 2006
Posts: 29

PostPosted: Thu Apr 23, 2009 3:02 am
Reply with quote

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

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Thu Apr 23, 2009 5:49 am
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 23, 2009 11:28 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Call program, directly from panel CLIST & REXX 9
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts panel creation question TSO/ISPF 12
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top