General
Application areas: | Input/output of files and records; see "Input/output" |
Macro type: | Type S, MF format 1: |
This macro description applies to TIAM V13.2A.
The following applies when using the 31-bit interface:
The C/D form is called with MF=C/D or MF=(C,p)/(D,p).p = prefix (up to 3 chars); default value: p = CUB. The prefix modifies field names only (not symbolic names in equates). Any prefix of more than 3 characters is truncated to a length of 3.
With MF=C/D, no symbolic names and equates are generated for the standard header. In the event of the operand list being supplied dynamically, the initialization values for the standard header should be taken from an operand list generated with MF=L.
No return code is transferred in the standard header.
The CUPAB macro generates a DSECT for the operand list of the WRTRD macro for 24-bit addressing mode.
Macro description
WRTRD can be used in timesharing mode only. WRTRD writes a record to the terminal and immediately afterwards reads a message from the terminal. Apart from the message written to the terminal no other prompt character appears.
On macro execution, if format 1 is used, the specified operands are stored in an operand table and the start address of this table is loaded into register R1. In the case of format 2 is used, the table specified in the user program is used.
Macro format 1 and description of operands
WRTRD |
record1,[edit1],record2,[edit2],[length],error [{,MODE=COMP ,OTRSUP= {NO / YES},OLINEND= {NO / YES},OHDR= {NO / YES},IHDR= {NO / YES} ,OHCOPY= {NO / YES},ILCASE= {NO / YES},IGETBS= {NO / YES},ILINEND= {NO / YES} ,ITRSUP= {NO / YES} / ,MODE=LINE ,OHCOPY= {NO / YES},OHOM= {NO / YES},ONOPOSN= {NO / YES},IGETIC= {NO / YES} ,OBELL= {NO / YES},ONOLOGC= {NO / YES},EXTEND= {NO / YES},IGETFC= {NO / YES} ,ILCASE= {NO / YES},IGETBS= {NO / YES},ICFD= {NO / YES} / ,MODE=FORM ,IGETBS= {NO / YES},ILCASE= {NO / YES} / ,MODE=PHYS ,OHDR= {NO / YES},OTRANS= {NO / YES},OETB= {NO / YES},ITRSUP= {NO / YES} ,IHDR= {NO / YES},ILCASE= {NO / YES},IGETBS= {NO / YES}}] ,RC=OLD / NEW [,VTSUCBA=addr] [,TIMER=value] ,PARMOD=24 / 31 [,MF=L / C / (C,pre) / (D,pre) / D / (E,...)] |
record1
Symbolic address of the record to be output. The record starts with the record length field, followed by one (any) character and the message to be output.
Record format and example:
Byte 0-1: | Length of the message + 4-byte record length field |
Byte 2-3: | reserved |
Byte 4: | Any character; neither transferred nor analyzed |
Byte 5-n: | Data record |
RECORD DC Y (RECEND-RECORD) DS CL2 reserved bytes DC X'00' DC C'DATA-RECORD' record to be transferred RECEND EQU *
edit1
This operand specifies the edit option for the record to be written. Direct specification (X'xx') permits only the first edit byte for output to be set to the meaning specified in the CUPAB macro description. This operand is not required when default functions (all edit bits = 0) are used, when the MODE operand is specified or when the VTSU control block is used.
record2
Symbolic address of a field to which the record from the terminal is to be transferred. The record is read as a variable-length record (the first 4 bytes specifying the record length).
Record format and example:
Byte 0-1: | Length of the message + 4-byte record length field |
Byte 2-3: | reserved |
Byte 4-n: | Data record |
RECORD2 DS 0CL74 LENGTH DS CL2 RESERV DS CL2 DATA DS CL70
edit2
Specifies the edit option for the record to be read. Direct specification (X'xx') permits only the first edit byte for output to be set to the meaning described in the CUPAB macro description. This operand is not required when default functions (all edit bits = 0) are used, when the MODE operand is specified or when the VTSU control block is used.
Note
Operands edit1 and edit2 continue to be supported for reasons of compatibility only. Edit bytes should be controlled via MODE specifications or via the VTSU control block (VTSUCBA operand).
length
Length of the field specified with “record2” (including 4-byte record length field); 5 <= length <= 32767.
If this operand is omitted, the length attribute of the specified field is assumed.
error
Symbolic address to be branched to in the event of an error.
In the event of an error, register R14 contains the address of the next instruction after the WRTRD macro call. The error code is transferred in register R15.
31-bit interface: If error = 0 (address X'00..0') is specified, the program is continued with the instruction following the WRTRD macro.
MF=
For a general description of the MF operand, its operand values and any subsequent operands (e.g. for a prefix), see section “S-type macros”. The valid MF values are given at the start of the macro description under “Macro type” and are included in the macro format.
A prefix (pre = 1..3 letters) can be specified in the C form and D form of the macro, as shown in the macro format. Default value: pre = CUB
PARMOD=
Controls macro expansion. Either the 24-bit or the 31-bit interface is generated.
If PARMOD is not specified here, macro expansion is performed according to the specification for the GPARMOD macro or according to the default setting for the assembler (= 24-bit interface).
24
The 24-bit interface is generated. Data lists and instructions use 24-bit addresses (address space <= 16 Mb).
31
The 31-bit interface is generated. Data lists and instructions use 31-bit addresses (address space <= 2 Gb). Data lists start with the standard header.
The MODE specifications and edit options continue to be supported for compatibility reasons only. They are now summarized in the VTSU control block (VTSUCB, see the VTSUCB macro).
MODE=COMP
Specifies compatible mode. The symbolic operands OTRSUP through OPTAPE (see below) enable the user program to use all the edit options. Any specifications made directly in the “edit” operand are ignored. Control characters may appear in the output message but these are not checked by the system. This mode is compatible with previous versions of the operating system.
This mode is treated as MODE=LINE for the 8160, 8162, 9749, 975x, 9763, 3270 and X.29 devices. Edit options OLINEND and ILINEND are ignored. Edit options OTRSUP, OHDR, ITRSUP and IHDR are rejected (RC: X'08').
LINE
The current terminal is to be treated as a logical line or page terminal. The message may be structured through the use of logical control characters (see the VTCSET macro).
Any other control characters are invalid for output and are converted by the system to a user-defined substitute character (see the command MODIFY-TERMINAL-OPTIONS SUBSTITUTE-CHARACTER=). If SYSOUT is not a terminal, only logical control characters NL and NP are evaluated, e.g. for output to printers in batch mode.
The device-specific message header is not supplied during input.
FORM
Specifies format mode. The user program works with the “Terminal Mapping Support” software component (FHS), which edits the message in a form suitable for output to a particular terminal.
PHYS
The message is to be output to or read from the terminal physically, i.e without editing by the system. This permits special device functions to be executed for which the LINE or FORM mode is insufficient. If none of the valid edit options is specified, the system prefixes the output message by a standard device message header; the device message header is not removed from the input message. Lowercase letters are converted to uppercase letters and a backspace function may be executed.
EXTEND=
Determines whether the fields for output texts are to be protected or unprotected.
NO
The operator is guided through the system. Only the input request made by the system or the user program is protected against being overwritten.
Output is unprotected and at reduced brightness.
NIL characters in the output text are converted to the substitute characters; in the case of input they are removed.
Depending on the operating mode, the screen may be cleared starting at the cursor when output commences.
YES
(Only for 9749, 975x, 9763, 816x, and 3270 Data Display Terminals)
This entry supports the use of protected and unprotected fields with the aid of logical control characters EPA, NUM and SPA (see the VTCSET macro).
Text output is protected and at reduced brightness unless specified otherwise. The message can be structured by means of logical control characters (see VTCSET). When using 3270 terminals, note that logical control characters occupy space on the screen. A series of logical control characters, however, requires only one screen position. Areas which the terminal operator can use for input start with EPA or NUM and end with SPA.
During input and output, NIL is treated as a permissible character; it is sent to the data display terminal by the program, and vice versa. When using 3270 terminals, note that the NIL character is not transferred to the processor. Fields that are returned in truncated form are filled with NIL characters up to their original length. This ensures that the fields are always returned to the user in their original (output) length.
The beginning of an output message is displayed at the beginning of the next line following the cursor. If the message does not begin with VPA, the screen is cleared, starting at the cursor and before the first text character.
If the end of the screen is reached during output, output is continued at the top of the screen. This continuation is always unprotected. Overflow control is ineffective here.Keys RU, EFZ, AFZ and LSP are locked.
Except for OBELL, ILCASE and IGETFC, all other edit options are ignored.
If the NL control character is recognized in an input message, processing continues and the return code X'2C' is issued.
ICFD=
Specifies whether confidential data is to be protected.
NO
No precautions are to be taken to protect confidential data.
YES
The input data is confidential and is to remain invisible on the terminal. This is achieved by blanking or clearing the screen or by overwriting the input line at the printer terminal.
IGETBS=
Determines whether underline characters (X'6D') are to be passed to the user program. This operand should only be specified for 8103 Data Display Terminals.
NO
Underline characters are not passed to the user program. Instead, the system performs the correction function
YES
The underline characters (X'6D') are passed to the user program without being evaluated by the system.
IGETFC=
Determines whether a function key code is transferred.
NO
No function key code is to be transferred.
YES
The first byte of the input area is to contain the standardized function key code. This code identifies the terminal key used to initiate data transfer. A table with the standard function key codes is included in the appendix on "Standardized function key codes".
IGETIC=
Determines whether the input source is to be changed.
NO
The input source is not to be changed.
YES
Data is to be entered from the connected ID card reader. The input data may consist of identity card information or short message K14. This entry is permitted only for the 9749, 975x 9763, 816x and 3270 Data Display Terminals with a defined ID card reader (see also the TSTAT macro, TYPE=TCHAR).
In contrast to TRANSDATA devices, data may be entered on 3270 Data Display Terminals by a defined ID card reader at any time. If entries are requested by the ID card reader every other entry is converted into K14.
Note
The IGETIC operand is ignored if the ICFD operand is also specified or if no ID card reader is connected. The input source remains unchanged.
IHDR=
Specifies how the message header is to be handled.
NO
The message header is not transferred to the user program.
YES
The entire message header is transferred to the user program.
With 3270 terminals, the message header consists of the application ID (AID byte) and the two-byte cursor position.
ILCASE=
Specifies whether a distinction is to be made between uppercase and lowercase letters.
NO
All lowercase letters are transferred to the user program as uppercase letters.
YES
Lowercase letters are also transferred to the user program.
ILINEND=
Specifies how carriage return/line feed characters are to be handled.
NO
The carriage return and line feed characters are not passed to the user program.
YES
The carriage return and line feed characters are passed to the user program.
ITRSUP=
Specifies whether the translation of device code to EBCDIC is to be suppressed.
NO
Translation from device code to EBCDIC is not suppressed. The user program receives the message in EBCDIC.
Exception
On the 816x, 9749, 975x and 9763 Data Display Terminals the message header is always supplied in device code.
YES
Translation from device code to EBCDIC is suppressed. The user program receives the message in device code.
OBELL=
Determines whether an audible signal is provided on output.
NO
No audible signal is provided for output.
YES
An audible signal is heard on output at the end of the message (applies only to 9749, 975x, 9763, 816x and 3270 Data Display Terminals with special hardware feature).
OETB=
Determines the final control character of the output message.
NO
Specifies that the message output at the terminal is to be concluded with the control character ETX.
YES
Specifies that the message output at the terminal is to be concluded with the control character ETB.
OHCOPY=
Determines whether the message output to a data display terminal is also output on a hardcopy device (printer) connected to the terminal.
NO
The message is output via the data display terminal only.
YES
The message output to a data display terminal is also output on a hardcopy device (printer) connected to the terminal. The hardcopy device must be generated or assigned using the MODIFY-TERMINAL-OPTIONS command.
For 3270 Terminals:
The entire screen contents are output via the hardcopy device. This means that the output may also include previous I/O's. In the event of a series of outputs directly following one another, the hardcopy function is activated for the last output only. Hardcopy output is performed only if a hardcopy device was generated for the terminal when the connection was set up.
There is no hardcopy output if EXTEND=YES or MODE=EXTEN was specified.
If OHCOPY=YES is used and the message contains one of the logical control characters SPA, EPA, CHS or NUM, only the last unprotected part of the message is output and not the whole message. If, at the same time, OVERFLOW-CONTROL=NO (MODIFY-TERMINAL-OPTIONS command) was specified, it may be the case that only part of the output is printed on the hardcopy device.
OHDR=
Specifies how the system is to handle the message header.
NO
The message header (in US ASCII code) is prefixed to the output text by the system.
YES
Indicates that the message contains a user-specific header (message header is to be specified in US ASCII code) which the system prefixes to the output text. The length of the message header + 1 must be specified in binary form in byte 1 of the message. For 3270 Terminals:
The message header is specified in EBCDIC code and consists of the CMD byte and the WCC byte. This message header must be preceded by a byte containing X'01' (length of the TRANSDATA message header + 1).
Note
When output is to the 8160, 975x and 9763 Data Display Terminals and printers locally attached to them, neither the system (MODE=LINE or COMP) nor the terminal mapping support (MODE=FORM) employs any message header
(PARAM0, PARAM1). Instead, they work with parameter specifications (PAG). The differences between these two modes are described in the manuals for data display terminals or printers.
OHOM=
Specifies whether message output is to be structured or homogeneous.
NO
Specifies that the message is to be output, not homogeneously, but in structured form, i.e. one logical line is regarded as the output unit. The message length is unrestricted, provided the logical lines do not exceed 255 characters.
Effect when using 816x, 975x, 9763 and 3270 Data Display Terminals in mode 1:Individual logical lines can be separately modified and thus selectively retransferred.
YES
This operand can only be used in conjunction with 816x, 9749, 975x, 9763 and 3270 Data Display Terminals.
The message is to be output homogeneously, in unstructured form, i.e. the entire message is regarded as a single output unit. The message length is restricted by the size of the output buffer in the system.
Effect when using 816x, 975x, 9763 and 3270 Data Display Terminals in mode 1:
By modifying one character in an output message, the entire message can be retransferred, provided the message is not explicitly structured by logical display control characters.
OLINEND=
Specifies how carriage return/line feed characters are to be handled.
NO
Each message output to a terminal always starts on a new line. The necessary control characters are either prefixed to the message by the system or inserted into the message when the physical end of line is reached, if the type of terminal requires this to be done.
YES
The message is output to the terminal without the carriage return/line feed control characters supplied by the system. Control must be assumed by the user program.
ONOLOGC=
Specifies whether logical control characters are to be evaluated.
NO
All logical characters are evaluated and special physical control characters are permitted (see the VTCSET macro, e.g. ESC, DC4).
Any other characters < X'40' are replaced by SUB. Characters >= X'40' are accepted.
YES
Logical control characters are not evaluated. All characters < X'40' in EBCDIC code are replaced by SUB. Only characters >= X'40' are accepted.
ONOPOSN=
Determines where the message is to start.
NO
The message starts at the beginning of the next line.
YES
The message starts at the beginning of the current line (applies only to printer terminals).
OTRANS=
Specifies whether the output data is to be transmitted in standardized or transparent form.
NO
Output data is to be transmitted in standardized form, i.e. code conversion takes place.
YES
Output data is to be transmitted in transparent form, i.e. consisting of arbitrary binary characters (5, 7 or 8 bits per character depending on the device code) which are not converted during transmission. If the transmission path was not generated “potentially transparent”, output is rejected with return code X'04'.
OTRSUP=
Specifies whether translation from EBCDIC to device code is suppressed.
NO
Translation of the message from EBCDIC to device code is not suppressed, i.e. the program provides the message in EBCDIC and the system translates it into device code.
YES
Translation of the message is suppressed. In this case the program must provide the message in device code.
RC=
Determines where the return code is to be stored.
This operand may be specified only if the 31-bit interface is used.
OLD
The return code is stored in the rightmost byte of register R15.
NEW
The return code is stored in both register R15 and the standard header. All 4 bytes of register R15 are allocated for evaluation.
A 4-byte return code is issued only if SYSDTA reads from the data display terminal. In all other cases only a 1-byte return code is issued, irrespective of the return code value.
TIMER=
Defines a maximum waiting time for input. If no input is received within the defined waiting time, a return code is issued. This operand may only be specified if the 31-bit interface is used.
value
Waiting time between 10 and 3600 seconds. The default value is UNLIMITED, i.e. no timer is used.
VTSUCBA=
Defines the address of a VTSUCB generated with MF=L.
When using the VTSUCBA operand, the MODE operand and the following edit options are ignored (their value is set to X'FF' in the parameter list). This means that all desired edit options must be specified in the VTSUCB.
This operand may be specified only if the 31-bit interface is used.
By default, the VTSUCB is not used.
addr
Symbolic address (name) of the VTSUCB.
Programming notes
for the use of the MODE=EXTEND or EXTEND=YES operand(for 3270 Data Display Terminals see appendix)
When MODE=EXTEND or EXTEND=YES is specified in LINE mode, the user can work with formats without requiring a terminal mapping support component.
If the user wishes to work with formats, the first output must begin with NP in order to clear the screen and start with text in position 1.1.
NL positions to the beginning of the next line and clears the remainder of the screen; VPAn positions to the beginning of line n, in which case the remainder of the screen is retained.
Positioning within a line is only possible with text, spaces or NIL characters.
After VPAn, NL and CHS, text is protected and displayed with reduced brightness.
Unprotected fields are created using 'EPA text SPA'.Blanked, unprotected fields are created using 'DAR text SPA'. Numeric fields are created using 'NUM text SPA'.
VPAn at the end of the message can be used to place the cursor at the start of the first unprotected field of line n, in which case the screen contents are retained. If no unprotected field starts in line n, the cursor is positioned to the first unprotected field following line n.If no VPAn is specified at the end of the message, the cursor is placed in the first unprotected field on the screen.
Continuation of output/screen updateNP generates a new screen.VPAn at the start of the output changes line n of the screen. VPAn can be used to skip one or more lines. In the current line, a dark area is produced starting at the cursor and extending to the end of the line or a field preceding end-of-line. This is followed by positioning to line n. After completion of the update, the cursor is repositioned using VPAn, otherwise the screen would be cleared starting at the cursor (see above). When NL is used within an updating procedure, the screen is likewise cleared starting at the cursor. If this is to be avoided, VPAn must always be used to jump to a new line.
Macro format 2 and description of operands
WRTRD |
(1) |
(1)
Register R1 contains the operand list address. The list must be aligned on a word boundary.
Layout of the data area
Addressing | Byte | Contents |
24-bit mode | 0 | Output edit byte 1 |
1-3 | Address of the record to be output (operand “record1”) | |
4 | Input edit byte 1 | |
5-7 | Address of the field to which the record is to be transferred | |
8 | Output edit byte 1 | |
9 | Input edit byte 2 | |
10-11 | Maximum length of the record to be read (operand “length”). | |
12-15 | Address to be branched to if an error occurs (operand “error”). | |
31-bit mode | 0-7 | Standard header. For details of the structure, see section “Standardheader”. |
8-11 | Address to be branched to if an error occurs (operand “error”). | |
12-15 | Address of the record to be output (operand “record1”) | |
16-19 | Address of the field to which the record is to be transferred | |
20 | Output edit byte 1 | |
21 | Output edit byte 2 | |
22 | Input edit byte 1 | |
23 | Input edit byte 2 | |
24-25 | Maximum length of the record to be read(operand “length”). | |
26 | Reserved (X'00') | |
27 | Flag indicating use of VTSUCB and return code handling | |
28-31 | Address of the VTSUCB | |
32-33 | Values for timer | |
34-35 | Reserved (X'00000000') |
When using the 24-bit interface, the values for input/output edit byte 1/2 should be taken from the table specified with the CUPAB macro; when using the 31-bit interface, they should be taken from a list generated with MF=C/D.
When “BREAK” occurs during a write/read operation, the program count is reset to the beginning of the macro expansion so that, after the interrupt is processed, the macro is repeated.
If the length of the record written (minus four bytes for the length field and one byte for the reserved byte) exceeds the terminal buffer size, the record is truncated. The user receives control at the error address with error code X'10' in register R15.
If the size of a record read exceeds the designated length (minus four bytes for the length field), the record is truncated. A branch is made to the error address of the user program and error code X'OC' is transferred in register R15.
Return information and error flags
Whenever possible, the system corrects any edit options which are invalid for a particular device or for the MODE selected (return code X'20'). During macro processing, register R1 contains the operand list address.
if PARMOD=24:
R15:
+---------------+ | | | | | |0|0|0|0|0|0|a|a| +---------------+
A return code relating to the execution of the WRTRD macro is transferred in register R15.
X'aa' | Meaning |
X'00' | Function executed successfully. |
X'04' | Unrecoverable error. |
X'08' | Operand error. |
X'0C' | Read truncation. Record length exceeds specified length. |
X'10' | Write truncation. The length of the output record exceeds the size of the terminal buffer. |
X'14' | WRTRD was called in a batch job. |
X'18' | End of input (ETX) |
X'20' | Invalid edit option byte, corrected by system. |
X'2C' | Input starts with control character NL (only with edit option EXTEND=YES). Input length is |
X'38' | Error in connection with POSIX. |
if PARMOD=31:
if RC=OLD:
Return codes that can occur in addition to the return codes described under PARMOD=24
X'aa' | Meaning |
X'24' | Error in VTSUCB. |
and the return codes which, in accordance with conventions, apply to all macros (see the table “Standard return codes” (Standard header)).
if RC=NEW:
The return codes are entered in both the standard header and register R15.
Standard header:
+---------------+ | | | | | |c|c|b|b|a|a|a|a| +---------------+
The following return code relating to the execution of the WRTRD macro is transferred in the standard header (cc=Subcode2, bb=Subcode1, aaaa=Maincode):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'00' | X'0000' | Function processed successfully. |
X'00' | X'00' | X'0020' | Function processed successfully; an operand error was |
X'00' | X'01' | X'0008' | Operand error not corrected. |
X'07' | X'01' | X'0008' | Operand error not corrected: the RESERVED fields are not 0. |
X'08' | X'01' | X'0008' | Operand error not corrected: the value of the TIMER operand is |
X'00' | X'20' | X'0004' | Internal error. |
X'02' | X'20' | X'0004' | Internal error: BCAM message lost. |
X'05' | X'20' | X'0004' | Internal error: input message too long. |
X'06' | X'20' | X'0004' | Internal error: negative transport acknowledgment. |
X'00' | X'40' | X'0004' | Input/output aborted. |
X'00' | X'40' | X'000C' | Input record length > specified length: input record was |
X'00' | X'40' | X'0010' | Output record truncated. |
X'00' | X'40' | X'0014' | BREAK in WRTRD. |
X'00' | X'40' | X'0018' | End of input. |
X'00' | X'40' | X'002C' | NL detected (this return code can only occur for edit options with |
X'00' | X'40' | X'0034' | Timeout (no input received within the defined waiting time). |
X'00' | X'00' | X'0014' | SYSFILE error: WRTRD in batch mode. |
X'01' | X'80' | X'0004' | Internal BCAM bottleneck. |
X'09' | X'80' | X'0038' | Error in connection with POSIX: Input/output serialization error. |
X'0A' | X'40' | X'0038' | Error in connection with POSIX: If the LOGON task is in system |
X'24' | VTSU error. In addition to the main code (rightmost byte), see |
Example 1
The example effects the output of a message to which the user must respond. The query is repeated as long as 'N' is entered as the response. If the response is !=
'N' the program is terminated. The WRTRD macro is called in macro call format 1.
WRTRD1 START PRINT NOGEN WRTRD1 AMODE 31 WRTRD1 RMODE 24 BALR 3,0 USING *,3 QUEST WRTRD QUERY,,INPUT,,5,END,PARMOD=31 2 *,@DCEO 999 921011 53531004 2 *,@DCEI 999 921011 53531002 CLI REPLY,'N' BE QUEST END WROUT TEXT,TERM,PARMOD=31 2 *,@DCEO 999 921011 53531004 TERM TERM **** Definitions **** QUERY DC Y(ENDQU-QUERY) DS CL2 DC X'01' DC 'TERMINATE PROGRAM (Y/N) ?' ENDQU EQU * INPUT DS 0CL5 DS CL4 REPLY DS CL1 TEXT DC Y(ENDTEXT-TEXT) DS CL3 DC C'*** The WRTRD1 program was terminated. ***' ENDTEXT EQU * END
Runtime log:
/start-assembh % BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED % ASS6010 <ver> OF BS2000 ASSEMBH READY //compile source=*library-element(macexmp.lib,wrtrd1), - // compiler-action=module-generation(module-format=llm), - // module-library=macexmp.lib, - // listing=parameters(output=*library-element(macexmp.lib,wrtrd1)) % ASS6011 ASSEMBLY TIME: 310 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS % ASS6006 LISTING GENERATOR TIME: 82 MSEC //end % ASS6012 END OF ASSEMBH /start-executable-program library=macexmp.lib,element-or-symbol=wrtrd1, - / prog-mode=*any % BLS0523 ELEMENT 'WRTRD1', VERSION '@' FROM LIBRARY ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS % BLS0524 LLM 'WRTRD1', VERSION ' ' OF '<date> <time>' LOADED TERMINATE PROGRAM (Y/N) ? n TERMINATE PROGRAM (Y/N) ? y *** The WRTRD1 program was terminated. ***
Example 2
This example effects the same procedure as Example 1, but the WRTRD macro is called in macro call format 2.
WRTRD2 START PRINT NOGEN BALR 10,0 USING *,10 LOOP LA 1,PARAM WRTRD (1),PARMOD=31 CLI REPLY,'N' BE LOOP END WROUT TEXT,TERM,PARMOD=31 2 *,@DCEO 999 921011 53531004 TERM TERM **** Definitions **** DS 0F PARAM WRTRD QUERY,,INPUT,,5,END,MF=L,PARMOD=31 2 *,@DCEO 999 921011 53531004 2 *,@DCEI 999 921011 53531002 * QUERY DC Y(ENDQU-QUERY) DS 3X DC 'TERMINATE PROGRAM (Y/N) ?' ENDQU EQU * INPUT DS 0CL5 LENGTH DS CL2 UNUSED DS CL2 REPLY DS CL1 TEXT DC Y(ENDTEXT-TEXT) DS CL3 DC C'*** The WRTRD2 program was terminated. ***' ENDTEXT EQU * END
Example 3
WRTRD3 START PRINT NOGEN BALR 10,0 USING *,10 WRTRD MESSAGE,,INPUT,,40,ERROR,PARMOD=31,MODE=LINE, C OBELL=Y,ILCASE=Y,ICFD=Y 2 *,@DCEO 999 921011 53531004 2 *,@DCEI 999 921011 53531002 ERROR NOP 0 TERM **** Definitions **** MESSAGE DC Y(ENDMESS-MESSAGE) DS 3X DC C'Output WRTRD example 3' ENDMESS EQU * INPUT DS 0CL14 LENGTH DS CL2 UNUSED DS CL2 DATA DS CL10 END
Example 4
Use of VTSUCB
WRTRD4 START PRINT NOGEN BALR 10,0 USING *,10 WRTRD MESSAGE,,INPUT,,40,ERROR,PARMOD=31,VTSUCBA=VTSUPAR ERROR NOP 0 TERM * VTSUPAR VTSUCB MODE=LINE,BELL=YES,LOW=YES,SPECIN=C 1 *,VTSUCB 350 980309 MESSAGE DC Y(ENDMESS-MESSAGE) DS 3X DC C'Output WRTRD example 4' ENDMESS EQU * INPUT DS 0CL40 LENGTH DS CL2 UNUSED DS CL2 DATA DS CL36 END
Example 5
WRTRD with extended line mode
WRTRD5 START PRINT GEN BALR 3,0 USING *,3 QUEST WRTRD OUTPUT,,INPUT,,90,END,MODE=LINE,EXTEND=YES,PARMOD=31 1 QUEST ##SPASS S0001S,S0001D A312 2 CNOP 0,4 2 QUEST BAS 1,S0001S ADDRESS AND SKIP PARAMS 1 S0001D DS 0F A340 1 FHDR UNIT=36,FUNCT=19,VERS=2 2 DS 0A 2 DS 0XL8 GENERAL OPERAND LIST HEADER 2 DC AL2(36) FUNCTION UNIT NUMBER 2 DC AL1(19) FUNCTION NUMBER 2 DC AL1(2) FUNCTION INTERFACE VERSION NUMBER 2 DC X'FFFFFFFF' Returncode is virgin 1 DC A(END) ERROR RETURN ADDRESS 1 DC AL4(OUTPUT) MESSAGE AREA ADDRESS 1 DC AL4(INPUT) READ IN AREA DDRESS 1 DS AL1(0) PLACE FOR O.EDIT BYTE 1 1 DS AL1(0) PLACE FOR O.EDIT BYTE 2 1 DS AL1(0) PLACE FOR I.EDIT BYTE 1 1 DS AL1(0) PLACE FOR I.EDIT BYTE 2 1 DC AL2(90) NUMBER OF CHARS. TO BE READ 1 DC AL1(0) RESERVED 2 1 DC AL1(0) FLAG BYTE 1 1 DC AL4(0) VTSUCB ADDRESS 1 DC AL2(0) INPUT TIMER VALUE 009 1 DC H'0' RES_FOR_TIAM 007 1 * 1 @DCEO OTRSUP=,OLINEND=,OMANUAL=, C 1 OHCOPY=,OPTAPE=,ONOPOSN=, C 1 OHDR=,OETB=,OHOM=,OEXTEND=YES, C 1 MODE=LINE,DCEDIT=,OBELL=,OTRANS=, C 1 ONOLOGC=, C 1 RDA1=-16,RDA2=-15 2 ORG *-16 2 DC AL1(4) 2 ORG *+16-1 2 ORG *-15 2 DC AL1(4) 2 ORG *+15-1 2 *,@DCEO 999 921011 53531004 1 *
1 @DCEI DCEDIT=,MODE=LINE,RDA1=-14,RDA2=-13, C 1 ITRSUP=,ILINEND=,ICFD=, C 1 IGETBS=,ILCASE=,IHDR=, C 1 IGETFC=,IGETIC=,IEXTEND=YES 2 ORG *-14 2 DC AL1(32) 2 ORG *+14-1 2 ORG *-13 2 DC AL1(32) 2 ORG *+13-1 2 *,@DCEI 999 921011 53531002 1 * 1 S0001S DS 0Y A340 1 SVC 39 SYSFILE SVC 1 * CLC INLNAME(4),='XXXX' BNE QUEST END TERM 1 END DS 0H 206 1 LA 1,S0006D 205 1 B S0006S 200 1 S0006D DS 0F 200 1 FHDR UNIT=6,FUNCT=40,VERS=1 207 2 DS 0A 2 DS 0XL8 GENERAL OPERAND LIST HEADER 2 DC AL2(6) FUNCTION UNIT NUMBER 2 DC AL1(40) FUNCTION NUMBER 2 DC AL1(1) FUNCTION INTERFACE VERSION NUMBER 2 DC X'FFFFFFFF' Returncode is virgin 1 DC XL1'01' 207 1 DC XL1'00' 1 DC XL1'00' 1 DC XL1'04' 1 DC CL4' ' 1 S0006S DS 0Y 200 1 SVC 9 * VTCSET LOG 1 * 1 * VIRTUAL TERMINAL CONTROL CHARACTER SET 1 * 1 * 1 * LOGICAL RECORD DELIMITERS 1 * 1 LOGNL EQU X'15' LOGICAL LINE END (CONT NEXT LINE) 1 LOGNP EQU X'0C' LOGICAL PAGE END (CONT NEXT PAGE) 1 LOGCL EQU X'0D' LOGICAL LINE END (CONT SAME LINE)
1 LOGVPA EQU X'29' LOG VERTICAL POS ABSOLUT (CONT LINE N) 1 LOGHPA EQU X'2A' LOG HORIZONT POS ABSOLUT (CONT COL N) 1 LOGASF EQU X'21' LOG SHEED FEDDING FROM CASETTE N D1 1 LOGCAP EQU X'20' CONTINUE ACTUAL POSITION AT MSG BEGIN 1 * 1 * LOGICAL UNIT DELIMITERS 1 * 1 LOGEM1 EQU X'1D' EMPHASIZED LAYOUT 1 1 LOGEM2 EQU X'1F' EMPHASIZED LAYOUT 2 1 LOGEM3 EQU X'13' EMPHASIZED LAYOUT 3 1 LOGEM4 EQU X'14' EMPHASIZED LAYOUT 4 1 LOGNOR EQU X'1E' NORMAL LAYOUT 1 LOGDAR EQU X'12' DARK LAYOUT 1 LOGPLD EQU X'2B' PARTIAL LINE DOWN 1 LOGPLU EQU X'2C' PARTIAL LINE UP 1 * 1 LOGSO EQU X'0E' SHIFT OUT TO 2ND CHARACTER SET 1 LOGSI EQU X'0F' SHIFT IN TO NORMAL CHARACTER SET 1 * 1 LOGSPA EQU X'36' START PROTECTED AREA 1 LOGEPA EQU X'08' END PROTECTED AREA 1 LOGNUM EQU X'11' START NUMERIC (UNPROTECTED) AREA 1 * 1 LOGCHS EQU X'06' CHARACTER SET D1D2 1 LOGCOL EQU X'17' COLOUR CHOICE 1 LOGLOC EQU X'09' LOCAL ATTRIBUTE START S1 1 LOGLOX EQU X'0A' LOCAL ATTRIBUTE EXIT S1 1 * 1 LOGVMI EQU X'24' VERTICAL MOVEMENT INDICATOR D1 1 LOGHMI EQU X'23' HORIZONTAL MOVEMENT INDICATOR D1 1 LOGLM EQU X'38' LEFT MARGIN D1D2D3 1 LOGPTS EQU X'1A' PROPORTIONAL TYPING START 1 LOGPTX EQU X'1B' PROPORTIONAL TYPING END 1 LOGMLL EQU X'33' MAXIMAL LINE LENGTH 1 LOGMLN EQU X'35' MAXIMAL LINE NUMBER (ON PAGE) 1 LOGNLQ EQU X'39' NEAR LETTER QUALITY START 1 LOGNLX EQU X'3B' NEAR LETTER QUALITY EXIT 1 * 1 * SPECIAL FUNCTIONS 1 * 1 LOGDEL EQU X'07' DELETE 1 LOGBS EQU X'16' BACKSPACE 1 LOGSUB EQU X'3F' SUBSTITUTE 1 * 1 * DELIMITER EXTENSION 1 * 1 LOGEXT EQU X'3E' DELIMITER EXTENSION BYTE
1 * 1 * EXTENDED LOGICAL DELIMITERS 1 * 1 LOGTRA EQU C'T' TRANSPARENT OUTPUT X1L1L2 1 LOGDIM EQU C'D' DIMENSION OF SCREEN D1D2D3D4D5 1 LOGRPT EQU C'R' REPEAT NEXT CHARACTER NN TIMES 1 LOGDIS EQU C'I' SET DISPLAY ATTRIBUTES 1 LOGRS EQU X'00' RESET DISPLAY ATTRIBUTES 1 LOGFL EQU X'01' FLASHING 1 LOGUND EQU X'02' UNDERSCORED 1 LOGBLK EQU X'04' BLANKED 1 LOGRIN EQU X'08' REDUCED INTENSITY 1 LOGINV EQU X'10' INVERSE 1 LOGFLD EQU C'F' SET FIELD CHARACTERISTICS 1 LOGINP EQU X'00' INPUT FIELD 1 LOGPNS EQU X'01' PROTECTED NOT SENDABLE 1 LOGPRS EQU X'20' PROTECTED SENDABLE 1 LOGNUF EQU X'02' NUMERIC 1 LOGMOD EQU X'04' PRE-MODIFIED 1 LOGMAR EQU X'08' MARKABLE 1 LOGPRT EQU X'10' PRINTABLE 1 LOGASK EQU X'40' AUTOMATIC SKIP 1 * 1 * 1 * PHYSICAL UNIT DELIMITERS 1 * 1 LOGESC EQU X'27' ESCAPE X 1 LOGDC4 EQU X'3C' DC4 X 1 LOGHT EQU X'05' HORIZONTAL TABULATION 1 LOGVT EQU X'0B' VERTICAL TABULATION 1 * 1 *,VTCSET 080 941024 53531028 INPUT DS 0CL90 DS CL4 INLNAME DS CL20 INFNAME DS CL12 INSTR DS CL30 INZIP DS CL4 INCITY DS CL20 OUTPUT DS 0H DC Y(ENDOUT-OUTPUT) DS CL2 DC X'01' DC AL1(LOGNP) DC AL1(LOGNL) DC AL1(LOGNL) DC AL1(LOGSPA)
DC AL1(LOGEM3) DC C'PLEASE ENTER NAME AND ADDRESS' DC AL1(LOGNL) DC AL1(LOGNL) DC AL1(LOGSPA) DC C' LAST NAME: ' DC AL1(LOGEPA) NAME DS CL20 DC AL1(LOGNL) DC AL1(LOGSPA) DC C' FIRST NAME: ' DC AL1(LOGEPA) FNAME DS CL12 DC AL1(LOGNL) DC AL1(LOGSPA) DC C' STREET: ' DC AL1(LOGEPA) STREET DS CL30 DC AL1(LOGNL) DC AL1(LOGSPA) DC C' ZIP and CITY: ' DC AL1(LOGEPA) DC AL1(LOGNUM) ZIP DS CL4 DC AL1(LOGSPA) DC C' ' DC AL1(LOGEPA) CITY DS CL20 DC AL1(LOGNL) DC AL1(LOGNL) DC AL1(LOGSPA) DC AL1(LOGEM3) DC C'FOR PROGRAM TERMINATION, ENTER "XXXX" FOR LAST NAME' ENDOUT EQU * END
Runtime log:
/start-assembh % BLS0500 PROGRAM 'ASSEMBH', VERSION '<ver>' OF '<date>' LOADED % ASS6010 <ver> OF BS2000 ASSEMBH READY //compile source=*library-element(macexmp.lib,wrtrd5), - // compiler-action=module-generation(module-format=llm), - // module-library=macexmp.lib, - // listing=parameters(output=*library-element(macexmp.lib,wrtrd5)) % ASS6011 ASSEMBLY TIME: 314 MSEC % ASS6018 0 FLAGS, 0 PRIVILEGED FLAGS, 0 MNOTES % ASS6019 HIGHEST ERROR-WEIGHT: NO ERRORS % ASS6006 LISTING GENERATOR TIME: 116 MSEC //end % ASS6012 END OF ASSEMBH /start-executable-program library=macexmp.lib,element-or-symbol=wrtrd5, - / prog-mode=*any % BLS0523 ELEMENT 'WRTRD5', VERSION '@' FROM LIBRARY ':2OSG:$QM212.MACEXMP.LIB' IN PROCESS % BLS0524 LLM 'WRTRD5', VERSION ' ' OF '<date> <time>' LOADED %PLEASE ACKNOWLEDGE
PLEASE ENTER NAME AND ADDRESS LAST NAME: .................... FIRST NAME: ........... STREET: ..................... ZIP and STREET: .... .............................. FOR PROGRAM TERMINATION, ENTER "XXXX" FOR LAST NAME . . .