
4. CONVERSATIONAL MACRO FUNCTION
B–62073E–2/03
120
Table 5: Status value
0 : Ended normally
1 : File does not exist
2 : File has not had OPEN performed
3 : Number of files which can OPEN (10) has been exceeded)
4 : Number of files which can be created has been exceeded
5 : File area exceeded
6 : Pointer is not correct
7 : File size is not correct
8 : File OPEN did not finish correctly
9 : File did not CLOSE
10 : Access mode is not correct
11 : File already exists
12 : I/O error has occurred
13 : File number is not correct
14 : Data type is not correct
Example:
Using data created by conversational macro 09000, performs
automatic operation by execution macro 09100.
Conversational macro
O9000 :
#100=0 ;
#101=0 ;
#102=3 ;
N10 IF[#100 NE 0] GOTO 20 ;
FGEN (200, 120, 110) ;
Creates file number 200
FOPEN (200, 1, 110) ;
Opens file No. 200
IF[#110 NE 0] GOTO 90 ;
#100=1 ;
N20 M98 P9001 ;
Reads data from keys
IF[#101 NE 0] GOTO 80 ;
FWRIT (200, 0, #120) ;
Writes read data to file
IF[#110 NE 0] GOTO 90 ;
#102=#102 – 1 ;
IF[#102 NE 0] GOTO 20 ;
N90 FCLOS (200) ;
Closes file No. 200
N80 M99 P10 ;
O9001 ;
IF[#101 NE 0] GOTO 10 ;
#101=1 ;
#8502=1 ; Read start of keys
N10 IF[#8501 EQ 0] GOTO 20 ;
#120=#8503 ; Read keys
#101=0 ;
N20 M99 ;
Execation macro
O9100 ;
FOPEN (200, 0, 110) ; Opens file
IF[#110 NE 0] GOTO 90 ;