Discussion:
How to suppress error-message?
(too old to reply)
Rolf Drees
2018-03-09 09:16:20 UTC
Permalink
Dear list,

I want to suppress a REXX-error-message. Following message comes up in my
REXX, running in batch under control if IKJEFT1A in file SYSTSPRT:

19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow


I want to suppress the first two lines. I did several tries with TRAPMSG,
OUTTRAP and MSG, but nothing worked.
Here is the code that produces the message:

/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')

Is there any way to get control over the RC(-3) message?

Kind regards and thanks in advance
Rolf

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Binyamin Dissen
2018-03-09 12:06:34 UTC
Permalink
Wouldn't TRACE OFF do the job?

On Fri, 9 Mar 2018 10:16:28 +0100 Rolf Drees <***@FIDUCIAGAD.DE> wrote:

:>I want to suppress a REXX-error-message. Following message comes up in my
:>REXX, running in batch under control if IKJEFT1A in file SYSTSPRT:
:>
:> 19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
:> +++ RC(-3) +++
:>Load DSNREXX into JPA not sucessful, SQL-processing will be slow

:>I want to suppress the first two lines. I did several tries with TRAPMSG,
:>OUTTRAP and MSG, but nothing worked.
:>Here is the code that produces the message:

:>/* add db2-support to rexx */
:>address tso 'prof nowtpmsg nointercom'
:>x = trapmsg('ON')
:>x = outtrap('dummy.')
:>x = msg('OFF')
:>address link 'dsloadxx' /* load DSNREXX into JPA */
:>if rc <> 0 then say,
:> 'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
:>x = msg('ON')
:>x = outtrap('OFF')
:>x = trapmsg('OFF')

:>Is there any way to get control over the RC(-3) message?

--
Binyamin Dissen <***@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Rolf Drees
2018-03-09 12:50:42 UTC
Permalink
Hello Binyamin,

you're right, with TRACE OFF there is no message anymore!
I have no trace-option in the REXX, so I thought that tracing was turned
off. But default-setting for TRACE is NORMAL, not OFF!

Thank you very much
Rolf




Von: Binyamin Dissen <***@DISSENSOFTWARE.COM>
An: TSO-***@VM.MARIST.EDU
Datum: 09.03.2018 13:09
Betreff: Re: [TSO-REXX] How to suppress error-message?
Gesendet von: TSO REXX Discussion List <TSO-***@VM.MARIST.EDU>



Wouldn't TRACE OFF do the job?

On Fri, 9 Mar 2018 10:16:28 +0100 Rolf Drees <***@FIDUCIAGAD.DE>
wrote:

:>I want to suppress a REXX-error-message. Following message comes up in
my
:>REXX, running in batch under control if IKJEFT1A in file SYSTSPRT:
:>
:> 19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
:> +++ RC(-3) +++
:>Load DSNREXX into JPA not sucessful, SQL-processing will be slow

:>I want to suppress the first two lines. I did several tries with
TRAPMSG,
:>OUTTRAP and MSG, but nothing worked.
:>Here is the code that produces the message:

:>/* add db2-support to rexx */
:>address tso 'prof nowtpmsg nointercom'
:>x = trapmsg('ON')
:>x = outtrap('dummy.')
:>x = msg('OFF')
:>address link 'dsloadxx' /* load DSNREXX into JPA */
:>if rc <> 0 then say,
:> 'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
:>x = msg('ON')
:>x = outtrap('OFF')
:>x = trapmsg('OFF')

:>Is there any way to get control over the RC(-3) message?

--
Binyamin Dissen <***@dissensoftware.com>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Hobart Spitz
2018-03-09 13:47:36 UTC
Permalink
In *general*, TRACE OFF is a really, really bad idea. I can't tell you how
many times I've found latent bugs (in other people's code) by removing
TRACE OFF. Never, ever use it globally. The default is NORMAL for a
reason.

So there are two things you can do:

- Issue TRACE NORMAL (e.g.) after the command in question.
- Let REXX do it. Most people don't know that things are saved
(address, trace, and more) across CALL/function() invocation. You could
use a routine like this:

