![]() |
|
![]() |
PROCEDURE LoadControlFromBlock
(CONST messageType : DisplayW.DisplayMessageType;
CONST messageData : SYSTEM.ADDRESS;
CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
LoadControlFromBlock - Load control with data from a block field.
This procedure loads the data from a block field to a control on
a dialog.
CALLING SEQUENCE -
LoadControlFromBlock (messageType, messageData, Relation,
Field, Success)
ENTRY -
messageType : DisplayW.DisplayMessageType
A parameter passed into the action proc, send into this routine.
messageData : SYSTEM.ADDRESS
A parameter passed into the action proc, send into this routine.
Relation : ARRAY OF CHAR
Relation of the block field.
Field : ARRAY OF CHAR
The name of the block data field.
EXIT -
Success : BOOLEAN
True - No problems encountered, data loaded to control.
False - Problem encountered, data not loaded.
*)
PROCEDURE UnloadControlToBlock
(CONST messageType : DisplayW.DisplayMessageType;
CONST messageData : SYSTEM.ADDRESS;
CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
UnloadControlToBlock - Transfer data from control to block field.
This procedure transfers the current contents of a control to
a block data field.
CALLING SEQUENCE -
UnloadControlToBlock (messageType, messageData, Relation,
Field, Success)
ENTRY -
messageType : DisplayW.DisplayMessageType
A parameter passed into the action proc, send into this routine.
messageData : SYSTEM.ADDRESS
A parameter passed into the action proc, send into this routine.
Relation : ARRAY OF CHAR
Relation of the block field.
Field : ARRAY OF CHAR
The name of the block data field.
EXIT -
Success : BOOLEAN
True - No problems encountered, data loaded to block field.
False - Problem encountered, data not loaded.
*)
PROCEDURE CleanBlockField
(CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
VAR Success : BOOLEAN);
(**
CleanBlockField - Clean the contents of a block data field.
This procedure completely clears the contents of a block
data field. After this finishes any check of the field will
show that it contains zero byte.
CALLING SEQUENCE -
CleanBlockField (Relation, Field)
ENTRY -
Relation : ARRAY OF CHAR
Relation of the block field.
Field : ARRAY OF CHAR
The name of the block data field.
EXIT -
Success : BOOLEAN
True - No problems encountered, field cleared.
False - Problem encountered, field is not cleared.
*)
PROCEDURE BlockToFile
(CONST Relation : ARRAY OF CHAR;
CONST BlockField : ARRAY OF CHAR;
CONST FileName : ARRAY OF CHAR);
(**
BlockToFile - Copy data from block data field to a file.
This procedure copies block data from the block data field
into a file. This is useful for doing reports and editing
the data outside of the field.
CALLING SEQUENCE -
BlockToFile (Relation, BlockField, FileName)
ENTRY -
Relation : ARRAY OF CHAR
Relation of the block field.
BlockField : ARRAY OF CHAR
The name of the block data field.
FileName : ARRAY OF CHAR
The name of the file to put the data in.
*)
PROCEDURE FileToBlock
(CONST FileName : ARRAY OF CHAR;
CONST Relation : ARRAY OF CHAR;
CONST BlockField : ARRAY OF CHAR);
(**
FileToBlock - Copy data from a file to a block data field.
This procedure copies block data from a file into a block
data field.
CALLING SEQUENCE -
FileToBlock (FileName, Relation, BlockField)
ENTRY -
FileName : ARRAY OF CHAR
The name of the file containing the data.
Relation : ARRAY OF CHAR
Relation of the block field.
BlockField : ARRAY OF CHAR
The name of the block data field.
*)
PROCEDURE FileLargerThan
(CONST FileName : ARRAY OF CHAR;
CONST CheckSize : Files.FilePosition) : BOOLEAN;
(**
FileLargerThan - Test if a file is larger than the given size.
This procedure checks a file size to see if it is larger than
the given CheckSize. A boolean value is returned of the
result.
CALLING SEQUENCE -
FileLargerThan (FileName, CheckSize)
ENTRY -
FileName : ARRAY OF CHAR
The name of the file containing the data.
CheckSize : Files.FilePosition
The size to check against the file.
EXIT -
FileLargerThan : BOOLEAN
True - The current size of the file is larger then the CheckSize.
False - The current size of the file is less than or equal to the
CheckSize.
*)
PROCEDURE CountFileLines
(CONST FileName : ARRAY OF CHAR;
CONST maxLength : CARDINAL;
VAR numLines : CARDINAL);
(**
CountFileLines - Count how many lines are in this file.
This procedure counts the number of lines of data contained
within this file. Note that there is a max line length
value used during the counting so if a current line in the
file actually contains more data than this max value the
line will be counted as two lines.
CALLING SEQUENCE -
CountFileLines (FileName, maxLength, numLines)
ENTRY -
FileName : ARRAY OF CHAR
The name of the file containing the data.
maxLength : CARDINAL
The max length to count as a single line.
EXIT -
NumLines : CARDINAL
The number of lines that this file will produce when the data
is pulled out given that the maxLength value is used at that
time also.
*)
PROCEDURE BlockToString
(CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
CONST LineNumber : CARDINAL;
CONST LineMax : CARDINAL;
VAR line : ARRAY OF CHAR);
(**
BlockToString - Get a line of data from a block data field.
This procedure gets a line of data from the block field. It
uses the LineNumber parameter to calculate which piece of
data is being requested.
CALLING SEQUENCE -
BlockToString (Relation, Field, LineNumber, LineMax, line)
ENTRY -
Relation : ARRAY OF CHAR
The name of the relation holding the block field.
Field : ARRAY OF CHAR
The name of the block data field.
LineNumber : CARDINAL
The sequential number of the line to retrieve. (i.e. 42 would
request that the forty second line of data be return.
LineMax : CARDINAL
A max number of characters to use when calculating lines of data.
EXIT -
line : ARRAY OF CHAR
The buffer used to contain the line of data on return.
*)
PROCEDURE FileToString
(CONST FileName : ARRAY OF CHAR;
CONST LineNumber : CARDINAL;
CONST LineMax : CARDINAL;
VAR line : ARRAY OF CHAR);
(**
FileToString - Get a line of data from a file.
This procedure gets a line of data from a file. It
uses the LineNumber parameter to calculate which piece of
data is being requested.
CALLING SEQUENCE -
FileToString (FileName, LineNumber, LineMax, line)
ENTRY -
FileName : ARRAY OF CHAR
The name of the file containing the data.
LineNumber : CARDINAL
The sequential number of the line to retrieve. (i.e. 42 would
request that the forty second line of data be return.
LineMax : CARDINAL
A max number of characters to use when calculating lines of data.
EXIT -
line : ARRAY OF CHAR
The buffer used to contain the line of data on return.
*)
PROCEDURE BlockLargerThan
(CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
CONST CheckSize : ModSys.INT32) : BOOLEAN;
(**
BlockLargerThan - Test if a block field is larger than the given size.
This procedure checks a block field size to see if it is larger than
the given CheckSize. A boolean value is returned of the result.
CALLING SEQUENCE -
BlockLargerThan (Relation, Field, CheckSize)
ENTRY -
Relation : ARRAY OF CHAR
The name of the relation containing the data.
Field : ARRAY OF CHAR
The name of the field containing the data.
CheckSize : Files.FilePosition
The size to check against the file.
EXIT -
BlockLargerThan : BOOLEAN
True - The current size of the file is larger then the CheckSize.
False - The current size of the file is less than or equal to the
CheckSize.
*)
PROCEDURE CountBlockLines
(CONST Relation : ARRAY OF CHAR;
CONST Field : ARRAY OF CHAR;
CONST maxLength : CARDINAL;
VAR numLines : CARDINAL);
(**
CountBlockLines - Count how many lines are in a block field.
This procedure counts the number of lines of data contained
within a block field. Note that there is a max line length
value used during the counting so if a current line in the
file actually contains more data than this max value the
line will be counted as two lines.
CALLING SEQUENCE -
CountBlockLines (Relation, Field, maxLength, numLines)
ENTRY -
Relation : ARRAY OF CHAR
The name of the relation containing the data.
Field : ARRAY OF CHAR
The name of the field containing the data.
maxLength : CARDINAL
The max length to count as a single line.
EXIT -
NumLines : CARDINAL
The number of lines that this file will produce when the data
is pulled out given that the maxLength value is used at that
time also.
*)
PROCEDURE ClearBlockFile
(CONST FileName : ARRAY OF CHAR);
(**
ClearBlockFile - Clear the contents of a file.
This procedure completely clears the contents of a file.
After this finishes any check of the file will show that
it contains zero byte.
CALLING SEQUENCE -
ClearBlockFile (FileName)
ENTRY -
FileName : ARRAY OF CHAR
The name of the file to clear.
*)
PROCEDURE CalculateSlice
(CONST Buffer : ARRAY OF CHAR;
CONST startOffset : CARDINAL;
CONST maxLength : CARDINAL;
VAR numBytes : CARDINAL;
VAR WasteBytes : CARDINAL);
(**
CalculateSlice - Given startOffset what is the size of the next line.
This procedure calculates the next slice (line) of data given the
starting position of startOffset and using maxLength. The numBytes
param returns how many bytes of good data will be available and
the WasteBytes param returns how many bad bytes. The bad bytes come
from things such as trying to use an offset that begins at the
start of a CR LF pair. In that case WasteBytes comes back as two.
CALLING SEQUENCE -
CalculateSlice (Buffer, startOffset, maxLength, numBytes,
WasteBytes)
ENTRY -
Buffer : ARRAY OF CHAR
The buffer of data to check.
startOffset : CARDINAL
The offset from the beginning of the buffer to start the
calculation.
maxLength : CARDINAL
The max length for a line of data.
EXIT -
numBytes : CARDINAL
The number of bytes of data that will be a valid line.
WasteBytes : CARDINAL
The number of bytes that will be ignore such as using
an offset that starts in the middle of a CR LF pair. In
that case the LF would be a waste byte so a value of 1 would
be returned.
*)
Send mail to
warren.merrill@inl.gov
with questions or comments about this web site.
Copyright © 1989-2006 Battelle Energy Alliance