RE: COMO: Help on How to use COMO?

2004-02-17 Thread Stevenson, Charles
Amit,

You want error messages in the &COMO& but not on the screen, right?
Use DIVERT.OUT TTY.OFF/TTY.ON

DIVERT.OUT is the more general command.  In fast, the COMO verb is
actually a basic program that executes DIVERT.OUT (source in
$UVHOME/uv/BP/COMO_VERB).

Example:

>CT CDS.BP BHUTANI

 BHUTANI
0001   CRT 'CRT 1 to screen & como.'
0002   PRINT 'PRINT 1 to screen & como.'
0003   PERFORM 'DIVERT.OUT TTY.OFF'<-- what you want
0004  CRT 'CRT 2 only to como'
0005  PRINT 'PRINT 2 only to como'
0006   PERFORM 'DIVERT.OUT TTY.ON' <-- what you want
0007   CRT 'CRT 3 to both screen & como.'
0008   PRINT 'PRINT 3 to both screen & como.'
0009   STOPM 'Stopm to both screen & como.'


>COMO ON BHUTANI<- turn como on
COMO BHUTANI established 11:10:06 17 FEB 2004
>RUN CDS.BP BHUTANI
CRT 1 to screen & como.
PRINT 1 to screen & como.
CRT 3 to both screen & como.   <-- what you want
PRINT 3 to both screen & como.
Stopm to both screen & como.
>COMO OFF  <-- turn como off
COMO completed. 11:10:16 17 FEB 2004


>CT &COMO& BHUTANI

 BHUTANI
0001 COMO BHUTANI established 11:10:06 17 FEB 2004
0002 >RUN CDS.BP BHUTANI
0003 CRT 1 to screen & como.
0004 PRINT 1 to screen & como.
0005 CRT 2 only to como<-- what you want
0006 PRINT 2 only to como  <-- what you want
0007 CRT 3 to both screen & como.
0008 PRINT 3 to both screen & como.
0009 Stopm to both screen & como.
0010 >COMO OFF
0011 COMO completed. 11:10:16 17 FEB 2004
>


Another way more similar to the unix idea of redirecting stdout is to
use a different print channel directed to &HOLD& for some messages.
(PRINT ON n), but that file would contain ONLY the redirected messages.

Chuck Stevenson
--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users


RE: COMO: Help on How to use COMO?

2004-02-17 Thread Anthony Youngman
If you type

HELP COMO

at TCL, it'll tell you ...

Or I'll tell you :-) From within your program (or wherever) do an

EXECUTE "COMO ON PROGOUTPUT HUSH"

This will create a PROGOUTPUT record in the &COMO& file that you can
then access with the editor or whatever you want.

To turn off the como, just do

EXECUTE "COMO OFF"

Cheers,
Wol 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Amit Bhutani
Sent: 17 February 2004 13:07
To: U2 Users Discussion List
Subject: COMO: Help on How to use COMO?


I want to log all errors in a record of &COMO& without displaying them
on screen?
How should I intiallize como and how can I pass this error message to
that record,
E.g.

WRITEU D.FILE TO F.FILE,K.ID
LOCKED PRINT "ERROR:":K.ID:" record locked by user
":STATUS():", please stand-by"
ELSE PRINT "ERROR:Failed to write in ":FILE:" with
ID=":K.ID

I want to store this error message in a record of &COMO& file

regards
Amit Bhutani

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users




***

This transmission is intended for the named recipient only. It may contain private and 
confidential information. If this has come to you in error you must not act on 
anything disclosed in it, nor must you copy it, modify it, disseminate it in any way, 
or show it to anyone. Please e-mail the sender to inform us of the transmission error 
or telephone ECA International immediately and delete the e-mail from your information 
system.

Telephone numbers for ECA International offices are: Sydney +61 (0)2 9911 7799, Hong 
Kong + 852 2121 2388, London +44 (0)20 7351 5000 and New York +1 212 582 2333.

***

--
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users