|
The VARCLASS tag defines information related
to a class of variables.
Syntax
>>-<VARCLASS--NAME=variable-class-name-------------------------->
>----TYPE=--+-'CHAR maximum-length'---------------------------+---->
+-'DBCS maximum length'---------------------------+
+-'MIXED maximum-length'--------------------------+
+-'ANY maximum-length'----------------------------+
+-'EBCDIC maximum-length'-------------------------+
+-'%varname maximum-length'-----------------------+
+-ITIME-------------------------------------------+
+-STDTIME-----------------------------------------+
+-IDATE-------------------------------------------+
+-STDDATE-----------------------------------------+
+-JDATE-------------------------------------------+
+-JSTD--------------------------------------------+
+-'VMASK maximum-length'--------------------------+
| .-0-----------------. |
'-'NUMERIC total-digits--+-fractional-digits-+--'-'
>--+------------------------+-->--+-------------+--------------><
'-MSG=message-identifier-' '-</VARCLASS>-'
Parameters - NAME=variable-class-name
- This
attribute specifies the name of this variable class.
The variable-class-name must
follow the standard naming convention described in Rules for variable names.
- TYPE=type of data
- This
attribute specifies the data type and display length characteristics
for variables that refer to the variable class.
For data fields
and list columns, the conversion utility uses the lengths specified
in this attribute when CHOFLD or DTAFLD ENTWIDTH or LSTCOL COLWIDTH
attributes cannot otherwise be determined. The lengths specified control
the width of the data field in the panel.
The allowable TYPE
values are: - 'CHAR maximum-length'
- This
specifies a character string for which the maximum length, in bytes,
is given by maximum-length.
- 'DBCS maximum-length'
- This
is a double-byte character string for which the maximum length, in
bytes, is given by maximum-length. The maximum
length must an even number.
- 'MIXED maximum-length'
- This
specifies a character string containing single-byte characters, double-byte
characters, or both for which the maximum length, in bytes, is given
by maximum-length. Strings of DBCS characters
are delimited by shift-out (SO) and shift-in (SI) codes.
- 'ANY maximum-length'
- This
attribute is processed by the conversion utility as TYPE=MIXED.
- 'EBCDIC maximum-length'
- This
specifies a character string containing only single-byte characters
for which the maximum length, in bytes, is given by maximum-length.
- '%varname maximum-length'
- This specifies that a variable name is
used to define the type of character string. The maximum length, in
bytes, is given by maximum-length. It is
the responsibility of the application developer to ensure that %varname contains
a valid TYPE value before attempting to display the panel.
- ITIME
- The
conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of ITIME is set
by the conversion utility to 5.
- STDTIME
- The conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of STDTIME is set
by the conversion utility to 8.
- IDATE
- The
conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of IDATE is set
by the conversion utility to 8.
- STDDATE
- The conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of STDDATE is set
by the conversion utility to 10.
- JDATE
- This
attribute is supported as an ISPF extension to the Dialog Tag Language. The
conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of JDATE is set
by the conversion utility to 6.
- JSTD
- This
attribute is supported as an ISPF extension to the Dialog Tag Language. The
conversion utility adds a "VEDIT (variable)"
statement to the )PROC section of the panel for variables which are
related to this VARCLASS. The default length value of JSTD is set
by the conversion utility to 8.
- 'VMASK maximum-length'
- This
attribute is supported as an ISPF extension to the Dialog Tag Language. The
VMASK attribute is provided to support the user mask option the ISPF
VMASK service. The maximum-length value
is limited to the ISPF maximum of 20. The conversion utility adds
a "VEDIT (variable)" statement to the )PROC
section of the panel for variables which are related to this VARCLASS.
- 'NUMERIC total-digits 0 |
fractional-digits'
- This attribute allows you to check to see
if the user has entered a valid number. A valid number can include
thousands separators, a decimal separator, and a sign. The conversion
utility builds the VER(variable ENUM) statement to perform numeric
validation. The value specified for total-digits must
not be greater than 16.
The total-digits and fractional-digits are
used to determine a maximum-length value
which is used for field entry width, if necessary, in DTAFLD and LSTCOL
processing. For example, ‘NUMERIC 8 2’ defines a width of 11, composed
of 8 possible digits, a decimal point, a thousands separator, and
a leading sign.
- MSG=message-identifier
- This
attribute indicates the default message to be displayed if the variable
fails any of the enclosed checks. See MSG (Message) for
information on creating messages.
Comments The
VARCLASS tag defines information related to a class of variables.
You can group validation and translation checks you want ISPF to perform
within one VARCLASS definition. You point to the VARCLASS definition
from one or more VARDCL tags you code within the VARLIST definition.
Note: The ISPF Dialog Tag Language conversion
utility does not require that you code the VARCLASS, VARDCL, or VARLIST
tags for a successful generation of a panel, command table, or message
member that includes variables. If the conversion utility finds a
variable that does not have an associated VARDCL definition, it issues
a warning message. The use of the VARCLASS, VARDCL, and VARLIST
tags is required if you want to use the facilities provided by the
CHECKL and XLATL tags.
Restrictions - You cannot code the VARCLASS tag within any other tag definition.
- You must code the VARCLASS tag before any other tag within the
source file that refers to it.
- Within the variable class definition, you must code any and all
XLATL tags before any CHECKL tags.
Examples Here
is an example that contains two variable classes. The first variable
class provides an alphabetic validity check. The second variable class
provides input translation to uppercase and validates that the input
is one of the listed values. Also shown in the markup are two input
data fields (within a PANEL definition) that refer to the variable
declarations associated with the variable classes. <!DOCTYPE DM SYSTEM>
<VARCLASS NAME=namec TYPE='char 25'>
<CHECKL>
<CHECKI TYPE=alpha>
</CHECKL>
<VARCLASS NAME=officec TYPE='char 4'>
<XLATL FORMAT=upper>
</XLATL>
<CHECKL>
<CHECKI TYPE=values PARM1=EQ PARM2='A101 A108 B210 B214'>
</CHECKL>
<VARLIST>
<VARDCL NAME=reserver VARCLASS=namec>
<VARDCL NAME=office VARCLASS=officec>
</VARLIST>
<PANEL NAME=varclass>Conference Room
<TOPINST>Enter the required information to reserve a conference room.
<AREA>
<DTACOL PMTWIDTH=20>
<DTAFLD DATAVAR=reserver USAGE=in ENTWIDTH=25>Name
<DTAFLD DATAVAR=office USAGE=in ENTWIDTH=4>Office number
</DTACOL>
</AREA>
</PANEL>
|