Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

COMPILE-PROCEDURE Compile procedure

&pagelevel(4)&pagelevel

Domain: PROCEDURE

Command description

The COMPILE-PROCEDURE command converts an S procedure into a compiled procedure, i.e. into an intermediate format that can be used in environments in which the SDF-P subsystem is not available.

The full functional scope of SDF-P can be used in compiled procedures. This also holds true if these procedures are started in an environment containing only SDF-P-BASYS.

Notes

  • The COMPILE-PROCEDURE command is part of the SDF-P subsystem. It is rejected if the subsystem has not been loaded (even if it is included in a compiled procedure).

  • It is not possible to specify wildcards for the FROM-FILE and TO-FILE operands. It is, however, possible to specify both files and library elements.

  • Inconsistent specifications for input/output are considered semantic errors, i.e. the appropriate error handling routine will be initiated.

  • It is only possible to send error messages to SYSOUT. These messages are identical to those for a procedure called with CALL-PROCEDURE with the exception of the following additional compiler-specific messages:

    SDP1300 PROCEDURE COMPILER VERSION ‘(&00)’ STARTED
    SDP1301 PROCEDURE COMPILER TERMINATED NORMALLY
    SDP1302 PROCEDURE COMPILER TERMINATED ABNORMALLY
    
  • COMPILE-PROCEDURE can also be used to convert S procedures which do not contain any chargeable SDF-P functions, or only include a few such functions, and which run on installations without the SDF-P subsystem. These installations must, however, include V2.0B of SDF-P-BASYS.

Format

COMPILE-PROCEDURE

FROM-FILE = <filename 1..54 without-gen> / *LIBRARY-ELEMENT(...)

*LIBRARY-ELEMENT(...)

LIBRARY = <filename 1..54 without-gen>

,ELEMENT = <composed-name 1..64>(...)

<composed-name 1..64>(...)

VERSION = *HIGHEST-EXISTING / *UPPER-LIMIT / <composed-name 1..24>

,TYPE = J / <alphanum-name 1..8>

,TO-FILE = <filename 1..54 without-gen> / *LIBRARY-ELEMENT(...) / *DUMMY

*LIBRARY-ELEMENT(...)

LIBRARY = *SAME / <filename 1..54 without-gen>

,ELEMENT = *SAME(...) / <composed-name 1..64>(...)

*SAME(...)

VERSION = *SAME / *UPPER-LIMIT / *INCREMENT / *HIGHEST-EXISTING /

<composed-name 1..24>

<composed-name 1..64>(...)

VERSION = *SAME / *UPPER-LIMIT / *INCREMENT / *HIGHEST-EXISTING /

<composed-name 1..24>

,TYPE = SYSJ / <alphanum-name 1..8>

Operands

FROM-FILE =
Designates the source procedure.

FROM-FILE = <filename 1..54 without-gen>
Name of the procedure file.

FROM-FILE = *LIBRARY-ELEMENT(...)
The procedure is stored in a PLAM library.

LIBRARY = <filename 1..54 without-gen>
Name of the PLAM library containing the procedure.

ELEMENT = <composed-name 1..64>(...)
Name of the element.

VERSION =
Specifies the version number of the element.

VERSION = *HIGHEST-EXISTING
Selects the highest existing version number.

VERSION = *UPPER-LIMIT
Selects the highest possible version number.

VERSION = <composed-name 1..24>
Selects the specified version number.

TYPE= J / <alphanum-name 1..8>
Element type. The default element type is J.

TO-FILE =
Specifies where the compiled procedure is to be stored.

TO-FILE =<filename 1..54 without-gen>
Name of the file in which the compiled procedure is to be stored.

TO-FILE = *DUMMY
No procedure need be compiled. The command merely checks the procedure (see CALL-PROCEDURE EXECUTION = *NO).

TO-FILE = *LIBRARY-ELEMENT(...)
The compiled procedure is stored in a PLAM library.

