HPlogo Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 8 Writing to a File

Writing User Data in ANSI Labels

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

It is possible to write data into bytes 5/21 of the HDR1 record of an ANSI tape label. In all, 17 bytes are available. If you write more than 8 bytes into the record, the 9th byte (Byte 13) must be a period (".").

For example, to write the string "FRANKSTN COUNCIL" into bytes 5/21, mount your tape and then do this:

   FILE FRANKSTN.COUNCIL;DEV=TAPE;REC=-80,,F,ASCII;LABEL=BUDGET,ANS

   FCOPY FROM=datafile;TO=*FRANKSTN.COUNCIL

where datafile is the name of a disk file. This coerces the string "FRANKSTN.COUNCIL" into bytes 5/21 of the HDR1 record, and it places "BUDGET" into the VOL1 record of the tape.

The "file" and "group" names are right-justified.

56789101112131415161718192021
FRANKSTN. COUNCIL

In order to retrieve the string recorded in bytes 5/21, you must create a program that uses the intrinsics FOPEN (or HPFOPEN) and FFILEINFO. The program must do two things:

  • It must FOPEN (or HPFOPEN) the tape device.

  • It must employ FFILEINFO with option 45 to retrieve the "file" identifier.

The tape containing such a label must be mounted before you run the program.

Feedback to webmaster