Quiet:
arg Cmd, HCE
trace off
if HCE <> "" then
address value HCE
(arg(1))
return RC

which you invoke thusly:

...
call Quiet 'dsloadxx', 'link' /* load DSNREXX into JPA */
...

As extra benefits, you don't change trace or address in the caller, and
you can use a function call:
...
if Quiet('dsloadxx', 'link') < 0 then do
say "HEY!!! DSLOADXX didn't work."
exit -90
end
...

I haven't tested the code; I don't have access to z/OS currently.

OREXXMan
JCL is the buggy whip of 21st century computing.
We want TSO Pipes NOW!
Post by Rolf Drees
Hello Binyamin,
you're right, with TRACE OFF there is no message anymore!
I have no trace-option in the REXX, so I thought that tracing was turned
off. But default-setting for TRACE is NORMAL, not OFF!
Thank you very much
Rolf
Datum: 09.03.2018 13:09
Betreff: Re: [TSO-REXX] How to suppress error-message?
Wouldn't TRACE OFF do the job?
:>I want to suppress a REXX-error-message. Following message comes up in my
:>
:> 19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
:> +++ RC(-3) +++
:>Load DSNREXX into JPA not sucessful, SQL-processing will be slow
:>I want to suppress the first two lines. I did several tries with TRAPMSG,
:>OUTTRAP and MSG, but nothing worked.
:>/* add db2-support to rexx */
:>address tso 'prof nowtpmsg nointercom'
:>x = trapmsg('ON')
:>x = outtrap('dummy.')
:>x = msg('OFF')
:>address link 'dsloadxx' /* load DSNREXX into JPA */
:>if rc <> 0 then say,
:> 'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
:>x = msg('ON')
:>x = outtrap('OFF')
:>x = trapmsg('OFF')
:>Is there any way to get control over the RC(-3) message?
--
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jim Ruddy
2018-03-09 16:24:15 UTC
Permalink
Hi Rolf,

Seeing the need for DSLOADXX surprised me - when I searched for it I found
an IDUG discussion from last October and found that I had been referenced
in the discussion. I left IBM 3 years ago and had not "owned" ( been
responsible) the DSNREXX code for several years before that but I would
like to understand your environment and the need for DSLOADXX. Are you
using the RXSUBCOM command supplied with DSNREXX? Unless someone has
removed the change I made many years ago, it is supposed to work exactly
like DSLOADXX and leave the DSNREXX code resident.

Regards,
Jim Ruddy
Post by Rolf Drees
Dear list,
I want to suppress a REXX-error-message. Following message comes up in my
19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow
I want to suppress the first two lines. I did several tries with TRAPMSG,
OUTTRAP and MSG, but nothing worked.
/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')
Is there any way to get control over the RC(-3) message?
Kind regards and thanks in advance
Rolf
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Rolf Drees
2018-03-12 10:31:00 UTC
Permalink
Hello Jim,

you found my discussion/question in the IDUG-forum last october. The hint
with the DSLOADXX was a great performance-boost, especially when fetching
thousands of rows.
I'm using the DSNREXX-Module that comes with DB2 in the SDSNLOAD-library,
no vendor-tool. The environment is simple batch under control of IKJEFT1A.
Usually we are using the current versions, I can't imagine that this is an
old module. But I will check this.

Kind regards
Rolf




Von: Jim Ruddy <***@GMAIL.COM>
An: TSO-***@VM.MARIST.EDU
Datum: 09.03.2018 17:27
Betreff: Re: [TSO-REXX] How to suppress error-message?
Gesendet von: TSO REXX Discussion List <TSO-***@VM.MARIST.EDU>



Hi Rolf,

Seeing the need for DSLOADXX surprised me - when I searched for it I found
an IDUG discussion from last October and found that I had been referenced
in the discussion. I left IBM 3 years ago and had not "owned" ( been
responsible) the DSNREXX code for several years before that but I would
like to understand your environment and the need for DSLOADXX. Are you
using the RXSUBCOM command supplied with DSNREXX? Unless someone has
removed the change I made many years ago, it is supposed to work exactly
like DSLOADXX and leave the DSNREXX code resident.

