Returns the number of attributes present in the associated GSA file.
Syntax
01 SPHANDLE PIC S9(9) BINARY.
01 ATTRCOUNT PIC S9(9) BINARY.
01 SPRETCODE PIC S9(9) BINARY.
*
CALL 'SPATTCNT' USING SPHANDLE, ATTRCOUNT,
SPRETCODE.
Arguments
SPHANDLE
The file handle of the opened object file. Input.
ATTRCOUNT
The number of fields in the opened attribute (GSA) file. Output.
Return Value
Number of fields in the object file. If a GSA file does not exist, a PIP-ERROR is returned and
ATTRCOUNT is set to zero.
Prerequisites
SPOFOP
None.
Alternates
Example
01 COUNT PIC S9(9) BINARY.
.
.
.
CALL 'SPATTCNT' USING SPHANDLE, ATTRCOUNT,
SPRETCODE.
IF SPRETCODE = PIP-OK
PERFORM UNTIL ATTRCOUNT <= 0
CALL 'SPATIBNU' USING SPHANDLE,
FIELDNUMBER, INFO, SPRETCODE
ADD -1 TO ATTRCOUNT END-PERFORM
END-IF