LIBRARY = *SAME / <filename 1..54 without-gen>
Name of the PLAM library in which the compiled procedure is to be stored. The default value is the library for the source procedure.

ELEMENT =
Name of the element for the compiled procedure.

ELEMENT = *SAME(...)
The name of the element is the same as in the source procedure.

VERSION =
Specifies the version number of the element (only for S procedures).

VERSION = *SAME
Selects the same version number as in the source procedure.

VERSION = *UPPER-LIMIT
Selects the highest possible version number.

VERSION = *INCREMENT
The version number of the element is increased.

VERSION = *HIGHEST-EXISTING
Selects the highest existing version number.

VERSION = <composed-name 1..24>
Selects the specified version number.

ELEMENT = <composed-name 1..64>(...)
Name of the element.

VERSION =
Specifies the version number of the element (only for S procedures).

VERSION = *SAME
Selects the same version number as in the source procedure.

VERSION = *UPPER-LIMIT
Selects the highest possible version number.

VERSION = *INCREMENT
The version number of the element is increased.

VERSION = *HIGHEST-EXISTING
Selects the highest existing version number.

VERSION = <composed-name 1..24>
Selects the specified version number.

TYPE= SYSJ / <alphanum-name 1..8>
Element type. The default element type is SYSJ.

Command return codes

(SC2)

SC1

Maincode

Meaning


0CMD0001No error

1CMD0202Syntax error

1SDP0118Command in false context

1SDP0138

Error during procedure preanalysis

Guaranteed message: SDP0138


1SDP0223Incorrect environment

3CMD2203Incorrect syntax file

32CMD0221System error (internal error)

64SDP0091Semantic error

130SDP0099No further address space available

Example

Installation A: SDF-P has already been started

/ASSIGN-SYSLST TO-FILE=THE-RESULT-LISTING
/MODIFY-JOB-OPTIONS LISTING=*YES
/
/“AN ERRORED PROCEDURE IS COMPILED“
/COMPILE-PROCEDURE *LIB(LIB=THE-PROC-LIB,EL=THE-ERRONEOUS-PROC),-
/                  TO-FILE=*LIB-ELEMENT
SDP1300 PROCEDURE COMPILER VERSION 'V2.4A20' STARTED
SDP0201 INVALID BLOCK-CLOSING COMMAND USED
:
SDP1302 PROCEDURE COMPILER TERMINATED ABNORMALLY
/
/MODIFY-JOB-OPTIONS LISTING=*NO
/ASSIGN-SYSLST TO-FILE=*PRIMARY
/“LISTING: THE-RESULT-LISTING“
/
/...
/“AFTER CORRECTION“
/COMPILE-PROCEDURE *LIB(LIB=THE-PROC-LIB,EL=THE-CORRECT-PROC),-
/                  TO-FILE=*LIB-ELEMENT
SDP1300 PROCEDURE COMPILER VERSION 'V2.4A20' STARTED
SDP1301 PROCEDURE COMPILER TERMINATED NORMALLY

Installation B: SDF-P has not been started:

/CALL-PROCEDURE *LIB(LIB=THE-PROC-LIB,EL=THE-CORRECT-PROC)
%          1  1 /SET-PROCEDURE-OPTIONS
%          2  1 /DECLARE-VARIABLE A(TYPE=INTEGER,INITIAL-VALUE=1)
%          3  1 /WHILE (A < 3)
%          4  1 /IF (NOT IS-CAT-FILE ('MYFILE.1'))
%          4  1 /END-IF
%          5  1 /A=A+1
%          6  1 /END-WHILE
%          4  1 /IF (NOT IS-CAT-FILE ('MYFILE.2'))
%          4  1 /CREATE-FILE MYFILE.2
%          4  1 /END-IF
%          5  1 /A=A+1
%          6  1 /END-WHILE
%             1 /EXIT-PROCEDURE ERROR=*NO