Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

PROC-NAME( ) Get procedure name

&pagelevel(3)&pagelevel

Domain: Environment information

The PROC-NAME() function returns the original name of the function caller.
In most cases the SYSCMD() function may be used to get the same name. However, the commands CALL-PROCEDURE, ENTER-PROCEDURE and INCLUDE-PROCEDURE sometimes copy the specified procedure and run the copy. In this case SYSCMD() returns the name of the copy, while PROC-NAME() delivers the name of the original procedure which has been copied.

Format

PROC-NAME( )


Result type

STRING

Input parameters

None

Result

The name of current procedure (a file, a library element or a list variable).

file
Name of the file that the procedure is called from.

*LIBRARY-ELEMENT(library,element(version),type)
Library element (designated by the name of the library, the name of the element with its version and the element type) that procedure is called from.

Warning

If the original procedure has been called with /ENTER-PROCEDURE *LIBRARY-ELEMENT(…), currently the following restrictions apply:

  • Output of element version will always be *HIGHEST-EXISTING, output of element type will always be *STD
  • A maximum of 52 characters should not be exceeded when adding the length of library name and element name (see manual description of ENTER-PROCEDURE command). If longer names are used, library and/or element name will be shortened with asterisk ‘*’ wildcard as in the example:
    *LIBRARY-ELEMENT(:ANY:$EXAMPLE.LIB.TEST.LONGNAME*,P.TESTELEM.LONGNAM*(*HIGHEST-EXISTING),*STD)

These restrictions are not guaranteed and may be abolished in the future!

*VARIABLE(variable)
List variable that procedure is called from.

*PRIMARY
The primary assignment when PROC-NAME is called from outside any procedure.

Error message

SDP0435 DESIRED INFORMATION NOT AVAILABLE