The WRITE TRANSACTION command is a batch only command that performs the following sequence of functions:
If the write operation results in a physical output-error condition, the application terminates.
Note: A WRITE TRANSACTION command can be issued in a dialog that is not associated with an output file. In this case, the command is used only to write an input record to the suspense file. If the input record is not in error, nothing is written to the suspense file.
The WRITE TRANSACTION command also allows you to specify a message to be sent to the log file or to the operator's console. The destination of the message depends on the routing codes specified at system generation using CA-ADSOBSYS or at runtime in a control statement.
Syntax for the WRITE TRANSACTION command is shown below:
►►──── WRITE TRANsaction ───┬───────────────┬─────────────────────────────────► └─ to SUSpense ─┘ ►──┬─────────────────────────────────────────────────────────────────┬───────► ├─ CONTinue ──────────────────────────────────────────────────────┤ └─ RETurn ───┬──────────────────┬─┬────────────┬─┬────────────┬───┘ ├─ TO dialog-name ─┤ └┬─ CLEAR ─┬─┘ └─ CONTinue ─┘ └┬─ to TOP ─┬──────┘ └─ CLR ───┘ └─ ALL ────┘ ►──┬──────────────────────────────────┬─── . ────────────────────────────────►◄ └┬─ MESSAGE ─┬── message-options ──┘ └─ MSG ─────┘
Expansion of Message-options
►►────┬── TEXT ──┬──────┬─── message-text ────────────────────────────────────► │ ├─ IS ─┤ │ └─ = ──┘ └── CODE ──┬──────┬─── message-code ──────────────────────────────────── ├─ IS ─┤ └─ = ──┘ ►────────────────────────────────────────────────────────────────────────────► ───┬────────────────────────────────────────────────┬─────────────────────── │ ┌─────────────┐ │ └─ PARMS ──┬─────┬──── ( ──▼─ parameter ─┴── ) ──┘ └─ = ─┘ ►─────────────────────────────────────────────────────┬──────────────────────► ───┬────────────────────────────────────────┬────────┘ └─ PREFIX ─┬──────┬─────── prefix ───────┘ ├─ IS ─┤ └─ = ──┘
Terminates the current process and performs a mapout operation.
Specifies that the dialog's input record is to be written to the suspense file even if it does not contain errors. Nothing is written to the dialog's output file.
Specifies that control is to be passed to the dialog's premap process.
Specifies that control is to be returned to a higher level dialog or application function.
Dialog-name specifies the 1- to 8-character name of a higher level dialog to which control is passed. Dialog-name is either the name of a variable data field that contains the dialog name or the dialog name itself enclosed in single quotation marks. The named dialog must not be higher than the top of a nested application structure in which the issuing dialog participates. If the named dialog is operative at more than one higher level, control passes to the lowest level dialog with the specified name.
Specifies the highest level to which control can pass. If the issuing dialog participates in a nested application structure, control returns to the top of the nested structure. If the issuing dialog does not participate in a nested structure, control returns to the mainline dialog at the top of the application thread.
If a RETURN statement does not specify a receiving dialog or TOP, control passes to the next higher level dialog or function. If the mainline dialog at the top of an application thread issues a RETURN command, the RETURN command is treated as a LEAVE APPLICATION command.
Specifies that record buffers are reinitialized and currencies are released for the dialog receiving control. CLEAR is ignored if the receiving dialog is at the top of a nested application structure.
Specifies that control returns to the first command in the premap process of the dialog receiving control. If CONTINUE is not specified, control returns to the mapout operation of the dialog that receives control. CONTINUE is ignored if the receiving dialog is at the top of a nested application structure.
If neither CONTINUE nor RETURN is specified, control passes to the dialog's mapin operation. The runtime system maps the next record into variable storage, then selects the next application function or dialog response process to be executed.
Note: For applications defined using the application generator, the runtime system first examines the current record's response field. If the field selects an immediately executable function that is not the same as the current function, the runtime system passes control to the selected function. The next time a mapin operation is performed for the file, the runtime system immediately maps in the record.
Specifies the text of a message to be sent to the log file. Message-text is either the name of a variable data field that contains the message text or the text string itself enclosed in quotation marks. The text string can contain up to 240 displayable characters.
Specifies the message dictionary code of a message to be sent to the log file and, if so directed by the destination specified in the dictionary for the message, to the operator. Message-code is either the name of a variable data field that contains the message code or the six-digit code itself expressed as a numeric literal.
Specifies a replacement parameter for each variable field in the stored message identified by message-code. Parameter is either the name of an EBCDIC or unsigned zoned decimal variable data field that contains the parameter value, or the parameter value itself enclosed in single quotation marks. The parameter value must contain displayable characters. At runtime, each variable data field in a stored message expands or contracts to accommodate the size of its replacement parameter. A replacement parameter can be a maximum of 240 bytes.
Up to nine replacement parameters can be specified for a message; multiple parameters must be separated by blanks or commas. Multiple parameters must be specified in the order in which they occur in the stored message.
Overrides the default prefix of a dialog and a map.
Prefix must either specify an EBCDIC or unsigned zoned decimal variable data field that contains a 2-character prefix or the 2-character prefix itself, enclosed in single quotation marks.
|
Copyright © 2013 CA.
All rights reserved.
|
|