HP 3000 Manuals

Answers to Test Questions [ MPE V to MPE XL Getting Started: Mentor's Guide ] MPE/iX 5.0 Documentation


MPE V to MPE XL Getting Started: Mentor's Guide

Answers to Test Questions 

Chapter 2 Test Answers 

   1.  SORT.PUB.SYS or SORT

   2.  a.  is false.

       b.  is false.

       c.  is true.

   3.  LISTREDO

   4.  a.  is LISTREDO;UNN

       b.  is LISTREDO or LISTREDO;ABS

       c.  is LISTREDO;REL

   5.  An absolute listing numbers the command lines in consecutive,
       ascending order (1, 2, 3...).  A relative listing numbers the
       command lines in order relative to the current command line.  In
       other words, the last command entered would be -1, the one before
       it would be -2, and so on.

   6.  It reexecutes the last command entered--the last command in the
       history stack.

   7.  DO -3

       a.  DO 3

   8.  a.  is true.

       b.  is false.

       c.  is false.

   9.  a.  Because you may not specify positional parameters in a command
           line after having specified a keyword parameter.

       b.  Because the new syntax, which allows for positional
           parameters, does not apply to any commands except those new to
           MPE XL.

Chapter 3 Test Answers 

   1.  PRINT BARNEY,*PRINTER or
       PRINT FROM=BARNEY;OUT=*PRINTER

   2.  CHGROUP LABS

   3.  You are put into your home group.

   4.  COPY SALES,SALEINFO or
       COPY FROM=SALES;TO=SALEINFO

   5.  a.  Would ask if you wanted the existing file to be purged.

       b.  Would write over the existing file without asking you.

       c.  Would terminate the COPY process without asking you.

   6.  COPY DATA.MARKET,DATA1 or
       COPY FROM=DATA.MARKET;TO=DATA1

Chapter 4 Test Answers 

   1.  SETCATALOG UDC2;DELETE

       a.  SETCATALOG UDC5;APPEND

   2.

----------------------------------------------------------------------------------------------
|                                                                  |          |              |
|                                                                  |   UDC    |  Com.  File  |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| a.  Must be cataloged.                                           |    X     |              |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| b.  Is invoked by file name.                                     |          |      X       |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| c.  Should be used for stable commands.                          |    X     |              |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| d.  Can be invoked at logon via a UDC.                           |    X     |      X       |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| e.  Invoked by a command header.                                 |    X     |              |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| f.  Can be easily PURGEd.                                        |          |      X       |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| g.  Can be separated in a file by one or more asterisks (*).     |    X     |              |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| h.  Is not invoked by a file name.                               |    X     |              |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------
|                                                                  |          |              |
| i.  Can contain parameters.                                      |    X     |      X       |
|                                                                  |          |              |
----------------------------------------------------------------------------------------------

   3.  Add the following to the end of the UDC:

            OPTION RECURSION
            LF

   4.

            SHOW
            OPTION NOLIST
            SHOWME
            LISTF
            OPTION LIST
            SHOWCATALOG
            OPTION RECURSION
            ST
            ***

   5.  a.  File S

                SHOWME
                SHOWTIME

           User enters S at the prompt.

       b.  File SHOW

                S
                LISTF

           User enters SHOW at the prompt.

   6.  a.  The CALC UDC

       b.  The CALC command

       c.  Your own DOIT command

   7.  The answer is c. XEQ DOIT

Chapter 5 Test Answers 

   1.  The answers are b.  and c.

   2.  Note that in the answers below a space or semicolon may be used in
       place of the comma.

       a.

                SETVAR X,250
                SHOWVAR X
                DELETEVAR X

       b.

                SETVAR Z_A,"1.25"
                SHOWVAR Z_A
                DELETEVAR Z_A

   3.  The answer is b. setvar x,'Pat'

   4.  The answer is b. input hpprompt,'New Prompt?'

   5.  MPE XL Commands Reference Manual 

   6.

            SETVAR HPREDOSIZE,10
            SHOWVAR HPREDOSIZE
            SETVAR HPREDOSIZE,20
            SHOWVAR HPREDOSIZE

   7.  SETVAR HPPATH,"!HPPATH,TARK"
       or
       SETVAR HPPATH,"!!HPGROUP,PUB,PUB.SYS,TARK"

       Enter COMFILE at the prompt.

   8.  ECHO !ARN_WILK

   9.  SETVAR Y,!!X

  10.  Recursive dereferencing

Chapter 6 Test Answers 

   1.  CALC 96/8

   2.  CALC "light" + "ing"

   3.  a.  CALC A + B

       b.  SETVAR X,A + B
           ECHO !X or :SHOWVAR X

       c.  ECHO ![A + B]

   4.  True

Chapter 7 Test Answers 

   1.  Yes, but only if you have PH capability.  Just execute RUN
       CI.PUB.SYS and it will put you into a second level of the CI.

   2.  BYE

   3.  Execute

            CI
            SHOWVAR HPCIDEPTH

       three times,

       then execute

            EXIT
            SHOWVAR HPCIDEPTH

       three times.



MPE/iX 5.0 Documentation