NTRY generates a program template that defines:
In CICS programs, NTRY also generates code to:
NTRY|ENTR screenname(mapsetname)] ... [errorpara] ... [RETRY|NORETRY]
screenname | Screen name; value must be literal (maximum 8 characters). |
mapsetname | Mapset containing the screen(s) the program receives; must be a literal (maximum 7 characters). See also Remarks for CICS below. |
errorpara | User-defined error routine to perform when an abnormal condition occurs. Errorpara is positional; if omitted, code an asterisk (*) in its place. |
RETRY | Default. Accept only valid data in screen fields with assigned edits; otherwise, return screen to the terminal user for correction. |
NORETRY | Accept invalid data in screen fields with assigned edits. |
It is possible, however, to accept screens with data that does not pass editing. When NORETRY is coded, the application logic executes regardless. A set of runtime flags allow application logic to determine the success or failure of editing
APS-EDITS-PASSED | 88-level flag set to true when data for all edited fields is valid. Code IF APS-EDITS-PASSED to test whether the edit is OK. |
screenname-fieldname-FLAG | Indicator flag set to spaces when data for a specified field valid. Code IF screenname-fieldname-FLAG = SPACES to test whether the data is valid. |
screenname-fieldname-INPT | AMB-generated data field; contains data exactly as entered if the field failed to pass editing. |
APS-MSG-IO-ERROR | Applies to IMS DC only. 88-level flag set to true when a program sends a user-defined I/O error message. Code IF APS-MSG-IO-ERROR to test if message sent. |
APS-MSG-EDIT-ERROR | 88-level flag set to true when a program sends a user-defined edit error message. Code IF APS-MSG-EDIT-ERROR to test whether if message sent. |
Generate code to receive screen CUSTORDR in mapset CUSTOR$ for a screen-invoked program. Perform MAP-ERROR-PARA when an exceptional condition occurs on the RECEIVE MAP.
NTRY CUSTODR(CUSTOR$) MAP-ERROR-PARA
See also Examples in Program-Painter Keywords - All Applications.
In DLG programs, NTRY also generates code to display screens.
NTRY|ENTR screenname ... [errorpara] ... [RETRY|NORETRY] ... [CANCEL|RETURN] ... [dataareas]
It is possible, however, to accept screens with data that does not pass editing. When NORETRY is coded, the application logic executes regardless. A set of runtime flags allow application logic to determine the success or failure of editing.
APS-EDITS-PASSED | 88-level flag set to true when data for all edited fields is valid. Code IF APS-EDITS-PASSED to test whether the edit is OK. |
screenname-fieldname-FLAG | Indicator flag set to spaces when data for a specified field valid. Code IF screenname-fieldname-FLAG = SPACES to test whether the data is valid. |
screenname-fieldname-INPT | AMB-generated data field; contains data exactly as entered if the field failed to pass editing. |
APS-MSG-EDIT-ERROR | 88-level flag set to true when a program sends a user-defined edit error message. Code IF APS-MSG-EDIT-ERROR to test whether if message sent. |
Generate code to display screen SCRA. Perform PROCESS-ISPF-ERRORS when return codes from services are greater than 12. Generate CONTROL ERRORS RETURN code so the program can control all error processing.
NTRY SCRA PROCESS-ISPF-ERRORS RETURN
See also the Examples in Program Painter Keywords - All Applications.