Consultor Eletrônico



Kbase 17268: Error 516 ( In Batch Process ) and PAGE-NUMBER
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Error 516 ( In Batch Process ) and PAGE-NUMBER


This error can be due to the PAGE-NUMBER used in the form statement.
ERROR 516 states :

** Attempt to write with no current output destination. (516)

Batch PROGRESS jobs, i.e., those run with the -b option, have no stdin
or stdout data streams. You must provide an output destination,
either with OUTPUT TO or OUTPUT THROUGH, before executing a statement
such as DISPLAY which would cause output to be written.

If the OUTPUT uses the STREAM option, then the PAGE-NUMBER must
have the STREAM as the parameter. Otherwise PROGRESS attempts to
write to the terminal which does not exist in the batch process.

e.g.
DEF STREAM strm-a.
OUTPUT STREAM strm-a to A-rpt.

FORM HEADER
TODAY " THIS IS A SAMPLE REPORT" "PAGE:" PAGE-NUMBER FORMAT ">9"
WITH PAGE-TOP FRAME f-hdr.

VIEW STREAM strm-a frame f-hdr.

When the above procedure is run from procedure editor, it will run
fine. If run in the batch process, it will give error 516.

The following will correct the error :
"PAGE:" PAGE-NUMBER(strm-a) FORMAT ">9".

Please note that it is not necessary to use STREAMS if the output
is only going to a single destination. In that case stream parameter
for page-numnber is not needed.
e.g.
OUTPUT TO A-rpt.
FORM
"PAGE:" PAGE-NUMBER FORMAT ">9".
will work just fine in the batch process.

REFERENCES :

Lang Ref : PAGE-NUMBER
KBASE : 15738 OUTPUT STREAM and PAGE-NUMBER

Progress Software Technical Support Note # 17268