pl1 functions

21
PL/I Useful Stuff 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

Upload: rammurthy

Post on 20-Nov-2015

15 views

Category:

Documents


4 download

DESCRIPTION

PL1 Functions

TRANSCRIPT

ADDR -- Built-in function

PL/I Useful StuffADDR -- Built-in function

Returns a pointer value identifying the location of x.

>>--ADDR(x)------------------------------------------------------------->>--ALL(x)-------------------------------------------------------------->>--AREA---------------------------------------------------------------->>--ATTENTION----------------------------------------------------------->>--BACKWARDS----------------------------------------------------------->>--BASED--------------------------------------------------------------->>--CEIL--(--x--)------------------------------------------------------->>--CHAR--(--x------------)--------------------------------------------->>--CONDITION----------------------------------------------------------->>--CONTROLLED---------------------------------------------------------->>--CURRENTSTORAGE--(--x--)--------------------------------------------->>--DATAFIELD----------------------------------------------------------->>--DATETIME------------------------------------------------------------>>--DEFINED----reference------------------------------------------------>>--EMPTY--------------------------------------------------------------->--FETCH----entry-constant----;---------------------------------------->>--IGNORE--(--expression--)-------------------------------------------->>--INDEX--(--x--,--y--)------------------------------------------------>>----EXTERNAL---------------------------------------------------------->>--KEY--(--expression--)----------------------------------------------->>--LABEL--------------------------------------------------------------->--LOCATE--based-variable--FILE--(--file-reference--)------------------->

>-------------------------------------------------------------------;--->>--MOD--(--x--,--y--)-------------------------------------------------->>--NAME--(--file-reference--)------------------------------------------>>--OFFSET-------------------------------------------------------------->>--ONFILE-------------------------------------------------------------->>--ONLOC--------------------------------------------------------------->--PLICKPT--(----argument----)----------------------------------------->--PLIDUMP--(----argument----)----

PLIREST -- Built-In Subroutine

Allows you to restart program execution.

>>--PLIREST---------

PLIRETC -- Built-In Subroutine

Allows you to set a return code that can be examined by the program, system, or subsystem that invoked this

PL/I program or by another PL/I procedure via the PLIRETV built-in function.

>>--PLIRETC--(--return-code--)------

PLIRETV -- Built-In Function

Returns value set by CALL PLIRETC statement or returned by COBOL or ASSEMBLER routine.

>>--PLIRETV------------------------------------------------------------->--PLISRTA--(----argument----)--

POINTER (PTR) -- Built-In Function

Returns a pointer value that identifies, in area y, a generation originally identified by the offset x.

>>--POINTER--(--x--,--y--)---------------------------------------------->>--POSITION--(--expression--)------------------------------------------>>--PROD--(--x--)------------------------------------------------------->>--RECORD--(--file-reference--)---------------------------------------->FWD

WHILE(PTR1=NULL()); ...END;

REPEAT -- Built-In Function

Returns the string x concatenated with itself y times.

>>--REPEAT--(--x--,--y--)----------------------------------------------->>--RETURN------------------------;------------------------------------->--RETURNS--(----attribute----)---------------------------------------->>--SAMEKEY--(--x--)---------------------------------------------------->>--SET--(--pointer-reference--)---------------------------------------->0, 0 if x=0, -1 if x>--SIGN--(--x--)------------------------------------------------------->>--SIZE---------------------------------------------------------------->>--ON--condition--------------SYSTEM--;-------------------------------->>--STATIC-------------------------------------------------------------->>--STORAGE--(--x--)---------------------------------------------------->>--STRING--(--x--)----------------------------------------------------->>--STRINGRANGE--------------------------------------------------------->>--STRINGSIZE---------------------------------------------------------->>--SUBSCRIPTRANGE------------------------------------------------------>>--SUM--(--x--)-------------------------------------------------------->>--ON--condition--------------SYSTEM--;-------------------------------->--DECLARE---------------name-----------------------------------;------>--TASK---------------------------------------------------------------->>--TASK---------------------------------------------------------------->>--TRANSLATE--(--x--,--y------------)---------------------------------->>--TRANSMIT--(--file-reference--)-------------------------------------->0, CEIL(x) if x>--TRUNC--(--x--)------------------------------------------------------>>----ALIGNED----------------------------------------------------------->>--UNDEFINEDFILE--(--file-reference--)--------------------------------->>--UNDERFLOW----------------------------------------------------------->>--+-OUTPUT-+---------------------------------------------------------->>--VARIABLE------------------------------------------------------------>>--VERIFY--(--x--,--y--)----------------------------------------------->