1110
File Memory Instructions Section 3-26
these words can be checked to verify that the expected number of words or
fields were transferred.
Overwriting Data in an Existing File (Third Digit of C=1)
FWRIT(701) uses data area data starting at the word specified in S to over-
write file memory data in the specified data type. It overwrites the number of
words or fields specified in D1 and D1+1 in the file specified in D2 (with file-
name extension .IOM, .TXT, or .CVS) starting at the address specified in
D1+2 and D1+3.
Appending Data to an Existing File (Third Digit of C=0)
FWRIT(701) appends data area data starting at the word specified in S to a
data file in file memory in the specified data type. It appends the number of
words or field specified in D1 and D1+1 to the file specified in D2 (with file-
name extension .IOM, .TXT, or .CVS).
Creating a New File with Source Data
If the file specified in D2 does not exist, FWRIT(701) creates a new file with
that name and filename extension (.IOM, .TXT, or .CVS) and writes the speci-
fied source data in the specified data type starting at the beginning of the file.
In this case, it does not matter if appending to overwriting data is specified.
Operand Specifications
File specified in D2CPU Unit
Starting
address
specified
in S
Starting word
specified in
D1+2 and
D1+3
Number of
words specified
in D1 and D1+1
Overwrite
Memory Card or EM file memory
(Specified by the 1st digit of C.)
CPU Unit
Append
Starting
address
specified
in S
End of
file
Number of words
specified in D1
and D1+1
File specified in D2
Existing
data
Memory Card or EM file memory
(Specified by the 1st digit of C.)
CPU Unit
New file created
Memory Card or EM file memory
(Specified by the 1st digit of C.)
Number of words
specified in D1
and D1+1
Starting
address
specified
in S
File speci-
fied in D2
Beginning
of file
Area C D1 D2 S
CIO Area CIO 0000 to
CIO 6143
CIO 0000 to
CIO 6140
CIO 0000 to CIO 6143
Work Area W000 to
W511
W000 to
W508
W000 to W511
Holding Bit Area H000 to H511 H000 to 508 H000 to H511