HPlogo Accessing Files Programmer's Guide > Chapter 9 Reading from a File

Chapter 9 Reading from a File

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 6 ♥
E0692 Edition 5

Table of Contents
Sequential Access and Random Access
Reading from a disk file using sequential access
Reading from a disk file using random access
Increasing I/O performance using FREADSEEK
Reading From $STDIN
Reading From a Magnetic Tape File
Reading a File Label from a Labeled Tape File
This chapter describes, through program examples, various ways that you can use file system intrinsics to transfer data to your program from a disk file or device file. This chapter is intended to illustrate topics introduced in chapter 7, "Record Selection and Data Transfer". This chapter is divided into the following topics:
  • "Sequential Access and Random Access" discusses two common methods of record selection and data transfer, and uses examples to illustrate the use of the FREAD and FREADDIR intrinsics.

  • "Reading from $STDIN" discusses how your program can use the READ, READX, and FREAD intrinsics to read data from the job/session standard input device, $STDIN. An example illustrates the use of the READ intrinsic to read a character string from $STDIN.

  • "Reading from a Magnetic Tape File" provides an example of using the FREAD intrinsic to read data from file located on magnetic tape.

  • "Reading a File Label from a Labeled Tape File" provides an example of using the FREADLABEL intrinsic to read a user-defined file label located on a labeled magnetic tape file.




Writing User Data in ANSI Labels


Sequential Access and Random Access