PUNCH instruction
The PUNCH instruction creates a record containing
a source or other statement, or an object
record, to be written to the object file.
 >>-+-----------------+--PUNCH--string--------------------------><
'-sequence_symbol-'
|
- sequence_symbol
- is a sequence symbol.
- string
- is a character string of up to 80 characters, enclosed in
single quotation marks. All 256 characters in the EBCDIC character set
are allowed in the character string. Variable symbols are also allowed.
Double-byte data is permissible in the operand field when the DBCS
assembler option is specified. However, the following rules apply
to double-byte data:
- The DBCS ampersand and the single quotation mark are not recognized as delimiters.
- A double-byte character that contains the value of an EBCDIC
ampersand or a single quotation mark in either byte is not recognized
as a delimiter when enclosed by SO and SI.
The position of each character specified in the PUNCH statement
corresponds to a column in the record to be punched. However, the
following rules apply to ampersands and single quotation marks:
- A single ampersand initiates an attempt to identify a variable symbol
and to substitute its current value.
- A pair of ampersands is punched as one ampersand.
- A pair of single quotation marks is punched as one single quotation mark.
- An unpaired single quotation mark followed by one or more spaces
simply ends the string of characters punched. If a non-space
character follows an unpaired single quotation mark, an error message is
issued and nothing is punched.
Only the characters punched, including spaces, count toward the
maximum of 80 allowed.
The PUNCH instruction causes the data in its operand to be punched
(copied) into a record. One PUNCH instruction produces one record, but as many
PUNCH instructions as necessary can be used.
You can code PUNCH statements in:
- A source module to produce control statements for the linker.
The linker uses these control statements to process the object
module.
- Macro definitions to produce, for example, source statements in
other computer languages or for other processing phases.
The assembler writes the record produced by a PUNCH statement when it
writes the object deck.
The ordering of this record in the object deck is determined
by the order in which the PUNCH statement is processed by the assembler.
The record appears after any object deck records produced by previous
statements, and before any other object deck records produced by
subsequent statements.
The PUNCH instruction statement can appear anywhere in a source
module. If a PUNCH instruction occurs before the first control section,
the resultant record punched precedes all other records in the
object deck.
The record punched as a result of a PUNCH instruction is not a
logical part of the object deck, even though it can be physically
interspersed in the object deck.
Notes:
- The identification and sequence number field generated as part of other
object deck records is not generated for the record punched by the
PUNCH instruction.
- If the NODECK and NOOBJECT assembler options are
specified, no
records are punched for the PUNCH instruction.
- Do not use the PUNCH instruction if the
GOFF option is specified, as the resulting file may be unusable.
[ Top of Page | Previous Page | Next Page | Contents | Index ]