The LSTVAR tag defines a )MODEL section
variable model line displayed in the ISPF table display area of a
panel.
Syntax
>>-<LSTVAR--DATAVAR=variable-model-name--+--------+-->---------->
'-LINE=n-'
>--+----------------+--+-----------+---------------------------><
'-column-heading-' '-</LSTVAR>-'
Parameters
- DATAVAR=variable-model-name
- This
is the data that occupies the column. The variable-model-name value
must be a variable model line name (without a leading % sign).
- LINE=n
- This
attribute provides the application the ability to place a LSTVAR model
variable on different model lines. ISPF defines the range of lines
as 1 to 8. The default is 1. Headings are generated on multiple
lines to match the LSTVAR field placement.
- column-heading
- This is the text of the model variable heading.
Comments
In conjunction
with the LSTFLD and LSTCOL tags, LSTVAR tags provide a means of defining
a vertically scrollable list display area that is made up of data
coming from ISPF tables. One or more ISPF )MODEL section statements
are built to display the fields defined by the LSTVAR tags. The use
of LSTVAR tags requires the use of the TBDISPL service in the application
program.
The application must place valid data in the variable
model line before the panel is displayed.
You can use the
LINE attribute to format your table to display on multiple lines.
Restrictions
- You must code the LSTVAR tag within a LSTFLD tag. See LSTFLD (List Field) for a complete description of
this tag.
- Only MODEL lines that are not blank fields are written in the
panel body. Thus, if one LSTVAR entries specifies LINE=1 and another
specifies LINE=3, but there are no entries for LINE 2, only two MODEL
lines are created.
Examples
Here is
source file markup where the application panel contains a list field
with five list columns and 2 variable model lines. The first three
columns are defined as output-only, and are coded within the
Subscriber
Name list group. The
Number column is an input/output column,
and it is coded within the
Phone list group. The last column
is input-only, and it is coded within the
Approved list group.
This column requires input, so if it is not filled in, the error message
MSGG886 is
displayed. The variable declarations and classes associated with the
list columns are also shown.
Note: The variable model lines are shown
in the formatted output to illustrate the formatting process. The
application must provide valid values for these variables before the
panel is displayed.
Figure 1 shows
the formatted result of the application panel.
<!DOCTYPE DM SYSTEM>
<VARCLASS NAME=namecls TYPE='char 15'>
<VARCLASS NAME=midcls TYPE='char 1'>
<VARCLASS NAME=phoncls TYPE='char 12'>
<VARCLASS NAME=appcls TYPE='char 1'>
<XLATL FORMAT=upper>
</XLATL>
<CHECKL>
<CHECKI TYPE=values PARM1=EQ PARM2='Y N'>
</CHECKL>
<VARLIST>
<VARDCL NAME=xfname VARCLASS=namecls>
<VARDCL NAME=xlname VARCLASS=namecls>
<VARDCL NAME=xmid VARCLASS=midcls>
<VARDCL NAME=xphone VARCLASS=phoncls>
<VARDCL NAME=xapp VARCLASS=appcls>
</VARLIST>
<PANEL NAME=lstvar KEYLIST=keyltbl>Subscriber List
<TOPINST>Enter phone number, if missing,
(format - nnn-nnn-nnnn) and approved
indicator (y or n) for each person.
<AREA>
<LSTFLD>
<LSTVAR datavar=xmodelv1>Variable model line at top
<LSTGRP HEADLINE=yes>Subscriber Name
<LSTCOL DATAVAR=xfname USAGE=out line=2 COLWIDTH=15>First Name
<LSTCOL DATAVAR=xlname USAGE=out line=2 COLWIDTH=15>Last Name
<LSTCOL DATAVAR=xmid USAGE=out line=2 COLWIDTH=1>MI </LSTGRP>
<LSTGRP>Phone
<LSTCOL DATAVAR=xphone line=2 COLWIDTH=12>Number
</LSTGRP>
<LSTGRP>Approved
<LSTCOL DATAVAR=xapp USAGE=in line=2 REQUIRED=yes
COLWIDTH=1 MSG=msgf886>(Y or N)
</LSTGRP>
<LSTVAR datavar=xmodelv2 line=3>Variable model line at bottom
</LSTFLD>
</AREA>
<CMDAREA>
</PANEL>
Figure 1. List variable Subscriber List
Enter phone number, if missing, (format - nnn-nnn-nnnn)&cont.
and approved
indicator (y or n) for each person.
--------- Subscriber Name ---------- Phone
Approved
Variable model line at top
First Name Last Name MI Number (Y or N)
Variable model line at bottom
&XMODELV1
_______________ _______________ _ ____________ _
&XMODELV2
Command ===> ______________________________________________________________
F1=Help F2=Split F3=Exit F7=Backward F8=Forward
F9=Swap F12=Cancel