Winnt and Rexx output Suppression 
Author Message
 Winnt and Rexx output Suppression

Hi All,
I'm having problems with the NT Resource Kit version of REXX and Objrect
REXX. When I'm running REXX scripts that deal with NT commands, 'DIR' or
'FIND' etc., I always get the execution line included in the output, if
there is an error. All I want to see is the error code and not the line
that has generated it, since I already know where the error is being
generated from by the display.

EG.
'FIND' '"''text_string_to_search_for'"' '/i'
'\\computer_name\c$\winnt35\system32\virus.log'

If the log file is not found, Rexx displays:

File not found - \\computername\c$\winnt35\system32\virus.log
        *-*  'FIND' '"''text_string_to_search_for'"' '/i'
'\\computer_name\c$\winnt35\system32\virus.log'
        +++ RC=1 +++

If anyone can help, I'd appreciate it.

        Rob



Mon, 30 Aug 1999 03:00:00 GMT  
 Winnt and Rexx output Suppression



Quote:
>I'm having problems with the NT Resource Kit version of REXX and Objrect
>REXX. When I'm running REXX scripts that deal with NT commands, 'DIR' or
>'FIND' etc., I always get the execution line included in the output, if



Hope this helps,

Ciao,

Rod Buchanan
KDS Internet Services
http://www.kdsi.net



Mon, 30 Aug 1999 03:00:00 GMT  
 Winnt and Rexx output Suppression

Quote:

> Hi All,
> I'm having problems with the NT Resource Kit version of REXX and Objrect
> REXX. When I'm running REXX scripts that deal with NT commands, 'DIR' or
> 'FIND' etc., I always get the execution line included in the output, if
> there is an error. All I want to see is the error code and not the line
> that has generated it, since I already know where the error is being
> generated from by the display.

> EG.
> 'FIND' '"''text_string_to_search_for'"' '/i'
> '\\computer_name\c$\winnt35\system32\virus.log'

> If the log file is not found, Rexx displays:

> File not found - \\computername\c$\winnt35\system32\virus.log
>         *-*  'FIND' '"''text_string_to_search_for'"' '/i'
> '\\computer_name\c$\winnt35\system32\virus.log'
>         +++ RC=1 +++

> If anyone can help, I'd appreciate it.

>         Rob

This stuff is from Rexx's Tracing facility:
         *-*  'FIND' '"''text_string_to_search_for'"' '/i'
 '\\computer_name\c$\winnt35\system32\virus.log'
         +++ RC=1 +++

Specifically, you have TRACE Errors in effect.
If you wish to suppress tracing commands that produce non-zero return
codes, use the following statement in the Rexx program:

TRACE Off
  or
TRACE Normal

Off suppresses all tracing. Normal (AKA Negative) traces commands that

of the command by the operating system (a feature borrowed from DOS by
all of it's decendants).

So...

/**/

exit

...may produce the following. (Example from OS/2)

SYS1041: The name specified is not recognized as an
internal or external command, operable program or batch file.

       +++     RC(1041)
QWERTY.JNK
SYS0002: The system cannot find the file specified.
        0 file(s) copied.

To complete the picture, you may want to redirect standard output and
standard error to NUL to prevent the operating system's messages from
being displayed.

/**/

exit

may produce the following.


       +++     RC(1041)

Of course, this means that you will have to test the value of rc and
issue your own error messages, if required.

--
                    Greetings . . . Steven R Meyer


2575 Sand Hill Road                DecNet:      45537::SMEYER
Menlo Park - CA - 94025            U. S. Snail: Mail Stop 17
Voice: 415-926-4332                Fax:         415-926-3882
World Waidh Web                    http://www.slac.stanford.edu/~smeyer
4D5320537578



Mon, 30 Aug 1999 03:00:00 GMT  
 Winnt and Rexx output Suppression


Quote:

>Hi All,
>I'm having problems with the NT Resource Kit version of REXX and Objrect
>REXX. When I'm running REXX scripts that deal with NT commands, 'DIR' or
>'FIND' etc., I always get the execution line included in the output, if
>there is an error. All I want to see is the error code and not the line
>that has generated it, since I already know where the error is being
>generated from by the display.

>EG.
>'FIND' '"''text_string_to_search_for'"' '/i'
>'\\computer_name\c$\winnt35\system32\virus.log'

>If the log file is not found, Rexx displays:

>File not found - \\computername\c$\winnt35\system32\virus.log
>    *-*  'FIND' '"''text_string_to_search_for'"' '/i'
>'\\computer_name\c$\winnt35\system32\virus.log'
>    +++ RC=1 +++

>If anyone can help, I'd appreciate it.

>    Rob

For our purposes the REXX that came with NT was no good and one of the
areas was the lack of 'Sys' functions that were in OS/2 REXX.  Object
Rexx does retain these functions.  I would suggest
SysSearchPath to specifically find files and SysFileSearch to find
strings within files.  This allows you to code a variable to receive the
result of the find/not find.  If you need to do anything else you at least
know the file exists, or has such a string in it.
All the 'Sys' functions are documented with examples in the on-line help
of Object Rexx.
Having said all that -- if this is typical of the things you'll be doing
you should give very serious consideration to WinREXX from Enterprise
Alternatives.  We are converting from OS/2 to NT and have yet to find a
missing feature, which we can not say for the SDK REXX or Object REXX.

help



Mon, 30 Aug 1999 03:00:00 GMT  
 Winnt and Rexx output Suppression

Quote:

>I'm having problems with the NT Resource Kit version of REXX and Objrect
>REXX. When I'm running REXX scripts that deal with NT commands, 'DIR' or
>'FIND' etc., I always get the execution line included in the output, if
>there is an error.

[snip]

Quote:
>If the log file is not found, Rexx displays:
>File not found - \\computername\c$\winnt35\system32\virus.log
>    *-*  'FIND' '"''text_string_to_search_for'"' '/i'
>'\\computer_name\c$\winnt35\system32\virus.log'
>    +++ RC=1 +++

In (standard) Rexx, the default TRACE setting is 'N', which is the same
as 'F' and it means 'trace failures'.  A 'failure' is a bit difficult
to define on an operating system such as DOS or UNIX, so I believe the
convention is that all commands exiting with code 1 are classed as failures
and will be traced, as in the above example.

Starting the program with "trace o" to turn tracing off should stop the
messages.
--

------ http://www.comlab.ox.ac.uk/oucl/users/ian.collier/imc.html

New to this group?  Answers to frequently-asked questions can be had from
http://rexx.hursley.ibm.com/rexx/ .



Tue, 31 Aug 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ??? Redirecting output to an MLE (VX-REXX or VisPro REXX)

2. porting an REXX OS/2 Application to WinNT

3. on porting a OS/2 REXX application til WinNt

4. Regina Rexx on WinNT - Problem with redirection..

5. REXX For Sun Solaris/WinNT

6. Object Rexx, WinNT and email

7. Best Rexx for WinNT/95 ?

8. Best Rexx for WinNT/95 ?

9. Sorting a Textfile Object REXX WinNT/95

10. Object Rexx on WinNT Alpha?

11. ODBC API for Rexx under WinNT

12. Change Directory command in REXX for WinNT not working

 

 
Powered by phpBB® Forum Software