Organization: Penn State University
Date: Tue, 25 Aug 1992 14:59:55 EDT
From: Christopher Sacksteder <CJS@psuvm.psu.edu>
Newsgroups: comp.lang.rexx
Subject: Re: REXXCOMP versus EXECUPDT (NOUPDATE NOCOM
 <1992Aug25.160136.1074@hou.amoco.com>

In article <1992Aug25.160136.1074@hou.amoco.com>, zjlc12@hou.amoco.com (Jerry
Campbell) says:
>I was speaking from my experience with CMS Rexx.  I've never heard of a
>anything available for CMS Rexx that preprocesses the source in the
>way you're talking about.  What does the interpreter do with it?  How does
>it recognize that this file has been "tokenized"?

An overview from the creator, Leigh Johnson, Prudential Insurance,
follows.  This has been out and about for about 5 years, so I thought
*everyone* knew of it.
----------------------------------------------------------------------
    This modification creates 'compiled' REXX execs.  Actually, the REXX
     exec is simply pre-parsed, and converted to a 1 record internal
     format.  This completely avoids all of the parsing work normally
     done by DMSRIN every time an exec is executed, and provides
     execution time savings of up to 30%-50% (depending on the function
     of the individual exec).

    Also, this provides the benefit of a 'non-traceable' exec.  Since
     the original exec source, required to perform tracing, is not
     available, a 'TS' or 'SET EXECTRAC ON' request will result in
     tracing only non-zero return codes from host commands.

    Since the compiled exec is in an internal format, it is extremely
     difficult to XEDIT the exec to determine its function, and
     virtually impossible to modify it in this form.


Function -

    DMSRIN recognizes a compiled exec and avoids all of the work normally
     required to do parsing.  Instead, the next pre-parsed clause is
     obtained directly from the input exec.  For a detailed description
     of the parsing done by DMSRIN, see the comments in that module.

    DMSRTC recognizes a compiled exec and refuses to do any tracing of it.
     This is required since the internal format of a compiled exec does
     not lend itself to very meaningful tracing anyway.


DMXRXCOM -

    This is the REXX COMPILER.  It is entirely separate from the normal
     REXX interpreter, and is designed to be GENMOD'ed as a MODULE.

    Since this program directly utilizes a section of code from DMSRIN
     to do the actual parsing, it is provided as an update file to
     DMSRIN in order that any maintenance to that module may be
     automatically incorporated into DMXRXCOM.

    In order to rebuild DMXRXCOM you may either:
         1. Use the UPDATE command directly to create the
            assembler source.
         2. Apply the update to DMSRIN using XEDIT and 'PUT'
            the entire source program thus created into the
            file 'DMXRXCOM ASSEMBLE'.
         3. Use VMFASM to automatically apply the update to
            DMSRIN and assemble it, then renaming the text
            deck to DMXRXCOM.  (Being careful not to overlay
            the real DMSRIN TEXT.)
         4. Anything else that works for you.


Code affected -

    DMSRIN  LSP022DS  Recognize a compiled exec and avoid parsing
    DMSRTC  LSP022DS  Recognize a compiled exec to disallow tracing

    DMSRIN  DMXRXCOM  Build DMXRXCOM, the REXX compiler


Requires regeneration of -

    CMS NUCLEUS,
    DMXRXCOM MODULE


Written for CMS/SP4, at Service Level 411.

Although there has been no attempt to test this program at other
release or service levels, it should function properly under any
service level, including SP3.

   Leigh Johnson
   Spurt 1G
   Prudential Insurance
   55 N. Livingston Avenue
   Roseland, New Jersey 07068

    02/09/87
Newsgroups: comp.lang.rexx