LIBRM NOTE (Note Member Address) Macro

This macro saves the current member position, that is, the position that follows the record or byte that was last read from or written to the library member specified in the LDCB.

The member position for members that are opened for INPUT and INOUT is the GET position, for members that are opened for OUTPUT it is the PUT position.

For NOTECTL=NO the Librarian keeps track of the noted position by itself in a last-in first-out (LIFO) mechanism, NOTE pushing an element to the stack and POINT popping up the stack. The stack has a depth of 20 elements.

Specify NOTECTL=YES if you want to control this information yourself. In this case, a 32-byte area NOTEINF must be provided which obtains the member 's position.

It is not possible to switch from NOTECTL=NO to NOTECTL=YES and vice versa.

See also Library Macro Notation for details on register notation and possible operand specifications.

Format

Read syntax diagramSkip visual syntax diagramlabelLIBRM NOTE,LDCB= areaname,NOTEINF= noteinf,NOTECTL=NO,NOTECTL=YES,EROPT=RET,EROPT=CANCEL,ERRAD= label

Requirements for the caller

AMODE:
24 or 31
RMODE:
ANY
ASC Mode:
Primary

Parameters

LDCB=areaname
Specifies the address of the LDCB (Librarian Data Control Block) for the request.
NOTEINF=noteinf
Specifies the address of a 32-byte area in which the NOTE information is to be returned. This operand is required if NOTECTL=YES is specified.
NOTECTL=NO | YES
Specifies who is to maintain the NOTE information:
NO
The Librarian keeps track of the NOTE information (LIFO mechanism).
YES
The caller maintains the information himself. In this case, the NOTEINF operand is required.
EROPT=RET | CANCEL
Defines an error handling option, which is taken if the function cannot be performed (return code > 12).
RET
Processing is continued, either by a normal return or by branching to the ERRAD exit.
CANCEL
Processing is canceled. A librarian error message is issued to SYSLOG.
ERRAD=label
Specifies a label to which the Librarian branches, if the function cannot be performed because of an error (return code > 12).

Return Codes in Register 15

Return  Reason   Meaning
 Code    Code
  0       0      NOTE information has been extracted.
 16      xx      External system error with feedback code and message.
 20      xx      Internal system error with feedback code and message.
The external system error feedback codes are described in Librarian Feedback Codes. All other (internal) feedback codes are described in http://publibfp.dhe.ibm.com/epubs/pdf/ieslde10.pdf.
Note:
  1. If a stack overflow occurs (that is, if the number of NOTE requests minus the number of POINT requests is greater than 20), return code 16 is passed back with a feedback code.
  2. A member is automatically closed if the return code is higher than 12.
  3. Instead of specifying LIBRM NOTE also LIBRM NOTEF can be specified. This must be done when the PL/X 1.4 (or higher) compiler is used.