Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

Utilizing LMS functionality from within EDT

By means of the @USE statement, EDT offers users the option of defining an external statement routine which can be called up as a subprogram via a user escape character also defined using @USE. This makes user-specified statements available in EDT.

In order to utilize LMS statements and thus the functionality of LMS from within EDT, the @USE statement must be specified in the EDT command line in the following form:

@USE COM[MAND]= ’usersymb’ (LMSEDT,$.SYSLNK.LMS.036)

with the external statement form: usersymb LMS statement

A detailed description of the @USE statement is provided in the “EDT” manual [10 (Related publications)].

Please note that the maximum length of an LMS statement entered in the EDT command line is only 256 bytes.

When an LMS statement is entered, it is analyzed and executed by the SDF command processor, which then returns the user to the EDT command line. Lowercase letters are converted to uppercase prior to analysis.

Notes

  • The LMS statements CALL-EDT, EDIT-ELEMENT and BEGIN-MAKE are not supported in the EDT command line.

  • External statement routines do not support any LMS start files.

  • LMS functionality can be utilized from within EDT

    • if EDT is called up as a main program or

    • if EDT is called up as a subprogram in the main program LMS using one of the LMS statements //CALL-EDT or //EDIT-ELEMENT.

  • If LMS is the main program, using LMS functionality within EDT causes no new LMS run to be started, i.e. the LMS settings from the current run remain in effect.

  • If EDT is running in Unicode mode e.g. after /START-EDTU (as of EDT V17) then entry LMSEDU is to be used instead of LMSEDT in EDT-statement @USE. If entry LMSEDT is used in Unicode mode then an element created by ADD-ELEMENT gets CCSN *NONE even though the character set in EDT set by CODENAME is not *NONE (e.g. UTF16).

The effects of the LMS statements EXTRACT-ELEMENT, ADD-ELEMENT and END are somewhat altered when they are used from within EDT.

The LMS statement is entered in the EDT command line:

  • EXTRACT-ELEMENT

    usersymbEXTRACT-ELEMENT ELEMENT = ... ,

                              TO-FILE = *STD

    The member records of the specified member are appended to the end of the current EDT work file.

  • ADD-ELEMENT

    usersymbADD-ELEMENT FROM-FILE=*STD ,

                          TO-ELEMENT = ...

    The data records are written from the current EDT work file into the specified member.

  • END

    usersymbEND

    • EDT was called as a main program:

      The subprogram LMS called via @USE is terminated, i.e. all libraries still open are closed. The user is returned to the EDT command line.

    • LMS was called as a main program:

      In interactive mode, the user is asked:

      LMS0409 TERMINATE LMS? REPLY (Y=YES, N=NO)

      Y: The main program LMS is terminated.
      N: The main program LMS is not terminated.

Extension of LMS statements

MODIFY-LOGGING-PARAMETERS ... ,

                       TEXT-OUTPUT = *EDT (WRITE-MODE=*UNCHANGED)

LMS log output is written to EDT work file 9; the WRITE-MODE operand refers to the contents of work file 9.

Example

/START-EDT ————————————————————————————————————————————————————————————  (1) 
.
 .

 -- (2)

 --(3)

--(4)

(1)

EDT is invoked.

(2)

LMS is defined as an external statement routine with the user escape character "period".

(3)

The member xmpl.mem1 of type=s is read into EDT work file 0 from the xmpl.lib library.

(4)

The member is renamed and written back into the same library from EDT work file 0.