Tuesday 16 June 2015

PLI Built-in Functions for Mainframe Programmers (1 of 5)

MAINFRAME+PLI+JOBS
ADDR -- Built-in function

Returns a pointer value identifying the location of x.

>>--ADDR(x)-------------------------------------------------------------><
  Example: P = ADDR(TABLE);

ALL -- Built-in function

Returns bit string (with length of longest element of array) resulting
from logical AND of all the elements of array x.

>>--ALL(x)--------------------------------------------------------------><
  Example: IF ALL(LIST) THEN CALL SUB;

AREA -- Attribute

Reserves storage (in bytes) for the area.  Default size is 1000 bytes.

>>--AREA----------------------------------------------------------------><
          +-(--*--)-------------------------------------¦
          +-(--expression-----------------------------)-+
                           +-REFER--(--variable--)-+
  Example: DECLARE MC AREA(4095);

ASSEMBLER (ASM) -- Option of OPTIONS Attribute

Specifies that entry point is in an assembler routine.

  Example: DECLARE ENTB ENTRY OPTIONS(ASM);

ATTENTION (ATTN) -- Condition

Occurs in conversational mode when programmer causes an attention interruption from the terminal or when
SIGNAL ATTENTION is executed.

>>--ATTENTION-----------------------------------------------------------><
  Example: ON ATTENTION CALL ATTPACK;


BACKWARDS -- Attribute

Causes the (implied) RECORD SEQUENTIAL INPUT tape file to be accessed in reverse order.

>>--BACKWARDS-----------------------------------------------------------><
  Example: DECLARE TAPE FILE INPUT BACKWARDS...;

BASED -- Attribute

Specifies that the actual area of storage is identified by locator values. A based variable can be used to refer
to variables of any storage class; it can also control its own storage by means of ALLOCATE and FREE
statements.

>>--BASED---------------------------------------------------------------><
           +-(--locator-reference--)-+
  Example: DECLARE REC CHAR(30) BASED(P);

No comments:

Post a Comment