Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

OSTAT - Request information on open files

Macro type:

R for PARMOD=24
O for PARMOD=31

The OSTAT macro enables the user to determine:

  • how many jobs have opened the file

  • how many jobs have opened the file for ISAM shared-update processing (in all possible OPEN/SHARUPD combinations)

  • how many jobs have opened the file with an access method other than ISAM

A Dsect can be generated for the output area (operand “area”) by means of the IDOST macro.

The file must be opened before the OSTAT macro is issued. The OPEN/SHARUPD combination of the calling job is then included in the output.

Format

Operation

Operands

OSTAT

fcbadr / (1)
,area / (0)
[,PARMOD = 24 / 31]

Operand descriptions

fcbaddr

Address of the FCB for the file for which the OPEN status is to be returned.

(1)
The FCB address is stored in register 1.

area

Address of the area in which the information is to be placed. This area consists of 23 count fields, each 1 byte long. The maximum value of each counter is therefore 255. If any of the ISAM internal counters reaches a higher value, then the corresponding counter in the information area is set to 255.

A Dsect can be generated for the output area by means of the IDOST macro.

If the “area” operand is not specified, the area for the information is generated in the macro; this means that the resulting code will not be reentrant.

(0)
The address of the area in which the information is to be placed is stored in register 0.

PARMOD

Specifies the generation mode for the macro.

Default value:

the value predefined for the generation mode by means of the GPARMOD macro or preset by the assembler.

= 24
The object code generated can run only in the 16-Mb address space (24-bit addressing only).

= 31
The object code generated can run in the 2-Gb address space (24-bit or 31-bit addressing).

Programming note

The OSTAT macro overwrites the contents of registers 0, 1, 14 and 15.

Return codes

Register 1

Register 0

Register 15

Address of the FCB.

Address of the output area “area”.

X'0000' (execution successful) or an error code in the two low-order bytes.