> After commenting out the "SIGNAL ON NO VALUE" 

"SIGNAL ON NOVALUE" , Shirley.

> SPF/PC Rexx supports the standard Rexx language, 

Original, but certainly not standard.

> See below for the SPF/PC standard Rexx one.

DATE('B',foo,'S') is valid in standard Rexx. I don't believe that the first and 
third parameters are allowed to be longer than 1 character.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of CM 
Poncelet [ponce...@bcs.org.uk]
Sent: Saturday, April 25, 2020 7:10 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Friday OT, cheerful program for gloomy times

Have you checked that your version works, other than on a mainframe?

After commenting out the "SIGNAL ON NO VALUE" because it produces a
"LABEL NOT FOUND", I ran it and got:

bio2(50): Error #40, Incorrect call to routine
FACTOR1 = DATE( 'Base', YEAR || MONTH || DAY, 'Standard' )

PRESS ANY KEY TO CONTINUE.

SPF/PC Rexx supports the standard Rexx language, but not the full IBM
REXX (which includes EXECIO etc.) and it does not recognise your format
of DATE parms. See below for the SPF/PC standard Rexx one.

      DATE({option})

   Parameter

      option The format to use to return the date.  The options are:

             B  (Basedate) Returns the number of complete days (not
                including the current day) since and including the base
                date, January 1, 0001, in the format:  dddddd (no
                leading zeros).  The expression "DATE(B)//7" returns a
                number in the range 0-6, where 0 is Monday and 6 is
                Sunday.

                You can use this option to determine the day of the
                week independent of the national language in which you
                are working.

                Note: The origin of January 1, 0001 is based on the
                Gregorian calendar.  Though this calendar did not exist
                prior to 1582, Basedate is calculated as if it did:
                365 days per year, an extra day every four years except
                century years, and leap centuries if the century is
                divisible by 400.  It does not take into account any
                errors in the calendar system that created the Grego-
                rian calendar originally.

             C  (Century) Returns the number of days, including the
                current day, so far in this century in the format
                'ddddd' (no leading zeros or blanks).

             D  (Days) Returns the number of days, including the
                current day, so far in this year in the format 'ddd'
                (no leading zeros or blanks).

             E  (European) Returns the date in the format 'dd/mm/yy'.

             J  (Julian) Returns the date in the format 'yyddd', where
                'ddd' is the number of days so far in the year.

             L  (Language) Returns the date in the format
                'dd month yyy'.

             M  (Month) Returns the full name of the current month, in
                mixed case.

             N  (Normal) Explicitly returns the date in the default
                format 'dd mmm yyyy', as described above.

             O  (Ordered) Returns the date in the format 'yy/mm/dd'
                (suitable for sorting).

             S  (Standard) Returns date in the format 'yyyymmdd' (suit-
                able for sorting).  This is one of the three forms
                recommended in the International Standards Organization
                Recommendation ISO/R 2014-1971 (E).  The other two
                forms that document recommends can be derived from this
                form by separating the month from the year and day
                using either blanks or hyphens, for example:'1989 08
                27' or '1989-08-27'.

             U  (USA) Returns the date in the format 'mm/dd/yy'.

             W  (Weekday) Returns the day of the week, in mixed case.

Cheers.


On 25/04/2020 22:27, CM Poncelet wrote:
> Nice one. (BTW My version was not "optimised": it worked and that was
> enough.)
>
> Your NUMERIC DIGITS 8 *might* not be sufficient for your "finite
> difference equation to generate table of sines". I used the much slower
> Taylor series for calculating sines, for which NUMERIC DIGITS 100 worked
> "OK" - but without checking whether this could be reduced to 10 or 8.
>
> Cheers.
>
>
> On 25/04/2020 21:51, Paul Gilmartin wrote:
>> On 2020-04-25, at 08:38:08, Joel C. Ewing wrote:
>>> Always curious about compatibility issues, copied program and pasted
>>> into gedit on Fedora Linux, put a leading
>>> "#!/usr/bin/rexx"  and tried to run with oorexx on linux. Only code
>>> issues found:
>>> (1)Not really a code issue, but had to to run through dos2unix to
>>> convert Windows CR LF end-of-line to unix LF end of line or don't even
>>> get past the unix shebang 1st line -- can't find program "rexx" with CR
>>> appended to name.
>>> (2)Only special characters allowed in variable names in oorexx are !, ?,
>>> and _, so "#DAYS" is not a valid variable name and produced an error
>>> message about unexpected "#".  Find-replace-all "#DAYS" to "NR_DAYS"
>>>
>>> That's all it took to get it to run.
>>>
>> I did not copy-and-paste; I downloaded the attachment,
>> which appears to be UTF-8.
>>
>> For Regina, Regina.pdf says: 3.1.1.1 Negators
>>     ... Regina supports the following characters as negators:
>>     ...
>>     ¬ Logical Not
>> Copy-and-paste from the pdf gives me:
>>     931 $ printf ¬ | od -tx1
>>     0000000    c2  ac
>> ... the UTF-8 "¬".  But when I paste it into an EXEC, Regina says:
>>      say 2+2 ¬= 4
>> Error 13 running "/Users/paulgilm/bin/rxx", line 2: Invalid character
>> in program
>> Error 13.1: Invalid character in program "('c2'X)"
>>
>> I much prefer when the examples in the Ref. actually work.  Does
>> ooRexx accept UTF-8 "¬"?
>>
>> I went on and did something fancy.  Attached.
>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>>
>>
>> -- gil
>>
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
> .
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to