The ASSIGNL tag defines an assignment
list.
Syntax
>>-<ASSIGNL--DESTVAR=destination-variable-name-->--</ASSIGNL>--><
Parameters
- DESTVAR=destination-variable-name
- DESTVAR
specifies the variable that receives the assignment value. You can
code multiple assignment lists if you need to assign values to additional
variables.
Note: If the destination-variable-name is
a variable name used for another field on the panel, the value of
the other field is overlaid by the assignment value. The destination-variable-name should
only be used for an output field variable.
Comments
The
ASSIGNL tag defines an assignment list. ASSIGNI tags, which define
the elements of the assignment list, are coded within the ASSIGNL
tag.
Assignment lists are optional and provide a means of assigning
a value to one variable based on the content of another. ISPF compares
the value of the variable specified with the DATAVAR attribute of
the DTAFLD tag against the values in the ASSIGNI tags.
Processing
of assignment lists occurs at panel end (after translates and checks).
Restrictions
- The ASSIGNL tag requires an end tag.
- You must code an ASSIGNL tag within the DTAFLD definition it is
associated with. See DTAFLD (Data Field) for
a complete description of this tag.
Examples
In
this example markup, the assignment list assigns a value to the variable
decimal dependent
on the value the user enters in the data field variable
hexvar.
The associated variable declarations and variable classes are also
shown.
<!DOCTYPE DM SYSTEM>
<VARCLASS NAME=varcls1 TYPE='char 1'>
<VARCLASS NAME=varcls2 TYPE='char 2'>
<VARLIST>
<VARDCL NAME=hexvar VARCLASS=varcls1>
<VARDCL NAME=decimal VARCLASS=varcls2>
</VARLIST>
<PANEL NAME=assignl>Hex to Decimal
<TOPINST>Enter a hexadecimal digit.
<AREA>
<DTAFLD DATAVAR=hexvar PMTWIDTH=23 ENTWIDTH=1>Hexadecimal Value
<ASSIGNL DESTVAR=decimal>
<ASSIGNI VALUE=0>
<ASSIGNI VALUE=1>
<ASSIGNI VALUE=2>
<ASSIGNI VALUE=3>
<ASSIGNI VALUE=4>
<ASSIGNI VALUE=5>
<ASSIGNI VALUE=6>
<ASSIGNI VALUE=7>
<ASSIGNI VALUE=8>
<ASSIGNI VALUE=9>
<ASSIGNI VALUE=a RESULT=10>
<ASSIGNI VALUE=b RESULT=11>
<ASSIGNI VALUE=c RESULT=12>
<ASSIGNI VALUE=d RESULT=13>
<ASSIGNI VALUE=e RESULT=14>
<ASSIGNI VALUE=f RESULT=15>
<ASSIGNI RESULT="??">
</ASSIGNL>
<DTAFLD DATAVAR=decimal USAGE=out PMTWIDTH=23 ENTWIDTH=2>Decimal Value
</AREA>
</PANEL>