I have a panel where there are two hundred lines of input and each line has 4 fields to be keyed in . I know that is too much but that is what they need. The user can type in 200 lines of input. I need to validate those and pass to Rexx and write them to file.
Now, I have designed the panel, to get the values from the user and verify it. This seems to be too big to assign the fields names and verify all the (200 * 4 ) 800 fields in panel. 200 lines and each line has 4 fields
Is there any other way to do it better. Please advice how to do that.
Assuming that the user wants to have the possibility to fill more than one line at a time:
1. in panel, use )MODEL to define a single row with 5 fields (Seqnum, V, D, S and P).
2. Use TBCREATE to create an ISPF table (1 key: Seqnum, 4 fields: V, D, S and P)
3. Use TBADD to add 200 "empty" rows in the table (fill only Seqnum)
4. Use TBDISPL to display the panel with 200 rows.
5. Collect all modified lines (using ZTDSELS).
I have created a panel as described and it works for me. I did a couple of changes to the panel top, most importantly I use the BODY EXPAND command and have added a scroll field after the command field.
So vidyaa I must ask again, what exactly does not work for you?
I agree with the other posters that this would be a case for a table application, as I have run into problems with the size of a panel area in the past. However a table display is not trivial either, which is why I have written a subroutine to handle all the standard stuff (display, insert, delete, find etc) for my own applications.
This seems to be too big to assign the fields names and verify all the (200 * 4 ) 800 fields in panel
Do you get an error message? if so, which?
I think what vidyaa means is that nobody really wants a panel which is over 1000 lines long.
Also, DEPT and GROUP are only 3 characters long. Which means that from 'D100' and 'P100' until the end, you have to use ZVARS and it will make things a bit messy.
Without context, it is difficult to give a good answer (other than a technical answer):
- Is this used for data input only, or can the list be displayed ?
- Can it be updated ?
- Can I insert 50 lines today and finish the work tomorrow ?
- Where does the data come from ?
- Where is the data saved ?
vidyaa, ISPF table services can be a bit complicated to use, so perhaps you should stick to your original panel. For your 3-byte field, you can use letters in the variable name like DAA-DAZ, DA0-DA9 etc, which should give you enough possibilities for your 200 line display. Not pretty, but perhaps simpler than ZVARS.
For a demo of a full-blown table service application see XISPTBL at my website http://harders-jensen.com/wjtech/programs.html - it demos a called REXX pgm to handle the table display, filter and update.