Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Using the EDT and LMS utility routines in a procedure

&pagelevel(3)&pagelevel

If the EDT and LMS utility routines are called in the same procedure, then you must make sure that both utility routines offer some functions that are also offered by the other utility routine. For example, a library element can be opened and edited in EDT (@OPEN statement), and a a library element can also be edited in LMS (EDIT-ELEMENT statement).

Every time you switch programs while processing a library element, additional time is needed to unload the one program and then load the other program. Direct processing in a single utility routine (EDT or LMS) is preferred over processing in several program calls (see the following example):

  1. Call LMS - extract element from file - terminate LMS

  2. Call EDT - read in and process file - terminate EDT

  3. Call LMS - store file in element again - terminate LMS

Recommended syntax

Syntax with lower performance

/START-LMS 
//OPEN-LIBRARY LIB=&(LIB-1)
//EDIT-ELEMENT ELEM=&(ELEM-1),-
//             TYPE=&(TYP)
...
@RETURN
//END

or:

/START-EDT 
@OPEN L=&(LIB-1)(E=&(ELEM-1),&(TYP)) 
... 
@CLOSE
@HALT

/START-LMS
//OPEN-LIBRARY LIB=&(LIB-1)
//EXTRACT-ELEMENT ELEM=(,&(ELEM-1),-
// TYPE=&(TYP)),TO=#WORK-1
//END
/START-EDT
@READ '#WORK-1'
...
@WRITE OVERWRITE
@HALT
/START-LMS
//OPEN-LIBRARY LIB=&(LIB-1)
//ADD-ELEMENT #WORK-1,-
//
TO-ELEM=(,&(ELEM-1),TYPE=&(TYP)),-
//WRITE-MODE=*REPLACE

//END