Types Of Data File Formats; For Sequential Access Data Files - IBM 5110 User Manual

Apl
Table of Contents

Advertisement

TYPES OF DATA FILE FORMATS
For Sequential Access Data Files
There are two types of data file formats for sequential access data
files:
• APL internal format
• General exchange format
Following is a description of these data file formats.
APllnternal Format
The APL internal format allows data to be written to the data file in
the same format as that stored in the active workspace. For example,
the first record written to the data file might be a numeric 10 x 20
matrix, and the second record written to the data file might be a
10-element character vector.
General Exchange Format
The general exchange data format is the basis of exchange between
the 5110 APL and BASIC languages. The general exchange format
only allows character scalars or vectors to be written to the data file.
Therefore, when the system is storing numeric data in data files with
the general exchange data format, the format function must first be
used to change the data to a character scalar or vector.
The following rules apply to a general exchange format data file that is
written using the APL language for later processing using the BASIC
language.
1.
All data items must be separated by commas. For example, the
numeric vector 1 3 5 6 must be changed to character data, then
commas must be placed in the blank positions. The following
statement replaces blanks with commas in a character vector:
x [ (
X::::'
') / \
P
X ]
~
.. '
I
' . . , _ _ _
where X is the character vector.
2.
Negative signs must be replaced by minus signs.
3.
The 5110 BASIC language accepts only the first 255 characters in
each character constant.
4.
The 5110 BASIC language creates a logical record for each PUT
statement or each row of an array with a MAT PUT statement.
I nput/Output Control
109

Advertisement

Table of Contents
loading

Table of Contents