• Newbe can not create workable ooREXX (4.2.0) exec under UBUNTU 18.04.2

    From richard.steele@cpe-labs.com@21:1/5 to All on Fri Feb 22 09:49:52 2019
    If I create a simple REXX exec with either VIM or XEDIT I get the following error:
    parallels@parallels-vm:~$ rexx filevim
    7 *-* say SysGetpid();
    REX0099E: Error 99 running /home/parallels/filevim.rex line 7: Translation error
    REX0520E: Error 99.916: Unrecognized directive instruction
    :::
    From source code:
    #!/usr/bin/rexx /*************************************************************************/
    /* first we call unix command */ /*************************************************************************/

    ::requires "rxunixsys" LIBRARY;
    say SysGetpid();
    :::

    But I execute one of the example provided commands such as /usr/share/ooRexx/qdate.rex
    and it works fine.

    All this leads me to believe that I can not use VIM or Xedit to create a plaintext Rexx exec... but the ::requires statement is recognized!

    Suggestions?
    What am I missing?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From richard.steele@cpe-labs.com@21:1/5 to richard...@cpe-labs.com on Fri Feb 22 14:45:43 2019
    On Friday, February 22, 2019 at 12:49:53 PM UTC-5, richard...@cpe-labs.com wrote:
    If I create a simple REXX exec with either VIM or XEDIT I get the following error:
    parallels@parallels-vm:~$ rexx filevim
    7 *-* say SysGetpid();
    REX0099E: Error 99 running /home/parallels/filevim.rex line 7: Translation error
    REX0520E: Error 99.916: Unrecognized directive instruction
    :::
    From source code:
    #!/usr/bin/rexx /*************************************************************************/ /* first we call unix command */ /*************************************************************************/

    ::requires "rxunixsys" LIBRARY;
    say SysGetpid();
    :::

    But I execute one of the example provided commands such as /usr/share/ooRexx/qdate.rex
    and it works fine.

    All this leads me to believe that I can not use VIM or Xedit to create a plaintext Rexx exec... but the ::requires statement is recognized!

    Suggestions?
    What am I missing?

    Moving the directive after the last exit does work. Apparently ooRexx interpreter scans the Rexx exec at least twice. The first scan for directives at end of file. The second scan for parsing errors in the exec ... Both VIM and XEDIT can be used to
    create plain text Rexx execs.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ErichSt@21:1/5 to All on Sat Feb 23 11:21:57 2019
    Richard, ooRexx directives (clauses starting with ::) must always follow the main code.
    The first directive instruction in a program marks the end of the main code.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)