Intermec PB31 Fingerprint Developer's Guide (old) - Page 76
Redirecting Output to a File, Output to Sequential Files, Using an OPEN Statement
View all Intermec PB31 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 76 highlights
Chapter 4 - Managing Input and Output Redirecting Output to a File Some Fingerprint commands return data on the standard OUT channel by default. However, it is possible to redirect such output to a file using a REDIRECT OUT statement. When a REDIRECT OUT statement is issued with an appending string expression (REDIRECT OUT ), the expression specifies the name of a sequential file in which the output is stored. In this case no data is echoed back to the host. When no file name appends the statement, the output is directed back to the standard OUT channel. In the following example, the output is redirected to the file "IMAGES.DAT". The images in the printer memory are read to the file, after which the output is redirected back to the standard OUT channel. Then the file is copied to the communication channel "uart1:" and printed on the screen of the host: 10 REDIRECT OUT "IMAGES.DAT" 20 IMAGES 30 REDIRECT OUT RUN Ok Output to Sequential Files This section describes the commands you use in connection with output to sequential files. Using an OPEN Statement Before any data can be written to a sequential file, it must be opened. Use the OPEN statement to specify the name of the file and the mode of access (OUTPUT or APPEND). • OUTPUT means that existing data is replaced. • APPEND means that new data is appended to existing data. In the OPEN statement you must also assign a number to the OPENed file, which is used when the file is referred to in other instructions. The number mark (#) is optional. Optionally, the length of the record can also be changed (default is 128 bytes). Up to 10 files and devices can be open at the same time. In this example, the file "ADDRESSES" is opened for output and given the reference number 1: OPEN "ADDRESSES" FOR OUTPUT AS #1 In this example, the file "PRICELIST" is opened for appended data and is given the reference number 5: OPEN "PRICELIST" FOR APPEND AS #5 60 Intermec Fingerprint Developer's Guide