Guardian Application Conversion Guide

Using Sequential I/O (SIO) Procedures
Converting Other Parts of an Application
8–22 096047 Tandem Computers Incorporated
Opening $RECEIVE to Read
System Messages
Your existing program might open $RECEIVE using the OPEN^FILE procedure to
read system messages:
error := OPEN^FILE (common^fcb,
receive^file,
! block^buffer ! ,
! block^buffer^size ! ,
NOWAIT, ! flags
nowait^io^mask); ! flags^mask
The OPEN^FILE
flags
parameter defines a list of LITERAL declarations that can be
used with the
flags^mask
parameter to set file-transfer characteristics. A new
LITERAL declaration named OLD^RECEIVE is defined for the
flags
.<0> bit.
OLD^RECEIVE applies only to $RECEIVE and is ignored for all other files. The
values for OLD^RECEIVE are:
0 (the default) A program reads D-series system messages from $RECEIVE.
1 A program reads C-series system messages from $RECEIVE.
Therefore, if the
flags
.<0> bit is zero in your OPEN^FILE procedure call, no changes
are necessary to read D-series system messages provided you have declared and
initialized the common FCB and $RECEIVE FCB using the D-series declarations.
If you declare and initialize the common FCB and $RECEIVE FCB using C-series
declarations, then the system sends C-series system messages to $RECEIVE regardless
of the setting of the
flags
.<0> bit.
If you use a C-series common FCB and a D-series FCB for $RECEIVE, the system
returns the SIOERR^OLDCOMMFCB (536) error when you open $RECEIVE.
To read C-series messages after you have declared and initialized the $RECEIVE FCB
using D-series declarations, open $RECEIVE using the OLD^RECEIVE LITERAL:
error := OPEN^FILE (common^fcb,
receive^file,
! block^buffer ! ,
! block^buffer^size ! ,
OLD^RECEIVE,
old^msg^mask);