Previous Topic: What You Can DoNext Topic: Coding a COBOL Output Module


How Information Is Passed

Communication between CA Culprit and an output module occurs through an argument list that is set up by CA Culprit and accessed by the output module. Before calling an output module, CA Culprit supplies the argument list values from system and user-supplied information. The following considerations apply:

The following table lists the output module arguments, their function, and address pointers.

Output Module Argument List and Address Pointers

Addresses are passed by the output phase through Register 1 to all output modules called in a CA Culprit run.

Argument Name

Function/Comments

Displacement from Register 1

OUTBUF

The starting address of the CA Culprit output record, containing records formatted according to user specifications.

0

OUTCODS

The address of a field containing 2 bytes of internal CA Culprit code (device type and DTF code) and 2 bytes for the output report number. The report number is accessible for output.

4

OUTOCLS

The address of a 1-byte user-supplied open/close switch accessed within the output module code. The following table lists allowable switch values.

8

OUTSPEC

The address of the record type code for the output file being written (2 bytes) and 2-bytes unused space.

12

OUTREC

The address for the size (4-bytes) of the output file records.

16

OUTBLK

The address for the output file blocksize (4 bytes).

20

OUTDESC

The address for the external file name (8-bytes alphanumeric) and logical unit (1-byte hexadecimal) for the output file.

24

OUTISK

The address of an internal CA Culprit key field not accessible by the user.

28

OUTPRINT

The entry address for the CA Culprit print routine used to print user-defined diagnostic and error message relating to the output buffer.

VPRINT cannot be called by a COBOL user module. For Assembler modules, call the VCON print routine address and pass the address of the line of data to be printed.

32

OUTFORM

The address of a 10-byte field containing 2 bytes that contain the special value that is coded on the OUTPUT parameter.

36

Output Module Open/close Switch Values

If the open/close switch is not set to one of these values, CA Culprit outputs an error message stating the contents of the switch.

Hexadecimal Value

Binary Value

File Status

X'FF'

The output file is closed and must be opened by resetting the value to X'00'.

255

X'00'

The output file is open and reads records passed from CA Culprit and writes them to an output device or file until an end-of-file condition is encountered.

0

X'0F'

Indicates end-of-file after the last output record is delivered to the output module. The file is closed and the value is reset to X'FF'.

15