z/OS ISPF Dialog Tag Language Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


ASSIGNI (Assignment List Item)

z/OS ISPF Dialog Tag Language Guide and Reference
SC19-3620-00

The ASSIGNI tag defines an assignment in an assignment list.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-<ASSIGNI--+------------------+--+-----------------------+---->
             '-VALUE=test-value-'  '-RESULT=assigned-value-'   

>-->--+------------+-------------------------------------------><
      '-</ASSIGNI>-'   

Parameters

VALUE=test-value
This attribute specifies the value to be matched when performing the assignment.

The value of the data field variable is compared to the value of each VALUE attribute in succession until a match is found. The test-value must be the same case as the value to be matched. You can specify XLATL FORMAT=UPPER within the variable class associated with the data field to convert user input to uppercase before the assignment test is processed.

When ISPF finds a match, it assigns the value in the RESULT attribute to the variable named on the ASSIGNL tag. If ISPF does not find a match, no assignment is made.

If you omit this attribute, any value satisfies the test and ISPF assigns assigned-value to the dialog variable.

If a test-value appears more than once in the list, the first occurrence is used.

RESULT=assigned-value
This attribute specifies the resulting value of the assignment if a match occurs on the test-value specified by VALUE.

Assigned-value specifies the character string value for the conversion utility to assign to the variable named on the ASSIGNL tag. If you omit this attribute, the test-value is assigned to the variable.

Comments

The ASSIGNI tag defines an assignment in an assignment list. Each ASSIGNI tag provides information necessary to assign a value (the RESULT attribute) to a variable (specified with the ASSIGNL tag) based on the test-value (the VALUE attribute) of the variable named on the DTAFLD tag. As many ASSIGNI tags as are necessary (up to a limit of 126) can be included within the assignment list. The ISPF TRANS() function is used for ASSIGNI processing.

If both the VALUE and RESULT attributes are omitted, the DESTVAR attribute of the ASSIGNL tag is assigned the value of the data field's data variable (DATAVAR).

Restrictions

  • You must code an ASSIGNI tag within an ASSIGNL definition. See ASSIGNL (Assignment List) for a complete description of this tag.

Processing

None.

Examples

Here is source file markup that contains an application panel containing a data field. Within the data field is an assignment list that sets the dialog variable rmtype to 1 when "SINGLE" is entered in the data field, or to 2 when "DOUBLE" is entered in the data field. The associated variable declarations and variable classes are also shown.
<!DOCTYPE DM SYSTEM>

<VARCLASS NAME=roomvar TYPE='char 6'>
  <XLATL FORMAT=upper>
  </XLATL>

<VARCLASS NAME=rmtypvar TYPE='char 1'>

<VARLIST>
  <VARDCL NAME=room   VARCLASS=roomvar>
  <VARDCL NAME=rmtype VARCLASS=rmtypvar>
</VARLIST>

<PANEL NAME=assigni DEPTH=12 WIDTH=50>Hotel Register
<AREA>
  <DTAFLD DATAVAR=room ENTWIDTH=6 DESWIDTH=20 PMTWIDTH=15>Room type
    <ASSIGNL DESTVAR=rmtype>
    <ASSIGNI VALUE=SINGLE RESULT=1>
    <ASSIGNI VALUE=DOUBLE RESULT=2>
    </ASSIGNL>
    <DTAFLDD>(Single or Double)
</AREA>
<BOTINST>Press Enter to continue.
</PANEL>

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014