Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Array Declaration for ZVARS in Panel

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Array Declaration for ZVARS in Panel
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: 401
Location: Mumbai

PostPosted: Thu Apr 23, 2009 5:49 am    Post subject: Reply to: Array Declaration for ZVARS in Panel
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: 8593
Location: Back in jolly old England

PostPosted: Thu Apr 23, 2009 11:28 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Rexx Panel Validation ajithajt CLIST & REXX 6 Sun Jul 17, 2016 10:50 pm
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
This topic is locked: you cannot edit posts or make replies. Providing inputs to a panel of anothe... Raghur CLIST & REXX 2 Tue Apr 05, 2016 12:01 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us