Regards,
Jim Ruddy
Post by Rolf Drees
Dear list,
I want to suppress a REXX-error-message. Following message comes up in my
19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow
I want to suppress the first two lines. I did several tries with TRAPMSG,
OUTTRAP and MSG, but nothing worked.
/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')
Is there any way to get control over the RC(-3) message?
Kind regards and thanks in advance
Rolf
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Jim Ruddy
2018-03-12 14:42:02 UTC
Permalink
Hi Rolf,

The date of your RXSUBCOM should be newer than 2001-03-30 - the GA date of
DB2 Version 7. The GA date of DB2 Version 8 was 2004-03-26 but no telling
when the build day would be - likely sometime in 2004 but possibly sometime
late in 2003. It could be there is an old version lurking in SYS1.LINKLIB.

If you are running with a current version of RXSUBCOM and DSNREXX I suggest
you open a performance PMR. A fair amount of effort was spent to improve
DSNREXX performance over the years so I am perplexed at the behavior you
saw.

Jim
Post by Rolf Drees
Hello Jim,
you found my discussion/question in the IDUG-forum last october. The hint
with the DSLOADXX was a great performance-boost, especially when fetching
thousands of rows.
I'm using the DSNREXX-Module that comes with DB2 in the SDSNLOAD-library,
no vendor-tool. The environment is simple batch under control of IKJEFT1A.
Usually we are using the current versions, I can't imagine that this is an
old module. But I will check this.
Kind regards
Rolf
Datum: 09.03.2018 17:27
Betreff: Re: [TSO-REXX] How to suppress error-message?
Hi Rolf,
Seeing the need for DSLOADXX surprised me - when I searched for it I found
an IDUG discussion from last October and found that I had been referenced
in the discussion. I left IBM 3 years ago and had not "owned" ( been
responsible) the DSNREXX code for several years before that but I would
like to understand your environment and the need for DSLOADXX. Are you
using the RXSUBCOM command supplied with DSNREXX? Unless someone has
removed the change I made many years ago, it is supposed to work exactly
like DSLOADXX and leave the DSNREXX code resident.
Regards,
Jim Ruddy
Post by Rolf Drees
Dear list,
I want to suppress a REXX-error-message. Following message comes up in
my
Post by Rolf Drees
19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow
I want to suppress the first two lines. I did several tries with
TRAPMSG,
Post by Rolf Drees
OUTTRAP and MSG, but nothing worked.
/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')
Is there any way to get control over the RC(-3) message?
Kind regards and thanks in advance
Rolf
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Rolf Drees
2018-03-13 10:37:36 UTC
Permalink
Hello Jim,

I did following checks:

- RXSUBCOM is an alias for DSNREXX
- the package-version is UI36078 (taken from a running REXX)
- Package DSNREXX(UI36078) has a precompile-timestamp 10/03/2016 19:43:07
(european date)

So it seems that your change got lost with time. I found a comment from
you from January 2006 in the IDUG-forum, where you describe the
improvement:
https://www.idug.org/p/fo/et/thread=22119

So I will open a performance-PMR.

Thanks for your comment. It's good that there are people who have a better
memory than me.

Kind regards
Rolf



Von: Jim Ruddy <***@GMAIL.COM>
An: TSO-***@VM.MARIST.EDU
Datum: 12.03.2018 15:44
Betreff: Re: [TSO-REXX] Antwort: Re: [TSO-REXX] How to suppress
error-message?
Gesendet von: TSO REXX Discussion List <TSO-***@VM.MARIST.EDU>



Hi Rolf,

The date of your RXSUBCOM should be newer than 2001-03-30 - the GA date of
DB2 Version 7. The GA date of DB2 Version 8 was 2004-03-26 but no telling
when the build day would be - likely sometime in 2004 but possibly
sometime
late in 2003. It could be there is an old version lurking in SYS1.LINKLIB.

If you are running with a current version of RXSUBCOM and DSNREXX I
suggest
you open a performance PMR. A fair amount of effort was spent to improve
DSNREXX performance over the years so I am perplexed at the behavior you
saw.

