ENDD: End dialog

ENDD ends the specified dialog and releases all associated storage resources. Attached workmods are deleted, data sets are closed, storage obtained on behalf of the caller is released, and the dialog token is invalidated.

The syntax of the ENDD call is:


[symbol]       IEWBIND        FUNC=ENDD

                              [,VERSION=version]
                              [,RETCODE=retcode]
                              [,RSNCODE=rsncode]
                              ,DIALOG=dialog
                              [,PROTECT={YES | NO}]
                                                            
FUNC=ENDD
Specifies that a dialog is ended.
VERSION=1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Specifies the version of the parameter list to be used. The default value is VERSION=1.
RETCODE=retcode — RX-type address or register (2-12)
Specifies the location of a fullword integer that is to receive the return code returned by the binder.
RSNCODE=rsncode — RX-type address or register (2-12)
Specifies the location of a 4-byte hexadecimal string that is to receive the reason code returned by the binder.
DIALOG=dialog — RX-type address or register (2-12)
Specifies the location of an 8-byte area that contains the token for the dialog to be terminated.
PROTECT={YES | NO}
Specifying PROTECT=NO allows the binder to end the dialog even if any remaining workmods have been altered but not yet saved or loaded.

The value for PROTECT can be abbreviated as Y or N. YES is the default.

Processing notes

None.

Return and reason codes

The common binder API reason codes are shown in Table 1.

Return Code Reason Code Explanation
00 00000000 Normal completion. Dialog ended normally.
04 83000700 One or more workmods were in an active state but they were not protected (PROTECT=NO in ENDDialog). Dialog ended normally.
08 83000704 An unexpected condition occurred while ending the dialog. The dialog is terminated, but some resources might not have been released.
12 83000708 One or more workmods were in an "active" state, and PROTECT=YES was specified or defaulted. The dialog is not terminated.

Parameter list

If your program does not use the IEWBIND macro, place the address of the ENDD parameter list in general purpose register 1.


PARMLIST   DS    0F
           DC    A(ENDD)                    Function code
           DC    A(RETCODE)                 Return code
           DC    A(RSNCODE)                 Reason code
           DC    A(DIALOG)                  Dialog token
           DC    A(PROTECT+X'80000000')     Protection flag and end-of-list indicator
ENDD       DC    H'5'                       ENDD function code
           DC    H'version'                 Interface version number
PROTECT    DC    CL1'Y'                     Protection flag
                                            'Y'=Yes
                                            'N'=No