_saywarn.utl Utility- Display All Buffered Error Messages

Syntax

call "_saywarn.utl"{,flush,warning_file$,message$,prompt$,control_value,
helpfile$,helpitem$input_attribute$,timeout,return_val$}

Description

The _saywarn.utl utility can be used in three different ways. The statement format below flushes buffered messages to a file:

call "_saywarn.utl"{,flush,warning_file}

The next statement format displays an immediate message without the buffering process.

call "_saywarn.utl"{,flush,warning_file,message}

The full statement, as shown in the syntax statement, displays either buffered messages (MESSAGE$="") or a direct message (WARNFILE$="") in an interactive process. The user could not enter data but could use a function key to signal some control value that the application would respond to.

The optional parameters must be entered in the sequence listed below and may not be skipped; for example, MESSAGE$ must be proceeded by FLUSH and WARNING_FILE$, even if they are not applicable. Enter null values for strings and 0s for numerics to use system defaults. The parameter string may be truncated at any point. In this case, system defaults will be used for parameters beyond the truncation point.

Parameter

Description

flush

If set to 1, flush the _saywarn buffer rather than displaying it.

warning_file$

Message tracking file. If this parameter is set, _saywarn.utl writes the message buffer to this file rather than displaying it to the screen.

message$

Immediate Message String. If this parameter string is set, it causes _saywarn.utl to display in immediate mode. This ignores the buffer and displays the passed message. Backslash characters "\" are interpreted as linefeeds.

If immediate mode is used, the following values can also be set for use by the input routine, _ninput.utl:

Parameter

Description

prompt$

Prompt string to display at the bottom of the screen.

control_value

Passed back with the Input Subsystem value of the keystroke pressed.

helpfile$

Help information filename.

helpitem$

Help item if using _help.pub format.

input_attribute$

Input attributes (any PRO/5 attribute mnemonics).

timeout

Specified in integer seconds, 1 to 255, or 0 for no timeout.

return_val$

Just pass the warning buffer back to this string.

Examples

The following shows how to immediately process a warning by passing the message string directly to _saywarn.utl.

LET BBEXT$=STBL("BBEXT")
LET MESSAGE$="Unexpected error: "+STR(ERR)+"\at line"+
 STR(TCB(5))+" in module "+PGM(-2)
CALL BBEXT$+"_saywarn.utl,0,$$,MESSAGE$,"Press
 any key to continue.",0,STBL("HELPFILE"),
 "ddmc","'BB'",30

This displays the following message:

Unexpected error: 0
at line 2120 in module GLMAIN

The message will blink with the prompt message "Press any key to continue." on the last line of the screen. Help will be available if the <HELP> key is pressed. The message will timeout after 30 seconds.

The following is similar to the first example, except that it displays the buffered warnings in the errorlog file instead of the immediate message:

LET BBEXT$=STBL("BBEXT")
LET MESSAGE$="Unexpected error: "+STR(ERR)+"\at line"+
 STR(TCB(5))+" in module "+PGM(-2)
CALL BBEXT$+"_warn.utl",message$
CALL BBEXT$+"_saywarn.utl",0,"errorlog"

See Also

Alphabetical EUS Utilities

Functional Listing of EUS Utilities

_acu.utl

_lwarn.utl

_warn.utl

_rmmsg.utl

_unerr.utl