|
View previous topic :: View next topic
|
| Author |
Message |
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
Hi,
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.
| Code: |
****** ***************************** Top of Data ******************************
000001 )ATTR
000002 _ TYPE(INPUT) INTENS(HIGH) JUST(RIGHT)
000003 ~ TYPE(INPUT) INTENS(HIGH) JUST(LEFT)
000004 + TYPE(TEXT) INTENS(LOW) SKIP(ON)
000005 # AREA(SCRL) EXTEND(ON)
000006 )BODY
000007 %-----------------xxxxxxxxxxxxxxx GROUP MOVE-----------------
000008 %TSO COMMAND LINE ===>_ZCMD
000009 %
000010 #MYAREA ----------------------------------------------------------------
000011 )AREA MYAREA DEPTH(50)
000012 +
000013 + %VENDOR DEPT STORE GROUP
000014 + 1. _V1 + _D1 + _S1 + _P1 +
000015 + 2. _V2 + _D2 + _S2 + _P2 +
000016 + 3. _V3 + _D3 + _S3 + _P3 +
000017 + 4. _V4 + _D4 + _S4 + _P4 +
......................................... 200 lines like the above
)INIT
)PROC
VER(&V1,NUM)
VER(&D1,LIST,'02A','02M','02S','03A','03B','03C','03T','01 ','01B')
VER(&S1,NB,RANGE,01,99999)
VER(&P1,NB,RANGE,01,16)
|
this goes very long. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
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).
While checking myself, I found a chapter named "Adding table rows dynamically during table display scrolling" in the ISPF Dialog Developer's Guide and Reference.
I would try first my own suggestion (with a small number of lines) then, after I understand exactly how it works, I would try dynamically adding rows. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 766 Location: Denmark
|
|
|
|
I am curious, what do you mean by
| Quote: |
| 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? |
|
| Back to top |
|
 |
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I am a big fan of panels. I use them all the time.
I also use ISPF tables as well.
I agree with Marso's approach on how to handle your inquiry.
Where I disagree, is with your approach to have the user enter 800 fields on a panel.
I would have the user create a sequential file with the data in specific columns.
This will allow the user to enter the data as they see fit.
They can repeat lines, where three of the fields are the same, only changing the fourth field.
They can split the work among multiple people, and join together.
You can then write a small Rexx validation program they can run as they go, and when they are finished.
Just a thought from my thirty years of experience. |
|
| Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2622 Location: Silicon Valley
|
|
|
|
Are all of the rows the same? were they have the same VER statements?
If so, then I also agree that using a table is a better solution. And you can add line commands to repeat, delete, insert lines, etc which would have some of the benefits of using a data set.
If the rows are slightly different, then you might be better of using the panel in your post. |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 766 Location: Denmark
|
|
|
|
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.
| Code: |
)ATTR
_ TYPE(INPUT) color(turq) hilite(uscore) caps(on)
~ TYPE(INPUT) INTENS(HIGH) JUST(LEFT)
+ TYPE(TEXT) INTENS(LOW) SKIP(ON)
# AREA(SCRL) EXTEND(ON)
)BODY expand(\\)
%\ \GROUP MOVE\ \+
%Command ===>_ZCMD\ \+Scrl_scrl+
%
#MYAREA \ \#
)AREA MYAREA
+
+ %VENDOR DEPT STORE GROUP
+ 1 + _V1 + _D1 + _S1 + _G1 +
- - - - - - - - - - - - - - - - - - 199 Line(s) not Displayed
)INIT
)PROC
VER(&V1,NUM)
VER(&D1,LIST,'02A','02M','02S','03A','03B','03C','03T','01 ','01B')
VER(&S1,NB,RANGE,01,99999)
VER(&P1,NB,RANGE,01,16)
- - - - - - - - - - - - - - - - - - 796 Line(s) not Displayed
)END
|
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. |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
| Willy Jensen wrote: |
I am curious, what do you mean by
| Quote: |
| 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 ? |
|
| Back to top |
|
 |
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
| This is the input keyed by the user and they wanted n number of lines to be given as input, validated and written to a output file |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 766 Location: Denmark
|
|
|
|
| if you are talking about a varying number of lines, then a table display is certainly the way to go. |
|
| Back to top |
|
 |
enrico-sorichetti
Superior Member

Joined: 14 Mar 2007 Posts: 10900 Location: italy
|
|
|
|
without doubt the TS has been given a task well above his competence level
he is the victim here  |
|
| Back to top |
|
 |
vidyaa
New User
Joined: 02 May 2008 Posts: 77 Location: chennai
|
|
|
|
| so by using table can I have the user key in n number of lines? how to do that can you please give a sample of it |
|
| Back to top |
|
 |
Willy Jensen
Active Member

Joined: 01 Sep 2015 Posts: 766 Location: Denmark
|
|
|
|
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 harders-jensen.com/wjtech/programs.html - it demos a called REXX pgm to handle the table display, filter and update. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|