Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Producing main programs in Assembler

&pagelevel(3)&pagelevel

It is advisable to link the IEDTGLE module explicitly to the main program. For this reason, a link editor run follows assembly in the procedure below. Usually, a simple Assembler program calls EDT without an ILCS flag (EGLILCS). This is the default behavior when generating the IEDTGLCB control block. The procedure below assembles and links Assembler main programs which are stored as BEISPIEL1.ASS, BEISPIEL2.ASS, ... in the library EDT.BEISPIELE.
The generated program and the compiler lists are also stored in this library.

/SET-PROCEDURE-OPTIONS INPUT-FORMAT=FREE-RECORD-LENGTH,/
    DATA-ESCAPE-CHAR=STD
/BEGIN-PARAMETER-DECLARATION
/   DECLARE-PARAMETER NAME=NR
/   DECLARE-PARAMETER NAME=LIB,INITIAL-VALUE=C'EDT.BEISPIELE
/END-PARAMETER-DECLARATION
/START-ASSEMBH
//COMPILE SOURCE=*LIBRARY-ELEMENT(//
    LIBRARY=&LIB,ELEMENT=BEISPIEL&NR..ASS),//
    MACRO-LIBRARY=($.SYSLIB.EDT.170,$.MACROLIB),-        ------------ (1)
//    COMPILER-ACTION=*MODULE-GENERATION(MODULE-FORMAT=*LLM),//
    MODULE-LIBRARY=&LIB,//
    LISTING=*PARAMETERS(OUTPUT=*LIBRARY-ELEMENT(//
        LIBRARY=&LIB,ELEMENT=BEISPIEL&NR..LST))
//END
/START-BINDER
//START-LLM-CREATION INTERNAL-NAME=BEISPIEL&NR._ASS
//INCLUDE-MODULES MODULE-CONTAINER=*LIBRARY-ELEMENT(//
    LIBRARY=&LIB,ELEMENT=BEISP&NR)                       ------------ (2)
//INCLUDE-MODULES MODULE-CONTAINER=*LIBRARY-ELEMENT(//
    LIBRARY=$.SYSLNK.EDT.170,ELEMENT=IEDTGLE)            ------------ (3)
//SAVE-LLM MODULE-CONTAINER=*LIBRARY-ELEMENT(//
    LIBRARY=&LIB,ELEMENT=BSP&NR.A)                       ------------ (4)
//END
/EXIT-PROCEDURE

Explanations

(1)It is assumed that SYSLIB.EDT.170 is installed under the default user ID. The Assembler needs this library in order to locate the IEDTGLE interface macros. It is not usually necessary to specify the default macro library but it may be necessary to specify further macro libraries.
(2)It is assumed that the name of the first CSECT in the Assembler program is BEISPx (BEISPIELx would be too long in standard Assembler).
(3)The user program is linked to the module IEDTGLE from SYSLNK.EDT.170. IEDTGLE uses IMON to locate the EDT libraries and either loads EDT dynamically or connects to the EDT subsystem.
(4)The generated program can then be started with /START-EXECUTABLE-PROGRAM (E=BSPxA,L=EDT.BEISPIELE) (x = 1,2,..).