Consultor Eletrônico



Kbase 18414: 4GL: How To Test If An Output Stream Is Open or Closed
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   04/03/2010
Status: Verified

GOAL:

How to test if an output stream is open or closed?

GOAL:

Testing if an output stream is open

GOAL:

Testing if an output stream is closed

GOAL:

How to test if an output stream is open?

GOAL:

How to test if an output stream is closed?

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

To determine whether an output stream is closed, use the SEEK function. SEEK() returns ? when the stream is closed.

/* closed.p */
DEFINE STREAM test.

OUTPUT STREAM test TO junk.out.
OUTPUT STREAM test CLOSE.

IF SEEK(test) = ? THEN
MESSAGE "Stream is closed" VIEW-AS ALERT-BOX.