s390guy / vm370

35 stars 10 forks source link

REXX: SIGNAL ON FAILURE isn't working (Not recognized). #88

Open BertramMoshier opened 1 year ago

BertramMoshier commented 1 year ago

My REXX program template (which I just uploaded) does:

/------------------------\ | Enable trap processing | *------------------------*/ SIGNAL ON ERROR SIGNAL ON FAILURE SIGNAL ON HALT SIGNAL ON NOVALUE SIGNAL ON SYNTAX

I found REXX on VM/CE isn't supporting SIGNAL ON FAILURE

When REXX hits the statement SIGNAL ON FAILURE the following appears as the error:

template exec
29 - SIGNAL ON FAILURE
Error 25.3 running template, line 29: SIGNAL ON must be followed by one of the keywords ERROR, HALT, NOVALUE, NOTREADY or SYNTAX; found "FAILURE"
Ready(20025); T=0.16/0.20 11:17:41

BobBolch commented 1 year ago

SIGNAL ON FAILURE was added to REXX in VM/SP Release 6, after REXX had been available on VM for about 5 years. It was never implemented in BREXX. This feature will be added to VMCE. FAILURE will be signaled when executing a CMS command (including the CMS CP command) produces a negative return code.

BobBolch commented 1 year ago

It looks like SIGNAL ON ERROR doesn't work correctly either. It is not being signaled when a CMS command gets a non-zero RC.

======================== / /
ADDRESS ''

SIGNAL ON ERROR

'ACCESS 333 Z'
EXIT RC

ERROR: SAY 'ERROR SIGNALLED'

Currently returns: test2
DMSACC113S 'Z (333) ' NOT ATTACHED Ready(00100); T=0.02/0.02 10:03:18

Should return: test2
DMSACC113S 'Z (333) ' NOT ATTACHED
6 - 'ACCESS 333 Z'
+++ RC(100) +++
ERROR signalled
Ready(00016); T=0.02/0.02 10:03:05

BobBolch commented 1 year ago

Down load a test fix from https://www.dropbox.com/s/xrbt2nlcv2958aj/brexxfix.aws?dl=0

This is an aws tape made with a TAPE DUMP BREXX TEXT command. Retrieve the test aws file, and use TAPE LOAD to create a BREXX TEXT file. IPL CMS, so that the new BREXX TEXT file will be loaded, then test with a SIGNAL ON FAULRE sequence.

RossPatterson commented 3 months ago

I don't know how Bob Bolch intended to fix this, and his Dropbox link is now dead, but I've written a fix of my own and sent a pull request to the main source tree.

BertramMoshier commented 2 months ago

Thank you for the fix. As a Rexx programmer, I appeciate having VMCE Rexx (BRexx) woking properly.

Bertram Moshier WB8ERT

On Fri, Jun 7, 2024, 03:49 Ross Patterson @.***> wrote:

I don't know how Bob Bolch intended to fix this, and his Dropbox link is now dead, but I've written a fix of my own https://github.com/RossPatterson/CMS-370-BREXX/tree/feat-failure and sent a pull request to the main source tree https://github.com/adesutherland/CMS-370-BREXX/pull/76.

— Reply to this email directly, view it on GitHub https://github.com/s390guy/vm370/issues/88#issuecomment-2154386236, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5BYKGMV2HLQJJBM2EH4T2LZGFX27AVCNFSM6AAAAABI6HXS76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGM4DMMRTGY . You are receiving this because you authored the thread.Message ID: @.***>