[Info-vax] Meditech in the news

Arne Vajhøj arne at vajhoej.dk
Mon Jan 10 13:41:14 EST 2022


On 1/10/2022 12:41 PM, Bill Gunshannon wrote:
> On 1/10/22 8:34 AM, Arne Vajhøj wrote:
>> On 1/10/2022 4:31 AM, Bob Eager wrote:
>>> On Sun, 09 Jan 2022 19:58:48 -0500, Arne Vajhøj wrote:
>>>> And I get a REXX.EXE.
>>>>
>>>> Unfortunately I cannot test it because I don't know REXX.
>>>
>>> Easy test. Feed it:
>>>
>>>    say 'Hello, world'
>>
>> That works.
>>
>> $ type bob.rexx
>> say 'Hello, world'
>> $ mcr []rexx bob.rexx
>> Hello, world
>>
>> The little test program that it comes with also works:
>>
>> $ typ [.demo]testvms.rexx
>> /*
>>   * Test program for Regina 3.3
>>   *
>>   * This program tests the OpenVMS specific BIFs.
>>   *
>>   */
>> Trace o
>> Say
>> Say 'Name of the my current disk:' f$getdvi("sys$disk:", 'volnam')
>> Say 'My own pid:' f$getjpi("0","pid")
>> Say Begin of external command
>> dir '*.cxx'
>> Say end of external command
>> Return 0
>> $ mcr []rexx [.demo]testvms.rexx
>>
>> Name of the my current disk: DISK2
>> My own pid: 0000043E
>> BEGIN OF EXTERNAL COMMAND
>> %DIRECT-W-NOFILES, no files found
>> END OF EXTERNAL COMMAND
>>
> 
> If you want a more detailed test, Rosetta Code has a bunch of REXX
> examples.

There are also more examples in the regina kit.

But I can't necessarily tell whether they work
or not and if they don't work whether it is a general
regina problem or a VMS regina problem.

This looks like it works:

$ typ        [.demo]block.rexx
#!/usr/bin/env regina
                 /* This program is block structured ! */
         /* Author unknown - ported to REXX from ND Fortran by */
             /* Anders Christensen -- anders at solan.unit.no */

    signal=(interpret=value);value=(interpret<parse);do upper=value to value
    end;exit=upper*upper*upper*upper-value-upper;say=' ';return=say say say;
    with.=signal;;do then=value to exit;pull='';do otherwise=upper to then-,
    value;select=otherwise-value;if.otherwise=with.otherwise+with.select;end
    if.value=value;if.then=value;;do otherwise=value to exit-then;pull=pull,
    say''say;;end;do otherwise=value to then;pull=pull center(if.otherwise,,
    length(return));end;say pull;do otherwise=value to exit;with.otherwise=,
    if.otherwise;end;end;exit

$ mcr []rexx [.demo]block.rexx
                                        1
                                     1     1
                                  1     2     1
                               1     3     3     1
                            1     4     6     4     1
                         1     5    10    10     5     1
                      1     6    15    20    15     6     1
                   1     7    21    35    35    21     7     1
                1     8    28    56    70    56    28     8     1
             1     9    36    84    126   126   84    36     9     1
          1    10    45    120   210   252   210   120   45    10     1
       1    11    55    165   330   462   462   330   165   55    11     1
    1    12    66    220   495   792   924   792   495   220   66    12 
     1

But I hope this code is not how REXX is intended to be written.

:-)

Arne




More information about the Info-vax mailing list