Intermec PB51 Fingerprint Developer's Guide (old) - Page 80
Using a CLOSE Statement, Finding the Last Field Read and Determining File Length With LOC and LOF
View all Intermec PB51 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 80 highlights
Chapter 4 - Managing Input and Output Using a CLOSE Statement When you are finished, close the file: 100 CLOSE #1 Nothing actually happens before you execute the program using a RUN statement. Then the data is placed into the fields and records as specified by the program, as in this example: 10 OPEN "ZFILE" AS #1 LEN=14 20 FIELD#1, 4 AS F1$, 4 AS F2$, 6 AS F3$ 30 QDATA1$="ABC" 40 QDATA2$="DEF" 50 QDATA3$="12345678" 60 LSET F1$=QDATA1$ 70 RSET F2$=QDATA2$ 80 LSET F3$=QDATA3$ 90 PUT #1,1 100 CLOSE #1 RUN Finding the Last Field Read and Determining File Length With LOC and LOF Use LOC to return the number of the last record read by the use of GET statement. For an example, see "Finding the Last Field Read With LOC" on page 51. LOF returns the length (in bytes) of a file that has been opened. For an example, see "Determining File Length With LOF" on page 49. Output to Communication Channels Output from a Fingerprint program can be directed to any serial communication channel OPENed for sequential OUTPUT following the same principles as for output to files. For more information, see "Output to Sequential Files" on page 60. Note: In this case, the "centronics:" channel cannot be used. These Fingerprint commands are used in connection with output to a communication channel: • OPEN • PRINT# • PRINTONE# • CLOSE • LOC • LOF • COPY 64 Intermec Fingerprint Developer's Guide