Guardian Application Conversion Guide
Using Sequential I/O (SIO) Procedures
Converting Other Parts of an Application
096047 Tandem Computers Incorporated 8–19
Allocating FCBs Using
Declarations
Your existing program might allocate the common FCB and $RECEIVE FCB using the
FCBSIZE LITERAL declaration (60 words). This example shows the allocation of the
common FCB, $RECEIVE FCB, and a file FCB for an input file:
INT .common^fcb [ 0:FCBSIZE - 1 ], ! Common FCB.
.receive^file [ 0:FCBSIZE - 1 ], ! $RECEIVE FCB.
.input^file [ 0:FCBSIZE - 1 ]; ! File FCB.
Convert your program to allocate the common FCB and $RECEIVE FCB using the
FCBSIZE^D00 LITERAL (80 words):
INT .common^fcb [ 0:FCBSIZE^D00 - 1 ], ! Common FCB.
.receive^file [ 0:FCBSIZE^D00 - 1 ], ! $RECEIVE FCB.
.input^file [ 0:FCBSIZE - 1 ]; ! File FCB.
Initializing the Common
FCB Using SET^FILE
Your existing program might initialize the common FCB as shown in the following
example:
common^fcb := 0;
To initialize a D-series common FCB, you need to convert your program to use the
INIT^FILEFCB^D00 parameter in the SET^FILE procedure call as follows:
error := SET^FILE (common^fcb, INIT^FILEFCB^D00);
Also, make sure that you allocate the common FCB using the FCBSIZE^D00 LITERAL
(80 words) as shown above under “Allocating FCBs Using Declarations.”
Initializing a New FCB
Using SET^FILE
Your existing program might initialize a new FCB using the SET^FILE procedure and
the INIT^FILEFCB parameter. In this example, SET^FILE initializes a new FCB for
$RECEIVE:
error := SET^FILE (receive^file, INIT^FILEFCB);
Convert your program to use the INIT^FILEFCB^D00 parameter:
error := SET^FILE (receive^file, INIT^FILEFCB^D00);