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.

Read syntax diagramSkip visual syntax diagram>>-+-----------------+--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 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:

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:

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:
  1. 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.
  2. If the NODECK and NOOBJECT assembler options are specified, no records are punched for the PUNCH instruction.
  3. 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 ]