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. |
Screen Name Length | Generated Mapset Name |
---|---|
4 characters | screennameSET |
5 characters | screenname$ |
6 characters | screenname$ |
7 characters | Last character of screenname changes to $ |
8 characters | Truncates eighth character of screenname; seventh character changes to $ |
User Rule Name | Where Included |
---|---|
TP-ENTRY-EXIT-1 | Bottom of APS-HOUSEKEEPING-PARA |
TP-ENTRY-EXIT-2 | After APS-HOUSEKEEPING-PARA |
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]
screenname | Screen name; value must be literal (maximum 8 characters). |
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. |
CANCEL | Default. Generate CONTROL ERRORS CANCEL (return control to ISPF when dialog error of return code 12 or higher). |
RETURN | Generate CONTROL ERRORS RETURN to return control to program when dialog error occurs. See also Remarks below. |
dataareas | Generate the PROCEDURE DIVISION USING statement. List user-defined data areas only, not records defined by TP-COMMAREA, TP-LINKAGE,
and SCRNLIST, which automatically generate other data areas. AMB generates data areas in the following order.
|
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.