HPlogo FCOPY Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 3 FCOPY Applications and Examples

Displaying Disk Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

You display the contents of your files by copying them to your terminal. FCOPY displays files in the following formats:

  • Character.

  • Octal.

  • Hexadecimal.

ASCII Files

If you know that the file is an ASCII file, simply copy it to your terminal by leaving TO empty. For example,

   >FROM=ASCITEST;TO=

   This is an ASCII file.

   It contains two lines of text.



   EOF FOUND IN FROMFILE AFTER RECORD 1



   2 RECORDS PROCESSED * * * 0 ERRORS

Hexadecimal and Octal Codes

Use the CHAR and HEX, HEXO, or OCTAL functions to display both ASCII characters and hexadecimal or octal codes. You might display a file in both ASCII and octal, for example, when your terminal upshifts lowercase characters. Combining octal with ASCII would let you compare octal values and determine when characters are actually lowercase. The example below displays both octal codes and ASCII characters. The numbers at the end of each record are text editor line numbers that start at 1 (00001000):

>FROM=TEXT3;TO=;OCTAL;CHAR



TEXT3.PUB.ACCOUNT RECORD 0 (%0)



000000: 052110 044523 020111 051440 046111 047105 020061 27040 THIS IS LINE 1

000010: 020124 044105 020070 026504 044507 044524 020116 52515 THE 8-DIGIT NUM

000020: 041105 051123 020101 052040 052110 042440 051111 43510 BERS AT THE

000030: 052040 040522 042440 052110 042440 020040 020040 20040 RIGHT ARE THE

000040: 020040 020040 020040 020040 030006 030006 030006 30006 00001000



TEXT3.PUB.ACCOUNT RECORD 1 (%1)



000000: 052105 054124 020105 042111 052117 051040 046111 047105 TEXT EDITOR LINE

000010: 020116 052515 041105 051123 027040 020116 047524 042440 NUMBERS. NOTE

000020: 052110 040524 020124 044105 020122 042503 047522 042040 THAT THE RECORD

000030: 047125 046502 042522 051140 020040 020040 020040 020040 NUMBERS

000040: 020040 020040 020040 020040 030060 030061 030460 030060 00002000

Binary Files

To display the contents of a binary disk file at your terminal, do the following:

  1. Leave the TO parameter empty.

  2. Use the HEX or OCTAL function to display the hexadecimal or octal representation of the file's contents. Use the CHAR function to display any ASCII characters that may exist.

For example, you might use the commands below to display a file on your terminal.

>FROM=FOO;TO=;OCTAL;CHAR



FOO RECORD 0 (%0, #0)



00000: 000000 000000 000000 044105 053514 042524 052055 050101 ......HEWLETT-PA

00010: 041513 040522 042040 031462 031061 031101 027060 031456 CKARD 32212A.03.

00020: 031460 020106 044514 042440 041517 050111 042522 020040 30 FILE COPIER

00030: SAME: TO 000040-1

00040: 020040 020040 020040 020040 020040 020040 024103 024440             (C)

00050: 044105 053514 042524 052055 050101 041513 040522 042040 HEWLETT-PACKARD


The NORECNUM function can be used to suppress the display record numbers.

File Subsets

To display a subset of a file on your terminal, use the SUBSET function. The example below copies a subset of five records (records 30 through 34) from the file CUSTDATA to a terminal. CUSTDATA is an ASCII file containing the names and addresses of customers.

   >FROM=CUSTDATA;TO=;SUBSET=29:33



   XYZ MANUFACTURING CO.                   131 PINE STREET SF

   WIDGET, INC.                            43721 OAK STREET DET

   ROBERT ALCOTT & ASSOCIATES              752 SURF AVE. CHI

   WILLIAM LEWIS & SON                     3217 W. MADISON AVENUE NY

   SUPER GIZMO OF NEVADA, INC.             431 S. JACKPOT LANE RENO
Feedback to webmaster