Jim
Post by Rolf Drees
Hello Jim,
you found my discussion/question in the IDUG-forum last october. The hint
with the DSLOADXX was a great performance-boost, especially when fetching
thousands of rows.
I'm using the DSNREXX-Module that comes with DB2 in the
SDSNLOAD-library,
Post by Rolf Drees
no vendor-tool. The environment is simple batch under control of IKJEFT1A.
Usually we are using the current versions, I can't imagine that this is an
old module. But I will check this.
Kind regards
Rolf
Datum: 09.03.2018 17:27
Betreff: Re: [TSO-REXX] How to suppress error-message?
Hi Rolf,
Seeing the need for DSLOADXX surprised me - when I searched for it I found
an IDUG discussion from last October and found that I had been
referenced
Post by Rolf Drees
in the discussion. I left IBM 3 years ago and had not "owned" ( been
responsible) the DSNREXX code for several years before that but I would
like to understand your environment and the need for DSLOADXX. Are you
using the RXSUBCOM command supplied with DSNREXX? Unless someone has
removed the change I made many years ago, it is supposed to work exactly
like DSLOADXX and leave the DSNREXX code resident.
Regards,
Jim Ruddy
Post by Rolf Drees
Dear list,
I want to suppress a REXX-error-message. Following message comes up in
my
Post by Rolf Drees
19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow
I want to suppress the first two lines. I did several tries with
TRAPMSG,
Post by Rolf Drees
OUTTRAP and MSG, but nothing worked.
/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')
Is there any way to get control over the RC(-3) message?
Kind regards and thanks in advance
Rolf
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX



----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to ***@VM.MARIST.EDU with the message: INFO TSO-REXX
Aviatrexx
2018-03-09 23:36:57 UTC
Permalink
Indeed, the default TRACE option is 'N' (which can stand for "Normal" or "Negative"). That way, the program will not terminate on ordinary non-negative return codes, but will stop on something serious. It's a reasonable distinction and language design choice.

But I must respectfully disagree with my friend Hobart regarding an absolute prohibition against 'TRACE OFF'. It does exactly what it says: no return code from an issued command will be displayed, and execution will continue. This is not a problem if the programmer is assiduous in _checking_ the value of RC after issuing a command. LAZY programmers should never use TRACE OFF.

Because testing RC after every command can be a tedious, code-bloating exercise, Rexx also provides the SIGNAL ON and CALL ON error traps, which allow the programmer to write a small routine that will be invoked to handle such conditions. This feature can even intercept conditions that would abend the interpreter (which no TRACE option can handle) potentially allowing the program to "fix itself" and continue.

My students are taught to use the following:

/* Deal With It Yourself */
Trace Off
Address Command
Signal On Syntax /* Bad Program */
Signal On NoValue /* Bad Programmer */
Call On Error /* Positive RC from command */
Call On Failure /* Negative RC from command */
Call On Halt /* Manual Interruption */
:
Exit dwiyrc
Syntax:
:
Exit src
NoValue:
:
Exit nrc
Error:
:
Return erc
Failure:
:
Return frc
Halt:
:
Return hrc

TRACE OFF can indeed be dangerous, in the same way that taking the batteries out of your smoke detector can be. But Rexx allows you to intercept, analyze, and deal with any threat your program may encounter. Including your own poorly-written code. ;-)

-Chip-
Post by Rolf Drees
Dear list,
I want to suppress a REXX-error-message. Following message comes up in my
19 *-* address link 'dsloadxx' /* load DSNREXX into JPA */
+++ RC(-3) +++
Load DSNREXX into JPA not sucessful, SQL-processing will be slow
I want to suppress the first two lines. I did several tries with TRAPMSG,
OUTTRAP and MSG, but nothing worked.
/* add db2-support to rexx */
address tso 'prof nowtpmsg nointercom'
x = trapmsg('ON')
x = outtrap('dummy.')
x = msg('OFF')
address link 'dsloadxx' /* load DSNREXX into JPA */
if rc <> 0 then say,
'Load DSNREXX into JPA not sucessful, SQL-processing will be slow'
x = msg('ON')
x = outtrap('OFF')
x = trapmsg('OFF')
Is there any way to get control over the RC(-3) message?
Loading...