Prev Up Next
Go backward to 4.11 VAX command procedure #2
Go up to 4 Labs
Go forward to 4.13 VAX Variables #1

4.12 VAX Logical Names

The use of logical names on the VAX/VMS system allows users to reference specific files without specifying the physical location. It also allows the same procedure to be used for different data sets. This allows the operation of a computer center to be more independent of both the programmers and the physical configuration of a system. For example, if a disk is referred only by a logical name, then if the data is moved to a new disk drive during a system upgrade then only the logical name needs to be changed, not all of the programs using data on that drive.
  1. Create a one line file called TYPER.DAT. This has been misunderstood in the past, so for clarification --

    The name of the file is: TYPER.DAT,

    and the one line content of the file is:

    This is the data for the VAX Logical Names Lab.
    
  2. Show the logical name TYPER_INPUT
    $ SHOW LOGICAL TYPER_INPUT
    
  3. Compile, link, and execute the program TYPER.COB as in the Lab : "COBOL program #2".
  4. Change the logical name TYPER_INPUT to point to TYPER.DAT. (You should get a information message about superseding a previous logical name - you are.)
    $ DEFINE TYPER_INPUT TYPER.DAT
    
  5. RUN TYPER again and see that it used the new file. The one you created in step 1.
  6. ASSIGN SYS$OUTPUT as a user mode logical name to TYPER.OUT.
    $ DEFINE /USER_MODE SYS$OUTPUT TYPER.OUT
    
    This will re-direct the output of the next command. In this case it will be sent to the file TYPER.OUT. Make sure that the next command is RUN TYPER.
  7.   RUN the program again. This time the output will be re-directed to a file (TYPER.OUT), instead of your terminal.
    $ RUN TYPER
    
  8. Look at TYPER.OUT with an editor or the TYPE command.
Print and turn in a printed copy of TYPER.OUT from step marked with:
Your-Name
Lab 4.12: VAX Logical Names - TYPER.OUT
TABER CSC135
Place the lab in the instructor hand-in box in BUS R6E, the "terminal room".
Instructor: ltaber@pima.edu** My new Home on phRed** The Pima College Site** The Mad Dr. G.'s home page on phred.

Prev Up Next