S
Screwtape
Guest
I have a persistent procedure, in which I am trying to open, write and close a stream.
I have in the main area of the procedure
DEFINE STREAM sOutFile.
OPEN STREAM sOutFile TO VALUE( outFileName ).
MESSAGE SEEK( sOutFile ).
and subsequently a function within the persistent procedure
FUNCTION example RETURN LOGICAL:
MESSAGE SEEK( sOutFile ).
PUT STREAM sOutFile UNFORMATTED someData.
END.
When the persistent procedure is instantiated, the message displays "0" so the stream has been opened. However, when example is called, the message displays "?" and I get a message about attempting to write to a closed stream.
I've tried declaring the stream NEW SHARED but that didn't make any difference.
Am I doing something wrong, or is it impossible to define streams within persistent procedures?
Continue reading...
I have in the main area of the procedure
DEFINE STREAM sOutFile.
OPEN STREAM sOutFile TO VALUE( outFileName ).
MESSAGE SEEK( sOutFile ).
and subsequently a function within the persistent procedure
FUNCTION example RETURN LOGICAL:
MESSAGE SEEK( sOutFile ).
PUT STREAM sOutFile UNFORMATTED someData.
END.
When the persistent procedure is instantiated, the message displays "0" so the stream has been opened. However, when example is called, the message displays "?" and I get a message about attempting to write to a closed stream.
I've tried declaring the stream NEW SHARED but that didn't make any difference.
Am I doing something wrong, or is it impossible to define streams within persistent procedures?
Continue reading...