HP 3000 Manuals

Lesson 4 Using File Equations [ Using the 900 Series HP 3000: Advanced Skills Module 7: Solutions Guide ] MPE/iX 5.0 Documentation


Using the 900 Series HP 3000: Advanced Skills Module 7: Solutions Guide

Lesson 4 Using File Equations 

Q 2-10                $STDIN is the standard input device, which is
                      normally the terminal.

Q 2-11                OUT is the alias for $STDLIST, the standard output
                      device.

Q 2-12                According to the MAILPRNT equation, the HP Desk
                      messages will be printed on LP (line printer).

Q 2-13                To redirect HP Desk messages to the terminal
                      screen, you might change the file equation as
                      follows:

                           FILE MAILPRNT=$STDLIST

                      To redirect HP Desk messages to the line printer,
                      you might change the file equation as follows:

                           FILE MAILPRNT;DEV=LP

Q 2-14                According to the first file equation, the name and
                      characteristics of the file associated with FILEIN
                      are the following:

                           File name       = MYFILEA
                           Record size     = 80 bytes
                           Blocking factor = (default)
                           Record type     = fixed length
                           File type       = ASCII

Q 2-15                According to the second file equation, the name and
                      characteristic of the file associated with FILEOUT
                      are the following:

                           File name       = MYFILEB
                           Record size     = 80 bytes
                           Blocking factor = (default)
                           Record type     = fixed length
                           File type       = ASCII

Q 2-16                If you no longer want the FILEIN or FILEOUT
                      equations to be in effect, you would do the
                      following:

                           RESET FILEIN
                           RESET FILEOUT

Exercise 2-5:  Creating and Using File Equations 

2.                    Enter the command to display all existing file
                      equations:

                           LISTEQ

3a.                   To redirect output to the terminal instead of to
                      FILE2, change the OUT file equation as follows:

                           FILE OUT=$STDLIST

3b.                   To redirect input from FILE1, instead of from the
                      terminal, change the IN file equation as follows:

                           FILE IN=FILE;REC=-80,,F,ASCII

4a.                   FILE OUTPUT;DEV=LP

                      What is the name of the file designator?  OUTPUT

                      What device does it refer to?  line printer

4b.                   FILE FORMAT;DEV=LP;ENV=PICA.
                      HPENV.SYS

                      What is the name of the file designator?  FORMAT

                      What device does it refer to?  line printer

                      What is the environment file?  PICA

                      What does this file equation do?  It lets you print
                      something on the line printer using pica type.

4c.                   FILE INPUT=MYFILE1;REC=-80,,F,ASCII

                      What is the name of the file designator?  INPUT

                      What file does it refer to?  MYFILE1

                      What happens if a program reads from *INPUT? It
                      reads the contents of MYFILE1.

                      What size records are in the actual file?  80 byte
                      records

4d.                   FILE OUTPUT = $NULL

                      What is the name of the file designator?  *OUTPUT

                      What device or file does *OUTPUT refer to?  Nothing

                      What happens if you write to *OUTPUT? Output
                      disappears

5a.                   Prints HP Desk message #10 on the line printer.

5b.                   Prints the contents of MYFILE to the standard
                      output device (usually the terminal screen).

5c.                   Reads input from the standard input device (usually
                      the keyboard).

5d.                   Reads input from an already existing file called
                      MYFILE.

5e.                   Writes output to a new file called MYFILE (with the
                      specified characteristics).

6a.                   This file equation defines HIERR as the terminal
                      screen:

                           FILE HIERR=$STDLIST

6b.                   According to the file equation, by directing the
                      error listing to *HIERR, the listing should print
                      on the screen.

6c.                   To redirect the error listing to a file called
                      ERROR1 with default file characteristics, change
                      the file equation as follows:

                           FILE HIERR=ERROR1

6d.                   According to the file equation, by directing the
                      error listing to *HIERR, the listing should print
                      in the ERROR1 file.

6e.                   To redirect the error listing to a file called
                      ERROR2, change the file equation as follows:

                      FILE HIERR=ERROR2;REC=-80,,F,ASCII

                      According to the file equation, the error listing
                      should print in the ERROR2 file.

************ End of Exercise 2-5 ********* 



MPE/iX 5.0 Documentation