UNIVERSITY OF KENTUCKY
                                               COMPUTING CENTER
                                               CMS Introductory Guide
                                               Version 2.10
                                               This publication provides information to
                                               acquaint the new user with the capabil-
                                               ities provided by the IBM CMS system at
                                               the University of Kentucky Computing
                                               NOTE: The use of CMS is not recommended
                                               if your applications can be migrated to
                                               other platforms.  Use a Convex (Unix)
                                               machine or a computer on your desktop if
                                               at all possible.  CMS will no longer be
                                               available for most user applications
                                               after June 30, 1996.  For more infor-
                                               mation, contact the Information Systems
                                               Help Desk in 107 McVey Hall (e-mail:
                                               helpdesk@ukcc.uky.edu or phone:
                                               UU  U KK  K   CCCC  CCCC
                                               UU  U KK K   CC    CC
                                               UU  U KKK    CC    CC
                                               UU  U KK  K  CC    CC
                                                UUU  KK   K  CCCC  CCCC
      Second Edition, Revision 10 (September 1995)
      Technical changes made to the contents of this manual
      are indicated by a vertical bar to the left of the
      University of Kentucky
      Computing Center
      128 McVey Hall
      Lexington, KY  40506-0045
      Phone: 606/257-2900
      Processed September 13, 1995-Waterloo SCRIPT - Version 90.1 (90OCT04)
      Prepared by the UKCC User Services Group
                                                                      Summary of Changes
      Second Edition, Revision 10, August 1995
         ·Updated for printer, newsletter, hours, and room changes.
         ·Updated for expected changes due to migration.
         ·Minor editorial changes have been made throughout the manual.
      Second Edition, Revision 9, August 1992
         ·Updated for newsletter, hours, and room changes.
         ·Updated for hardware and system changes.
         ·Minor editorial changes have been made throughout the manual.
      Second Edition, Revision 8, August 1990
         ·Updated for hardware and system changes.
         ·Minor editorial changes have been made throughout the manual.
      Second Edition, Revision 7, January 1990
         ·Minor Editorial Changes.
      Second Edition, Revision 6, August 1989
         ·Plotting section expanded.
         ·TeX text formatter now available.
         ·VM Batch replaces CMS Batch.
         ·Changes due to VM/XA SP.
         ·Minor editorial changes have been made throughout the manual.
      Second Edition, Revision 5, August 1988
         ·Changes due to moving CMS accounts to IBM 3084.
         ·TELNET allows remote logon to other computers on the INTERNET network.
         ·Kentucky Register is restored to a published document.
      Second Edition, Revision 4, February 1988
         ·Changes due to moving CMS accounts to IBM 3090.
         ·MVT operating system is removed, MVS used for all OS batch jobs.
         ·Kentucky Register is made online resource, printed version discontinued.
      Second Edition, Revision 3, August 1987
         ·SPLPREP used to set printer.
         ·MVS operating system is available, replacing MVT for OS batch jobs.
         ·WATFOR77 is available as teaching compiler for FORTRAN.
         ·Method of printing online manuals changed.
         ·HOT printer limits raised.
                                                                Summary of Changes     i
      Second Edition, Revision 2, January 1987
         ·SLFTEACH for learning XEDIT.
         ·CMS Batch information.
         ·Apple LaserWriter printers made available.
                                                               Summary of Changes     ii
      CMS Introductory Guide
      Summary of Changes  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  i
      Section 1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . . .  1
         Section 1.1 Logging On . . . . . . . . . . . . . . . . . . . . . . . . . . .  2
         Section 1.2 Logging Off  . . . . . . . . . . . . . . . . . . . . . . . . . .  3
         Section 1.3 3270 Status Indicators . . . . . . . . . . . . . . . . . . . . .  3
      Section 2.  Getting Help  . . . . . . . . . . . . . . . . . . . . . . . . . . .  5
         Section 2.1 Online HELP Facility . . . . . . . . . . . . . . . . . . . . . .  5
         Section 2.2 Editor Teaching Facility . . . . . . . . . . . . . . . . . . . .  5
         Section 2.3 More Manuals . . . . . . . . . . . . . . . . . . . . . . . . . .  6
         Section 2.4 Other Aids . . . . . . . . . . . . . . . . . . . . . . . . . . .  6
      Section 3.  Disk Files  . . . . . . . . . . . . . . . . . . . . . . . . . . . .  7
         Section 3.1 Student Userids  . . . . . . . . . . . . . . . . . . . . . . . .  7
         Section 3.2 File Maintenance . . . . . . . . . . . . . . . . . . . . . . . .  7
         Section 3.3 Printing a File  . . . . . . . . . . . . . . . . . . . . . . . .  9
         Section 3.4 Examining Disk Files . . . . . . . . . . . . . . . . . . . . . . 10
         Section 3.5 Using the Editor . . . . . . . . . . . . . . . . . . . . . . . . 11
         Section 3.6 Sharing Disks and Files  . . . . . . . . . . . . . . . . . . . . 14
         Section 3.7 BITNET and Internet  . . . . . . . . . . . . . . . . . . . . . . 15
         Section 3.8 PUBLIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
      Section 4.  Spool Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
         Section 4.1 Examining Spool Files  . . . . . . . . . . . . . . . . . . . . . 17
         Section 4.2 Printing Spool Files . . . . . . . . . . . . . . . . . . . . . . 18
         Section 4.3 ACCEPTing Spool Files  . . . . . . . . . . . . . . . . . . . . . 18
      Section 5.  Text Formatting . . . . . . . . . . . . . . . . . . . . . . . . . . 19
                                                                        Contents     iii
      CMS Introductory Guide
         Section 5.1 Using SCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . 19
            Using Laser Printers for Final Copies . . . . . . . . . . . . . . . . . . 20
         Section 5.2 Using LaTeX  . . . . . . . . . . . . . . . . . . . . . . . . . . 20
      Section 6.  Interactive Programming . . . . . . . . . . . . . . . . . . . . . . 21
         Section 6.1 Programming Languages under CMS  . . . . . . . . . . . . . . . . 21
         Section 6.2 File Definitions . . . . . . . . . . . . . . . . . . . . . . . . 22
         Section 6.3 Subroutine Libraries . . . . . . . . . . . . . . . . . . . . . . 23
         Section 6.4 Executing Your Program . . . . . . . . . . . . . . . . . . . . . 23
         Section 6.5 Increasing Storage . . . . . . . . . . . . . . . . . . . . . . . 23
         Section 6.6 DLIST  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
         Section 6.7 Saving Disk Space  . . . . . . . . . . . . . . . . . . . . . . . 24
         Section 6.8 Watching Your CPU Usage  . . . . . . . . . . . . . . . . . . . . 24
      Section 7.  Batch Programming . . . . . . . . . . . . . . . . . . . . . . . . . 26
         Section 7.1 VM Batch . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
         Section 7.2 MVS Batch  . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
      Section 8.  Printer and Plotter Output  . . . . . . . . . . . . . . . . . . . . 28
         Section 8.1 Tracking Your Output . . . . . . . . . . . . . . . . . . . . . . 28
         Section 8.2 Graphing and Plotting Options  . . . . . . . . . . . . . . . . . 30
      Appendix. A.  Attaching to UKCC (or GW) . . . . . . . . . . . . . . . . . . . . 32
      Appendix. B.  Logging On with an ASCII Terminal . . . . . . . . . . . . . . . . 33
      Appendix. C.  A Sample CMS Session  . . . . . . . . . . . . . . . . . . . . . . 34
      Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
                                                                         Contents     iv
      CMS Introductory Guide
      Section 1:  Introduction
      This publication is an introductory guide to CMS running under VM/ESA at the UKCC.
      Some knowledge regarding computing systems is assumed.  For example, this guide
      does not attempt to define or explain what a terminal or keyboard is, what a
      printer is, what files are, or what batch and interactive systems are.  This guide
      will provide you with the information you need to perform basic operations in CMS.
      Topics not covered in this guide are covered in detail by the HELP system or other
      manuals.  The manuals contain much more detailed information concerning the VM
      system (the operating system under which CMS runs).  However, they are still not
      as accurate as the HELP facility, your best source of information.
      You may see references to CJS in older UKCC documents; CJS was a subset of CMS and
      is no longer used.  Because CJS and CMS overlap, most references to CJS also apply
      to CMS.  See the section "Getting Help" for more information on obtaining manuals.
      IMPORTANT:  To help you use this guide, certain conventions have been followed.
      Instructions that you are required to enter at the terminal are typed on a
      separate line with the shortest allowable abbreviation capitalized.  Words
      appearing entirely in lowercase indicate arguments or options that are determined
      by what you want to accomplish.  Keywords appearing in a text line will be in
      uppercase.  Optional specifications will be enclosed in <> brackets.  Detailed
      information concerning all keywords used in this guide is available from HELP and
      in the CMS Reference Manual.  You should expect to refer to this manual often, at
      least until you become more familiar with using CMS.
      CMS can be accessed from  a terminal or a personal computer emulating a terminal.
      When "terminal" is used in this guide both possibilities are included.  The
      terminals that access CMS can be divided into two categories, 3270-type terminals
      and ASCII terminals.  Terminals and personal computers with software that provides
      all the functional capability of IBM 3270 terminals are considered 3270-type
      terminals.  These allow you to interact with the computer in a full-screen
      environment, with full use of menus and the CMS editor, XEDIT.
      The Televideo 910+ is an ASCII terminal, and this type of terminal can be found at
      cluster sites outside of McVey Hall.  ASCII terminal users are advised to use the
      7171 protocol converter, whenever possible.  All cluster site terminals are on the
      campus network.  When accessing CMS, these terminals connect through the 7171
      protocol converter.  The protocol converter, whether accessed from a personal
      computer or a cluster terminal, makes your terminal look like a 3270 terminal to
      CMS.  Terminals that are strictly ASCII, and unable to utilize the protocol
      converter, are restricted to line by line access to the computer.  Refer to
      Appendix A for information on attaching to UKCC.
      This guide emphasizes publicly available equipment.  If you have your own terminal
      or a personal computer with appropriate software, you may be able to take
      advantage of whatever special features it has.  In some cases, the 7171 protocol
      converter will not allow you to use the full-screen capabilities of CMS.  Contact
                                                          Section 1:  Introduction     1
      CMS Introductory Guide
      the Help Desk to see if support for your equipment is possible.  Check the CMS
      Reference Manual for information on communications relative to CMS.
      In preparing this guide, it is assumed you are using a 3270-type terminal.  You
      may have to refer to one of the HELP files until you become familiar with the
      keystroke equivalences if you are using a Televideo or some other terminal with
      the 7171 protocol converter.
    | The Information Systems Help Desk, in 107 McVey Hall on the Lexington Campus, is
    | open weekdays during regular business hours, with extended evening and weekend
    | hours when in fall and spring semesters.  The Help Desk may be contacted at any
    | time by phone (257-2249) or by e-mail (helpdesk@ukcc.uky.edu).
      Section 1.1 Logging On
      Logging on is the process of beginning a CMS session by connecting a terminal to
      the computer.
      To log on using a 3270-type terminal, use the following procedure.  Turn the
      terminal on if it is off; turn it off and then on if it is already on.  After a
      few seconds the UK logo should be visible.  If the terminal is already on but the
      screen is blank or if the screen remains blank after turning the terminal on, try
      adjusting the brightness control.  If you have just a cursor visible, press RESET
      then CLEAR to get the system's attention.  If that doesn't help, there is a
      hardware problem.  Try a different terminal and report the faulty terminal using
      SUGGEST.  SUGGEST is described later in this guide.
      After you see the UK logo, type your userid in the space next to the word LOGON
      and press the ENTER or RETURN key.  The ENTER and RETURN keys can be used
      interchangeably on most terminals that have them both, though some ASCII terminals
      have distinct functions for these keys.  The computer doesn't "see" anything you
      type until you ENTER it.  "Userid" is the CMS account name that you have been
      provided.  The system will respond with
      You now need to enter the password (associated with your userid).  Always remember
      to press the ENTER key.
      VM will respond with a logon message.  The appearance of this message indicates
      that you have successfully logged on.  The information in the message includes the
      date and time.  There may be a line referring to the online NEWS.  (This facility
      is described in a later section.)  CMS will display the "ready" message (which
      will look something like this):
           Ready;  T=0.21/0.38 13:47:20
      After each command is completed, CMS displays this ready message to indicate that
      it is ready for another command.  The message includes the amount of time (cpu and
                                                          Section 1:  Introduction     2
      CMS Introductory Guide
      clock) it took to process the last task and the time of day (using a 24-hour
      clock).  Remember, each time you issue a command you must press ENTER to send the
      command to the computer.  Nothing will happen until you do.
      You should change your password periodically as a security measure.  To do this,
      You will be prompted for the current password, and then the new password twice.
      None of your entries will be visible on the screen, so type carefully.  If you
      forget your password, it can be changed for you but your current password cannot
    | be determined.  Give written notification to the UKCC User Account Services Office
    | at 257-2212 between 8 a.m. and 5 p.m. weekdays if you need this service.
      Section 1.2 Logging Off
      When you are finished with your work log off by entering
      During the logoff you may get a message referring to reader spool files.  These
      are discussed later in this guide.
      Section 1.3 3270 Status Indicators
      3270-type terminals have two important status indicators which are implemented
      differently on different manufacturers' terminals.
      The first is a cluster of three indicators marked SYSTEM AVAILABLE, INSERT MODE,
      and INPUT INHIBITED.  (These indicators are only available on real 3270-type
      terminals, not with the 7171 protocol converter).  Some terminals have these
      indicators as LED lights beside the screen; others incorporate these indicators at
      the bottom of the screen.  Input is accepted from the keyboard only when SYSTEM
      AVAILABLE is on.  INSERT MODE is controlled by the INS MODE and RESET keys and is
      used for editing input lines, along with the DEL (character delete) key.  INPUT
      INHIBITED  means that the system is working on your last command or that something
      is wrong.  In either case, keyboard entry is not allowed.  This may indicate that
      you have tried to enter data in an area of the screen where data entry is not
      allowed (some terminals will BEEP if you attempt to type in a protected area).
      Press RESET and move the cursor to a valid input area if this is the case.  If the
      INPUT INHIBITED condition persists it may indicate a problem with your terminal or
      with the VM system and you may contact the Help Desk for assistance.
                                                          Section 1:  Introduction     3
      CMS Introductory Guide
      The second important indicator is the system message area in the lower right
      corner of the screen (available both on real 3270-type terminals and ASCII
      terminals using the 7171 protocol converter).  The message area will contain a
      status indicator and the system node identifier (the node will usually be UKCC).
      The status will be one of the following.
      RUNNING     Normal; CP and CMS commands may be entered.
      CP READ     A CP command is expected.  Enter BEGIN to return to CMS mode.  CP READ
                   is displayed before you log on.
      VM READ     CMS or a user program is waiting for input.
      NOT ACCEPTED   CMS or CP was busy when you tried to enter a command or data.  Wait
                   a few seconds and try again.
      MORE...     The screen is full, but the system has more information to display.
                   Press CLEAR or PA2 to see the new information.  Press ENTER to hold
                   the current screen for further examination.  If you don't press ENTER
                   within 60 seconds, the system will automatically clear the screen and
      HOLDING     The system has more information to display, but the screen is being
                   held.  You may hold the screen by pressing ENTER in response to a
                   MORE... prompt or the system will hold the screen if it contains a
                   message from another user.  Press CLEAR or PA2 to clear the screen
                   and continue.
                                                          Section 1:  Introduction     4
      CMS Introductory Guide
      Section 2:  Getting Help
      No one manual can cover every detail of the VM/CMS system.  You will need other
      manuals, depending on your use of CMS.  This section will cover obtaining online
      UKCC manuals and other ways of finding what you need.
      Section 2.1 Online HELP Facility
      CMS has an online HELP facility with information for every CMS command.  Use it by
      Then choose the topic you are interested in from the menu.  Instructions for using
      HELP are also available from HELP.  Type
          Help HELP
      Section 2.2 Editor Teaching Facility
      For getting started with the CMS file editor, XEDIT, try the SLFTEACH facility.
      After reading through this guide, log on to your userid, then enter
      This will put you into an online learning-by-doing environment.  You can try out
      commands as they are explained to you.
                                                          Section 2:  Getting Help     5
      CMS Introductory Guide
      Section 2.3 More Manuals
      UKCC manuals are available through the MANUAL command.  Enter
          Help MANUAL
      at the terminal or refer to the CMS Reference Manual.
      from a full-screen terminal will display a menu of all the manuals available
      online.  You can also get to the manual menu from VIEW which is described later.
      The recommended manual for CMS is the CMS Reference Manual.  The XEDIT Reference,
      an excerpt from the CMS Reference Manual, is sometimes handy to have as a separate
      document.  If you are using a 3270-type terminal, locate your cursor over the
      title of the manual you wish to print and press PF4 twice.  Manuals may also be
      browsed online by pressing PF2.  See the following section for more information on
      the BROWSE command.
      Two very good manuals on XEDIT are produced by IBM.  The VM System Product Editor
      Command and Macro Reference and the VM System Product Editor User's Guide are
      available from IBM.
      Section 2.4 Other Aids
      One way to keep track of recent changes to the system is the online NEWS, which is
      available from the VIEW command, Type
      to view at your terminal, news about recent changes and updates at UKCC and news
      from campus and the various network interest groups.
      You, too, have a voice.  You can send comments, gripes, questions and suggestions
      to us through the use of the GRIPE or SUGGEST commands (depending on your mood).
      Both of these commands put you into the MAIL environment.  See HELP for more
      After entering your comments (you are in XEDIT at this time), entering SEND or
      pressing PF5 twice will transmit your suggestion or gripe.  Comments are viewed
      regularly and an answer will be sent directly to your userid.
                                                          Section 2:  Getting Help     6
      CMS Introductory Guide
      Section 3:  Disk Files
      You have a limited amount of permanent disk space associated with your userid.
      This space is usually accessed as your A-disk.  CMS userids are opened with a
      certain amount of disk space, but can be expanded when the need arises.  Janet
      Hyatt or Larry Johnson in the User Account Services Office can help you with this.
      For a temporary solution, you can use TDISK to allocate temporary disk space (a
      short-term storage area).  Temporary disk disappears when you log off or DROP it.
      will allocate at least 256K of disk storage as your B-disk if the B filemode is
      unused (filemodes are discussed a little later).  You can get more by specifying
      the amount on the TDISK command.
          DROP B
      will RELEASE and DETACH your B-disk when you no longer need it.  Your account is
      charged for the TDISK at 3 times the normal disk space rate; if you have frequent
      need for TDISK it makes more sense to expand your A-disk.
      Section 3.1 Student Userids
      Student userids are initially set up with one cylinder (usually about 600K) of
      disk space.  If you need more permanent disk space, you can petition through your
      instructor to have your space allocation increased.
      Section 3.2 File Maintenance
      Under CMS a file is identified by a fileid with three parts:  the filename, the
      filetype, and the filemode.  The filemode, from this point on in this guide, will
      always be A1.  In most cases, the filemode is optional when referring to files.
      The filename and filetype can contain from one to eight characters (letters,
      numbers, and these seven special characters: @#$+-:_).  Choose filenames and
      filetypes that help to identify the contents of the file.
      You may not always be able to remember the names of all the files on your disk.
      You may need to look at a listing of all your fileids in order to remember exactly
      which file you want.
                                                            Section 3:  Disk Files     7
      CMS Introductory Guide
      The FLIST command provides this function for full-screen terminals.  If you are
      not using the 7171 protocol converter or a 3270-type terminal you can use LISTFILE
      or LISTX instead.  Refer to the CMS Reference Manual.
      by itself will give you a list of all the files on your A-disk.
          Flist filespec
      will give you a list of all the files that meet your specifications.  Enter
          Help FLIST
      for details on specifying a subset of your files or an explanation of the FLIST
      FLIST provides several subcommands to control the FLIST environment.  The bottom
      line on the screen will list numbers followed by commands. The number indicates
      which PFkey (Programmable Function key) is set to that function.  These key
      definitions are set for 3270-type terminals.  For ASCII terminals simulating a
      3270, look at the HELP 7171 file for that particular terminal.  For a Televideo
      955, for example, enter
          Help 7171 TVI955
      To XEDIT a file, move the cursor onto the same line as the fileid that you want
      and type Xedit (or press PF11 as indicated on the bottom line of the screen).
      Similarly, files can be erased by typing ERASE or BURN on the line next to the
      name of the file you want to remove and pressing ENTER.  The line and the file
      named on that line will disappear.  (Note that this will permanently remove the
      file from your disk--so be careful.)
      More specific information on the use of FLIST can be found in the CMS Reference
      There may be times when you want to erase files from your CMS userid without using
      FLIST.  You can use either ERASE or BURN for this function.  To do this you would
      enter either of these commands
          ERASE filename filetype <filemode>
          BURN filename filetype <filemode>
      where filename and filetype identify the file that you want erased.  Be sure to
      specify the filemode (location of file) when it is anything other than A.
          Rename oldfileid newfileid
      will change the name of a file from the old filename, filetype, and filemode to
      the new filename, filetype, and filemode as specified.
          COPYfile oldfileid newfileid
                                                            Section 3:  Disk Files     8
      CMS Introductory Guide
      will make an exact copy of an existing file and assign the name specified as
      newfileid.  COPYFILE has many options allowing certain lines or columns of files
      to be copied, even allowing the new material to overlay existing material in the
      output file.
      Section 3.3 Printing a File
      Attached to your virtual machine is a virtual printer which can be routed to a
      real printer or to your reader (a temporary storage area from which you can
      examine your output files).  A recommended practice is to always preview your
      printouts in your reader before sending them to a real printer.  To print a file
      stored on your disk, use the SPLPREP (pronounced spoolprep) and FPRINT commands to
      send the disk file to your reader.  Then after viewing the file with RBROWSE if
      you still want a hardcopy send the same file to a real printer with the OUTPUT
          SPLPREP  (Route *
          FPRINT filename filetype <filemode>
          RBrowse spoolno
          OUTPUT spoolno  ( Route Central <other options>
       or OUTPUT spoolno  ( Route Hot
      There are printers downstairs in the Computer Room, and printouts from these
      printers are collected by the Operations staff.  Printouts from your userid are
      filed according to a box code assigned to it.  To retrieve your output give the
      Operator the box code assigned to your userid.  To determine your box code use the
      FINDPRT command after your listing has finished printing.
      One of the SPLPREP functions is to set the destination of your printout.  The
      format of the SPLPREP command is
          SPLPREP device (Route destination other options
      where destination is Central for the printers in the Computer Room in the basement
      of McVey Hall.  The orientation of your printout can be either portrait or
      landscape when printing to a Central printer (the IBM 3800 in the Computer Room).
      Set the orientation using the PAGEDEF option on the OUTPUT or SPLPREP command.
      PAGEDEF DOC is portrait;  the default, PAGEDEF STD is landscape.
      To route output directly to the printers in the Computer Room, enter the following
          SPLPREP PRinter (Route Central
                                                            Section 3:  Disk Files     9
      CMS Introductory Guide
      Next, print the file,
          FPRINT filename filetype
      CMS will respond with the Job-number which will look something like nnnn, where
      nnnn represents a four-digit number.  Record these numbers to be sure you retrieve
      all your output.
      If you try to print a listing file received from running a job under MVS, you may
      get a message indicating that the records are too long.  Printers are restricted
      to lines of 132 characters.  MVS batch jobs add a leading 133rd character for
      carriage control; that is, it controls spacing on the printer.  Specifying
          FPRINT filename filetype (CC
      tells CMS that the file contains carriage control characters that should be used
      for line spacing.
      Section 3.4 Examining Disk Files
      Disk files can be examined using the TYPE or XEDIT commands.  The BROWSE command
      can be used only on 3270-type terminals.  The BROWSE environment is similar to the
      editor except you cannot make any modifications to the file.  When you only need
      to examine a file, BROWSE is cheaper and faster to use than the editor since the
      entire file isn't copied from disk as it is with XEDIT.  This command is issued
          BRowse filename filetype
      You can use the LOCATE command to look for specific character strings occurring in
      the file or you can just read from page to page using the FORWARD and BACKWARD
      commands.  In BROWSE, the LOCATE command is issued as
      where string is the sequence of characters you are searching for.  Trailing blanks
      can be included by closing the string with another slash (/).
      Further details on BROWSE, including the default PFkey settings, are available
      from HELP.
                                                           Section 3:  Disk Files     10
      CMS Introductory Guide
      Section 3.5 Using the Editor
      This section gives a very broad overview of the CMS file editor.  The UKCC
      strongly recommends that you spend a little time learning the editor online with
      the SLFTEACH package.  Log on using the instructions at the beginning of this
      guide and enter the command
      On 3270 terminals the VM Editor (XEDIT) is a full-screen editor allowing the user
      to tailor the screen environment by using a PROFILE XEDIT file.  The commands to
      do this are documented in the CMS Reference Manual and the XEDIT Reference.  XEDIT
      provides default PFkey settings and a default environment.  As you become more
      familiar with CMS and XEDIT, you may want to create your own PROFILE XEDIT file to
      obtain the desired environment.  A sample PROFILE XEDIT file called SAMPLE XEDIT Y
      (where Y is the filemode) can be used as a model.
      On ASCII terminals, XEDIT is a sophisticated line editor that gives you full
      control of cursor positioning.  We will not cover this aspect of XEDIT in this
      To create or modify a file, type
          Xedit filename filetype
      where filename and filetype identify the file you want.
      For example, if you were going to build a file to contain a program for a class,
      you might choose the filename PROG1 and the filetype FORTRAN (remember, the
      filemode will be A1).  To begin editing this file, issue the command
          Xedit PROG1 FORTRAN
      This action will put you into XEDIT.  A very brief example of using XEDIT to
      create a file is included in Appendix D.
      XEDIT will fill the screen with a copy of your file on which you can make your
      changes.  Typing directly on the screen will make those changes in the work file.
      Issuing a SAVE or FILE command will store those changes permanently on your disk
      file.  In most cases, everything that you type will be in lowercase (unless you
      depress the shift key) and, when you press ENTER, will be translated into
      uppercase.  Files with a filetype of SAS, MEMO, SCRIPT, LISTING and some others
      will not do this translation.
      The top line of the screen, from left to right, will look something like this:
      PROG1    FORTRAN    A1  F 80  TRUNC=80 SIZE=0   LINE=0   COL=0 ALT=0
          PROG1          ----->  the filename that you specified
          FORTRAN        ----->  the filetype that you specified
          A1             ----->  the filemode (A1 is default)
                                                           Section 3:  Disk Files     11
      CMS Introductory Guide
          F 80           ----->  fixed record size (80 chars)
          TRUNC=80       ----->  truncate all characters after 80 per line (see note 1)
          SIZE=0         ----->  the number of lines in the file (see note 2)
          LINE=0         ----->  the line number of the current line
          COL=1          ----->  this parameter is related to cursor addressing (see
                          note 3)
          ALT=0          ----->  the number of lines that are different from the copy
                                  that is currently on disk.  Pressing the ENTER key
                                  updates this number after making a change.
               TRUNC means truncation column.  TRUNC=80 means that if you type more than
               80 characters in a line the additional characters are rejected by the
               Since you haven't entered any data yet, this file contains zero lines.
               This parameter is obscure for the beginning user.  However, if using the
               line-editor mode of XEDIT, or if programmming with EXECs or XEDIT macros,
               cursor addressing may prove useful.  Refer to the CMS Reference Manual.
      The XEDIT display screen can be modified to suit your preferences, but by default
      the left-hand side of the screen consists of a column of five characters called
      the prefix field. The prefix field is an area that accepts prefix commands.  For
      instance, if you wanted to add a line at a specific point in the file, you would
      move the cursor into the prefix field of the line which you wanted the new line to
      follow, type an 'a' (for add), and press ENTER. For five lines, simply type '5a'
      or 'a5'.  To delete a line, use a 'd' in the prefix area.  A double quote (")
      would duplicate the line.  There are other prefix commands for copying, deleting,
      and moving blocks of lines.  Refer to your manuals for details.
      At about the middle of the screen is the SCALE line.  This line numbers the
      columns on the screen and can help you format your file.  Every tenth column is
      marked with a digit denoting which decade it starts.  The highlighted line just
      below the SCALE line is called the "current line".  The current line determines
      the starting location for many XEDIT commands.
      The next-to-last line of the screen (marked with an arrow) is called the command
      line.  This is where editor commands are entered to manipulate the file.  Here are
      some of the commands that you might use.
          SAVE      -----> Stores the current file under the filename
                            and filetype that are on the first  line  of
                            the  screen.  Specifying another name with
                            the SAVE command would create  a  new file
                            with the  new  name  leaving the original
                            file unchanged.
          FILE      -----> Same as SAVE except you leave the XEDIT
                                           Section 3:  Disk Files     12
      CMS Introductory Guide
          QUIT      -----> Leave the XEDIT environment. Do not rewrite
                            the file to disk.
          QQuit     -----> Same as QUIT. QQUIT must be used if any
                            changes have been made and you don't want to
                            save them.
          Input     -----> This command puts the editor into INPUT mode.
                            Lines are created as needed. To leave INPUT
                            mode, press ENTER twice.
          Add nn    -----> Add nn lines following the current line.
          DELete nn -----> Delete nn lines beginning with the current
          Find str  -----> Find the next line where str occurs starting
                            in column 1.
          Locate /str      ----->   Find the next line in which str
                            occurs.  LOCATE can be issued in two ways.
                                Locate /string
                                  or simply,
                            where string is the sequence of characters
                            you are searching for.  Using the first
                            alternative the / (slash) can be any
                            character used as a delimiter.  This is
                            helpful when the string contains a slash.
                            To include trailing blanks, close the string
                            with another delimiter.
                                L.6/30/92  .
                            This will locate the string "6/30/92  "
                            including the last blanks.
          Change    -----> To make global or local changes to your file,
                            use the CHANGE command.  The syntax is
                         Change/old string/new string/ lines times first
                            where lines is the number of lines affected
                            starting with the current line, times is the
                            number of times in each line that the change
                            should be made, and first indicates which
                            occurrence is the first to be changed.  Use
                            an * for lines to change all lines to the
                            bottom of the file.  An * for times means
                            every occurrence in each line.  If lines,
                            times, and first are omitted then only the
                                           Section 3:  Disk Files     13
      CMS Introductory Guide
                            first occurrence on the current line is
          TOP       -----> Make the top of the file the current line.
          BOTtom    -----> Make the bottom of the file the current line.
          Down nn   -----> Move DOWN the file nn lines.
          Up nn     -----> Move UP the file nn lines.
      Section 3.6 Sharing Disks and Files
      If someone needs a file that you have, use
          SHIP filename filetype userid
      where userid is the userid of the person wanting the file.  SHIP puts the file
      into the other user's reader in a special format.  The other user can store the
      file by using the ACCEPT command.
      If someone needs access to your entire A-disk, you can allow the other user to
      LINK by issuing the AUTOLINK command
          AUTOLINK AUTHorize 191 level USER userid
      where userid is the user that will now be allowed access to your disk.  Level can
      be any of,
      R    for read only (R/O) access.
      W    to allow write access only if there are no other links to the disk.
      M    to allow the other userid to modify files on your disk even if there are
           currently other R/O links.
      Once another user has been authorized to LINK, that user can access your disk by
          GRAB userid
      Unless other options are specified, GRAB will establish a R/O link to your disk as
      a B-disk (unless there already is a B-disk).
      A and B are examples of the use of the filemode.  When adding disks or links to
      disks, each disk is associated with a filemode.  By specifying the filemode on
      your CMS commands, you can reference any of these disks.  Filemodes are important
      in another way, too.  Disks are searched in alphabetical order; where you store
      files affects search time and the costs associated with it.  Also if you have two
      files with the same filename and filetype on different disks, then referencing the
                                                           Section 3:  Disk Files     14
      CMS Introductory Guide
      file without specifying the filemode will only find the first file in the search
      Any number of userids can link to your disk at one time (but only one R/W link is
      allowed).  When a GRAB is done, the GRABbing userid gets a "snapshot" of the disk
      it has GRABbed.  If any files are changed while the LINK is in effect, those
      changes are unknown to the GRABber.  Files with a filemode number of 0 (A0, B0,
      etc) are usually invisible to GRABbing userids.  But don't depend on this rule for
      privacy.  Never give another userid access to a disk that has files on it that
      you'd rather keep private.
    | Section 3.7 BITNET and Internet
    | BITNET is an international computer network of universities and research
    | institutions.  BITNET allows any CMS user to exchange messages and files with
    | users at many other locations.  In addition to direct access to BITNET nodes
    | (computer systems), access is available through "gateways" to several other
    | organizations on the Internet.  A gateway is a node on BITNET that also is a node
    | on another network and provides access to that network for BITNET members.
    | BITNET is intended for educational and research use; commercial use is not
    | allowed.  It should not be considered secure and should not be used for
    | confidential or sensitive information.  Proprietary software should not be sent
    | over BITNET.
    | The MAIL command can be used to send a message to a user at another BITNET node
    | (or at the UKCC).  MAIL also supports the gateways to other networks; refer to the
    | HELP information for details.
    | To communicate with a user at a BITNET node, you can use the SHIP, MAIL, and TELL
    | commands.  The SHIP and MAIL commands can also be used to communicate with users
    | on another network accessible through a gateway.  More information about these
    | commands is available from the HELP command, and some additional information can
    | be found by examining the files on the BITNET minidisk (GRAB BITNET for access).
    | You may also refer to the BITNET Introduction available through the MANUAL
    | facility.
    | On BITNET, the UKCC VM system is node UKCC.  On the Internet, this system is node
    | Remote access to computers at other institutions on the Internet is available
    | through the TELNET command.  The FTP command provides file transfer to and from
    | computers on the Internet.  The GOPHER command can be used to bring up menus
    | allowing you to explore Gopherspace on the Internet.  Similarly, the WWW command
    | can be used to bring up a text-only client program for exploring the World-Wide
    | Web.  For more information on Internet services, contact the Information Systems
    | Help Desk in 107 McVey Hall (e-mail:  helpdesk@ukcc.uky.edu or phone: 257-2249).
                                                           Section 3:  Disk Files     15
      CMS Introductory Guide
      Section 3.8 PUBLIC
      PUBLIC makes another disk accessible to CMS users.  Commands and EXECs written by
      users and submitted to be shared are available through the PUBLIC disk.  Enter
          Help PUBLIC
      if you are interested in this command.
      If you have developed an EXEC, program, or package that you believe would be of
      use to other users at the UKCC, use the SUGGEST command to let us know about it.
      Someone will contact you to get further details.  Be sure to prepare a HELP file
      using the existing HELP files on the PUBLIC disk as models.
                                                           Section 3:  Disk Files     16
      CMS Introductory Guide
      Section 4:  Spool Files
      Spool files are temporary files used to communicate with another user or a batch
      system.  They are also used to preview files to be printed.  You are charged for
      spool files based on their size and how long you keep them.  The rate for spool
      files is 3 times the rate for permanent disk space.  Associated with your userid
      is an input device called a "reader" which allows you to access spool files.
      When you log on, CMS will tell you if there are spool files waiting in your
      reader.  If there are files in your reader when you log off, CMS will ask you what
      to do with them.  You can keep the files, delete some or all of them, or cancel
      the LOGOFF (with ESCAPE) so that you can print the files (using OUTPUT), or ACCEPT
      the file(s) to disk.  You will have to answer (by at least pressing ENTER) before
      you will be allowed to successfully log off.
      Spool files are retained for at least one week.  They are then PURGEd by the
      system to prevent the system spool space from filling.  Please minimize the amount
      of time that a file waits in your reader before being OUTPUT, ACCEPTed, or PURGEd.
      Most of the time you should keep no files in your reader.
      RDRLIST (or RLIST) can be used to display the contents of your reader the same way
      FLIST displays your disk files.
          RList or
      In the input area of each line, you can type commands to be executed against the
      spool file listed on that line.  PF10 is set to RBROWSE.  Or you can find the
      spool numbers associated with your spool files by issuing the command,
          Query Reader ALL
      If you do not specify the four-digit number of a specific file, CMS will use the
      first file in your reader when executing the commands described below.
      Section 4.1 Examining Spool Files
      The LOOK command can be used from any type of terminal to examine spool files.
      LOOK is an EXEC that determines what type of format the spool file is.  It then
      uses RBROWSE or PEEK to display the file depending on its format and the type of
      terminal you are using.  RBROWSE allows you to BROWSE spool files from 3270
      terminals.  PEEK is an EXEC that uses XEDIT to display a spool file.  You can use
      these commands directly
          RBrowse spoolno
          PEEK spoolno (FROM nnnn  FOR mmmm
                                                          Section 4:  Spool Files     17
      CMS Introductory Guide
      or let LOOK take care of the details
          LOOK spoolno < (options >
      PEEK will only show the first 200 lines of the spool file, unless values are given
      for nnnn and mmmm.  (You may use the menu-driven OPTIONS command to set the
      defaults for PEEK to FROM 1 FOR *.)  RBROWSE operates like BROWSE; refer to the
      subsection "Examining Disk Files" for more information.
      Section 4.2 Printing Spool Files
      If you want a printed copy, use the OUTPUT command to print the spool file.
      GATHER and REPRINT can also be helpful if you want to send a group of spool files
      to the same printer or if you want to retain the spool file(s) while also getting
      a printed copy.  See your manuals for details on these commands or use the HELP
      Once a spool or disk file has been routed to print, you may use the FINDPRT
      command to determine when it has completed printing.  See the section "Printer and
      Plotter Output" for more information.
      Section 4.3 ACCEPTing Spool Files
      To bring a spool file into your permanent disk space, enter ACCEPT.  Like LOOK,
      ACCEPT identifies the format of the spool file and uses the appropriate command to
      put it on disk.
          ACCEPT spoolid
      As a precaution, the system checks to see if you already have a file with the same
      fileid on your disk when you try to ACCEPT a spool file.  If the file exists, the
      new file will not be accepted.  A message stating that the file already exists
      will be displayed.  To assign a new name to the incoming file, type:
          ACCEPT spoolid * A filename filetype
      You could also RENAME the existing file or use the REPLACE option with ACCEPT if
      the original file is no longer needed.
                                                          Section 4:  Spool Files     18
      CMS Introductory Guide
      Section 5:  Text Formatting
      There are two packages available for formatting long documents at UKCC, each with
      its special strengths.  Both LaTeX and Waterloo SCRIPT are very powerful and
      flexible text formatters.  This guide was formatted using SCRIPT.
      Section 5.1 Using SCRIPT
      In your source file you may combine lines of text with SCRIPT control words and,
      after processing by SCRIPT, the output file is very nicely formatted according to
      the control words used.
      Extensive documentation is available for SCRIPT with the MANUAL command and the
      HELP facility.  If you will be producing long papers, you may also be interested
      in using GML (also documented on MANUAL).  Generalized Markup Language is a
      collection of SCRIPT macros (short programs) distributed and maintained by the
      University of Waterloo (which is also responsible for SCRIPT).  These macros take
      most of the agony out of producing things like tables of contents, footnotes,
      bibliographies, figures, tables, title pages, and chapter and section headings.
      To format a document with SCRIPT, use XEDIT to create a file containing all the
      text and SCRIPT commands.  Then, enter the SCRIPT command to process the file.
      How you do this depends on where you want the output routed.  A good method is to
      follow this example,
          SPLPREP PR ( TO *
          SCript filename (PRint
      where filename is the filename of your SCRIPT file (the filetype must be SCRIPT).
      This sequence of commands creates a spool file in your reader.  Examine the file
      with RBrowse to determine whether or not a printed copy is desired.  Often many
      iterations of editing can be performed without waiting for a printout.  When you
      are ready for a printed copy you can use
          OUTPUT ( PAGEDef DOC
      to print the file from your reader.  See the section "Printer and Plotter Output"
      for information on tracking files sent to a printer.
      Other SCRIPT options allow you to route the output to other media.  The DISK
      option will store the formatted file with carriage control on your disk while the
      MEMO option will store the formatted file with no carriage control on your disk.
      A MEMO file can be downloaded to a microcomputer and imported into your favorite
      word processor.  Features such as bolding and underscoring are not useful with
                                                      Section 5:  Text Formatting     19
      CMS Introductory Guide
      MEMO.  Entering the SCRIPT command with no options at all, will send the output to
      your terminal.  This is only useful for small files, such as memos or letters.
    | Using Laser Printers for Final Copies
      Rough copies for editing can be printed CENTRAL using the method described above.
    | When you are ready for your final copy output, use the a laser printer in the King
    | Microlab (CCUSER1) or one in the BEIC Microlab (CCUSER2), which produce crisp,
    | near typeset-quality output.  You must provide any special paper you may need.
    | Usually, it's better to produce one copy on the standard paper provided by the
    | UKCC and then have extra copies made at a copy shop on the paper of your choice.
    | To send SCRIPT output to one of these laser printers, use the LWSCRIPT command
    | followed by the option CCUSER1 or CCUSER2.
    |     LWSCript filename ( CCUSER1
    | To print preformatted files on the LaserWriter, use LWPRINT.
    |     LWPRint filename filetype ( CCUSER1
      See the HELP files for more information on LWSCRIPT and LWPRINT.  Each of these
      commands has many options for making your document look more professional.
      Section 5.2 Using LaTeX
      TeX (pronounced Tek -- the X is actually chi) was developed by Donald Knuth and is
      implemented on IBM CMS as LaTeX.  It is now the official text processing language
      of the American Mathematical Society and features compatibility with many computer
      systems.  To access the LaTeX programs you must GRAB the TeX disks.
          GRAB TEX
          GRAB TEX 291
      Details are available from HELP TEX after GRABbing the disks.  There are also
      several sample program files to help you get started.  Copies of A Gentle
      Introduction to TeX are available at the Help Desk in 107 McVey Hall.
      To preview your TeX documents on CMS use the TEXVIEW command.  This requires use
      of an IBM 3179 or compatible terminal.  When you are ready for hardcopy, you can
      print the output to an Apple LaserWriter or to the IBM 3800 page printer.
      LATEXPRT is used to print to the LaserWriter.  DVI3800 will prepare a file to be
      printed on the IBM 3800.
                                                      Section 5:  Text Formatting     20
      CMS Introductory Guide
      Section 6:  Interactive Programming
      CMS allows you to run your programs interactively.  This means that your program
      is run while you wait and that data can be entered directly at the terminal while
      the program is running.  An alternative is to store the data in another CMS file.
      Storing the data in a file allows testing of the program with exactly the same
      data used for each run, and it is usually more convenient for large amounts of
      data.  See the subsection "File Definitions" to see how to make these
      Program results can be displayed at your terminal, put into a spool file for
      examination with LOOK and possible printing, or written to a disk file for further
      analysis by another program.
      Section 6.1 Programming Languages under CMS
      CMS supports several languages.  Complete details on all languages are available
      in their respective user's guides and reference manuals.
      To compile a program under CMS the record format (RECFM) of the program file
      usually must be fixed (F).  When XEDIT is used to create a program file the RECFM
      defaults to F.  However, should you be in the position of having a variable length
      (V) file, you can easily make it fixed length by XEDITing the file and issuing the
          RECFm F
      and then FILEing the file.  This is also often true of any data files used.  Most
      compilers require a specific filetype as well.  For instance, VS FORTRAN requires
      the program file to have a filetype of FORTRAN.
      HELP files for each of the compilers are available with detailed instructions for
      using each of them.  Some general similarities will be dealt with in this guide.
                                              Section 6:  Interactive Programming     21
      CMS Introductory Guide
      Section 6.2 File Definitions
      Many programming languages (such as FORTRAN, for example) require that you define
      input and output files with the FILEDEF command.  The manuals for each language
      processor should be consulted for further details since each language has its own
      requirements.  In FORTRAN, for instance, reading and writing is done with regard
      to logical units identified by a number in the READ or WRITE statement.  Units 5
      and 6 usually refer to the terminal.  (The WATFIV interface issues its own
      FILEDEFs for units 5 and 6.  If you are using WATFIV do not issue FILEDEFs for
      these units.  That will only get you in trouble.)
      To make these associations for FORTRAN, issue the commands
          FIledef 5 Terminal
          FIledef 6 Terminal
      Most of the FORTRAN compilers at UKCC issue their own FILEDEFs for these units.
      Other languages may use a name instead of a unit number to reference a file.  To
      verify what associations have already been set enter the command,
      This will display all FILEDEF settings currently in effect.
      To read from a CMS file named PROG1 DATA using unit 8 in FORTRAN use this FILEDEF
          FIledef 8 DISK PROG1 DATA
      Most language processors clear all non-permanent FILEDEF associations after each
      execution.  To prevent this, add the PERM option when issuing a FILEDEF.  For
          FIledef 8 DISK PROG1 DATA (PERM
      FILEDEF associations remain in effect for the whole session when the PERM option
      is specified, but all FILEDEFs always disappear when you log off, HX, IPL, or if
      your program ABENDs (terminates because of a major error).
      To clear all non-PERManent FILEDEFs, issue the command
          FIledef * CLEAR
      To clear a PERManent FILEDEF you must specify the unit number or DDname.  For
          FIledef 8 CLEAR
      Further details on FILEDEF can be found in the CMS Reference Manual or with HELP.
                                              Section 6:  Interactive Programming     22
      CMS Introductory Guide
      Section 6.3 Subroutine Libraries
      The GLOBAL command is used to make libraries of subroutines available for later
      processing of CMS commands.  Some languages require the use of system libraries to
      do I/O and other mundane tasks.
      A TXTLIB is a library of subroutine object (TEXT) files stored together in one
      file.  To make them available, enter
          GLobal TXTLIB librarynames
      where "librarynames" are the filenames of the TXTLIB files.  See Appendix C for a
      list of available libraries.
      A MACLIB is a collection of source files (uncompiled programs) or macros stored
      together in one file.  The MACLIST command will display an FLIST-like screen of
      maclib members.  This is a good way to keep logically-related source files in one
      place.  To make a source library available issue the command
          GLobal MACLIB librarynames
          Query LIBRARY
      will list all currently GLOBALed libraries.
      Subroutine libraries used by a WATFIV program must be MACLIB files.
      Section 6.4 Executing Your Program
      Appendix C lists software available under CMS.  Refer to the specific HELP files
      for the commands you will be using.  In Appendix D a sample session creates a
      FORTRAN file using XEDIT.  The program is then executed under WATFOR77 using
      terminal I/O for data and output.  Follow this example to get some experience in
      interactive programming under CMS.
      Section 6.5 Increasing Storage
      When you log on, you are given a machine with 4M (1 megabyte is 1,048,576 or 1024
      times 1024 bytes) of storage.  If you find you need more storage (e.g., you may
      need to XEDIT a rather large file or you may want to compile a large program), use
      the STORAGE command to define a machine of 6 megabytes.
          STORAGE 6M
                                              Section 6:  Interactive Programming     23
      CMS Introductory Guide
      defines a larger machine.  (If you find that you need more than 6 megabytes, see
      the subsection "VM Batch".)  For some software applications you may need to define
      a machine larger than 4M but first you need to get approval through the User
      Account Services Office, Room 130 McVey Hall.
         Issuing the STORAGE command causes an IPL (Initial Program Load) so, if you had
      FILEDEFs defined or TDISK accessed, you'll need to re-define the FILEDEFs and/or
      re-access the temporary disk.
      Section 6.6 DLIST
      The DLIST command uses a full-screen menu to display all the disks attached to
      your userid whether accessed or not.  DLIST is a command on the Public disk so you
      must access the Public disk before you can use it.  From the DLIST screen you can
      re-access any disks you may have inadvertently released.  Position your cursor on
      the disk you wish to re-access and press PF5.  The HELP file has further details.
      Section 6.7 Saving Disk Space
      Compiling a program under CMS creates an object code file with filetype TEXT.
      This file is usually written on your A-disk.  You must have enough room for it or
      the compilation will fail.  Normally, compiling also creates a LISTING file on
      your A-disk.  You can conserve disk space by routing the listing file to your
      reader with these commands.
          SPLPREP PR ( TO *
      Then use the appropriate compiler option, usually PRINT.  Use RBROWSE to examine
      the results and, if desired, use OUTPUT to send them to a printer.  Some compilers
      also require workfiles on a R/W disk.  TDISK will help in these instances if
      you're short on permanent disk space.
      Section 6.8 Watching Your CPU Usage
      There's always the chance of including a non-terminating loop in a program.  This
      is especially important under CMS since there's no easy way of limiting a
      program's use of CPU time.  If you think your program is "running away", you can
      try to interrupt it.  HX (Halt eXecution) should stop the execution of any CMS
      command.  If this doesn't work, try to get the attention of the Control Program by
      pressing PA1.  This will give you a CP Read status; from here you can IPL.  This
      will restart your CMS session and should fix almost any problem.
                                              Section 6:  Interactive Programming     24
      CMS Introductory Guide
          Ipl CMS
      is the command to cause an Initial Program Load.  This is like "booting" or
      pressing RESET on a microcomputer.  From a non-3270 type terminal, the command
          #CP Ipl CMS
      should perform the same function.
                                              Section 6:  Interactive Programming     25
      CMS Introductory Guide
      Section 7:  Batch Programming
      Programs written under CMS can be executed 1) interactively, 2) through the VM
      Batch system, or 3) through MVS batch.  In deciding which way to go, consider
      factors of cost and time.
      Files to be printed are sent to JES; programs SUBMITted for execution are sent to
      MVS or VM Batch.  Anything sent to VM Batch, JES, or MVS is considered to be a
      "job".  With VM and MVS batch, programs can be executed with a limited amount of
      CPU time allowed for the program to complete.  If the program does not complete in
      the allotted time, the job ABENDs (ABnormal END).  VM and MVS batch jobs can also
      be held to run during slack periods of the day when rates are lower.  But
      sometimes fast turnaround is more important than reducing costs.
      Section 7.1 VM Batch
      Almost anything that you can do at a terminal under CMS can be done in a VM Batch
      job.  However, since the job is running in a batch environment, all data must come
      from a disk file; the keyboard cannot be used to control program execution.  Put
      program statements to be executed in VM Batch into an EXEC file written in REXX.
      Output can be routed to a spool file or a disk file that is subsequently sent to
      your userid with SHIP.
      When a job goes into execution under VM Batch, a batch server is logged on to
      process the job file.  This batch server has up to 100 megabytes of storage
      available.  The batch server is allowed read-only access to your A-disk (and your
      D-disk if you have one).  All spool files generated by the batch server are
      returned to the userid that submitted the job.  This includes a console listing
      that keeps a record of everything done during the server's session.
      If VM Batch sounds useful to you, you should look for more information in the HELP
      file.  Type
          Help VMBATCH
          Help BATCH
                                                    Section 7:  Batch Programming     26
      CMS Introductory Guide
      Section 7.2 MVS Batch
      The UKCC currently supports MVS/ESA.  The SUBMIT command is used to send jobs to
      be executed by the MVS batch system.  The STATUS command is used to inquire as to
      the progress of the job.  Each userid has a batch system set as a default for all
      commands that relate to a batch system.  The default batch system for your userid
      can be changed using the OPTIONS command or by typing
          BATCHSYS CMS
          BATCHSYS MVS
      You can also specify the intended batch system as an option on the SUBMIT and
      STATUS commands.  See the HELP files for more information on these commands.
      Running jobs under MVS requires you to have all the data set up before submission
      and to include IBM JCL to control the execution of your job.  If you need to use
      tapes or MVS disk you must use MVS Batch.  Tapes and MVS rental disk are usually
      used for applications requiring very large datasets.
      To run a job under MVS, first create the file using XEDIT and check it for obvious
      errors.  Then,
          SUBMIT filename filetype ( <TO> batch_system <Route> output_destination
      will send the file to the default or specified batch_system to be set up for
      execution.  SUBMIT subcommands can be embedded in the file being submitted and are
      processed at the time of submission.  For instance, if the line,
          ..INClude filename filetype
      is in your file, SUBMIT will send the entire named file in the place of the
      ..INCLUDE record when sending the file to the designated batch system.  If you
      want to execute your program with several different data files, you can have a JCL
      file that INCLUDEs a program file and a data file.  By changing the name of the
      data file in the JCL file, different data is processed by your program.  There's
      no need to keep a copy of the entire program with each set of data.
      Output_destination determines where your job output will be sent.  It's usually a
      good idea to route the output back to your reader for examination with RBROWSE
      before deciding whether or not to print it.  This saves printing costs and waiting
      for the job to be printed.
                                                    Section 7:  Batch Programming     27
      CMS Introductory Guide
      Section 8:  Printer and Plotter Output
      Section 8.1 Tracking Your Output
      You can determine what's happened to your output with the following commands.
      The STATUS command will keep track of your jobs while they are waiting to execute
      and are in execution under MVS or VM batch.  STATUS will keep track of them until
      they complete execution and are spooled for output processing.  STATUS will not
      return the status of jobs that have completed execution and are being printed; nor
      will STATUS return the status of jobs that are being printed with the OUTPUT or
      FPRINT commands from CMS.  To check on jobs that are running under your default
      batch system enter this command as
      You can also specify
          STATUS (MVS
          STATUS (CMS
      to query a job running under the system that is not your default batch system.
      For MVS the response will look like this:
         Job# Jobname  Last Activity     Awaiting     Execution     Output         (Records)
         7848 PROG2    10:20 XEQA
      and indicates that PROG2 is awaiting execution in the A queue.
         If you forget your job number or you want to verify what jobs have completed
      execution, use the JOBS command for MVS jobs.
          JOBS  day
      where day indicates what day the job completed.  Day starts counting with today
      being zero (0); yesterday is 1 (up to 4 for four days ago).  If the job ran today,
      just type
      The system response will look like this
         Job# Jobname  Last Activity     Reader       Execution     Output         (Records)
         7848 PROG2    09:52 PURGED  09:50 L8.JR1 09:50 09:51 09:50 L8.JR1   843
      This indicates one job ran with the job number 7848, that it had completed
      execution at 09:51, 843 lines of output were spooled and the completed job was
      purged normally.
                                           Section 8:  Printer and Plotter Output     28
      CMS Introductory Guide
         Note your job numbers for printing done via the OUTPUT or FPRINT CMS commands
      at the time the initial message is sent to your terminal.  If you fail to do so,
      they may be retrieved by using the CMS FINDPRT command.  FINDPRT is also used to
      determine when and where a given output file was printed.  It must be remembered
      that FINDPRT can only locate the job number of output that has finished printing.
      Jobs that are queued awaiting printing are not listed by FINDPRT or by the STATUS
      command (see JES $D below).  FINDPRT is used to determine when jobs have actually
      completed printing.  The format for the FINDPRT command is,
          FINDPRT  <day>
      where day can be omitted for output printed today.  The numbers 1 through 4 are
      valid parameters allowing you to retrieve job numbers from as far back as four
      days previous to the current day just as with the JOBS command.
          FINDPRT  1
      would be used to retrieve the job numbers of all jobs printed on the previous day.
      The system response looks like,
         USR204        6731          PROG2         P1       17:44      01/13      2473       AA11
      A PRT entry of NOP means that the job was canceled without a printout.  P1, P3,
      and P4 are in the Computer Room; you will need your box code to pick up your
      printout at the Data Center.
         If your output has not printed, but you believe it is in a print queue, you may
      issue the JES command $DJspoolid to locate it.  For example, to see if job number
      7848 is queued, issue the command
          JES  $DJ7848
         You may also use JES  commands to recover the job numbers of output should you
      lose those job numbers.  This is done by issuing the command,
          JES  $D'jobname'
      where jobname is the name specified on the //jobname JOB statement.  This command
      will only report on jobs that are still in the system.  Once a job has completed
      execution and printing, this command cannot locate the job.
                                           Section 8:  Printer and Plotter Output     29
      CMS Introductory Guide
      Section 8.2 Graphing and Plotting Options
      A number of graphics systems are available to IBM mainframe users.  There are
      interactive menu-driven graphing systems, Fortran subroutine systems, and
      procedural systems such as SAS/GRAPH.  Most of these systems permit LaserWriter
      output.  Some allow for output to pen plotters, e.g., Hewlett Packard, Zeta, etc.
      For each system a reference manual and/or online help facility is available.
      SAS/GRAPH  SAS/GRAPH is a set of graphics procedures associated with
                 SAS.  You may select from several output devices at run time.
                 Two- and three-dimensional plots of datasets are easily
                 GRAB SAS for access to SAS/GRAPH PROCedures and HELP files.
    |            MANUAL BROWSE SASGRAPH for access to a reference manual.
      ICU           Interactive Chart Utility is a powerful menu-driven graphing
                 system which is part of the IBM GDDM library.  It is easily
                 accessed by simply typing 'ICU' at the CMS prompt.  Again,
                 documentation is available.  But, because of the extensive
                 built-in HELP facility, it may not be needed.
                 ICU is loaded with excellent data graphing features, and will
                 produce a number of common 2D and 3D graph styles.  It is,
                 however, limited in its output capabilities to IBM GDDM
                 devices (such as IBM 3179 G or IBM 3192 G terminals) or files.
      Zeta subs    Jobs using the Zeta subroutine library can be submitted to MVS
                 and a plot file returned to your CMS userid.  Plot files can be
                 sent to the Zeta plotter or to a laser printer in one
                 of the microlabs for hardcopy.  If you are using MVS Batch,
                 submit your plot job with the following statement included in
                 the JCL and route the output to your reader.
                   //PLOTTAPE  DD SYSOUT=B,DCB=(RECFM=F,LRECL=80,BLKSIZE=80)
                 Two files will be returned from MVS, a PRT file and a PUN file.
                 ACCEPT the PUN file; this file contains the plotter commands.
                 If you are using CMS, issue these commands
                 SPLPREP PUN ( TO *
                 FIledef PLOTTAPE PUnch
                 The plot file will be returned to your reader as a spool file.
                 ACCEPT the file.  Once you have the plot file on disk you can
                 plot the file either at an Apple LaserWriter or on the Zeta
                 pen plotter.  To route the plot to a LaserWriter use
                                           Section 8:  Printer and Plotter Output     30
      CMS Introductory Guide
                 LWPLOT filename filetype (CCUSER
                 To send the plot to the Zeta plotter, log on to the plotter-
                 attached terminal in 104 McVey Hall and use the APRINT command
                 or use
                 PLOT filename filetype
                 to have someone do it for you.  These plots will be stored in
                 the Data Center with printed output.  Use your box code to
                 retrieve them.
                                           Section 8:  Printer and Plotter Output     31
      CMS Introductory Guide
    | APPENDIX. A:   Attaching to UKCC (or GW)
    | Full-screen support for ASCII terminals and personal computers is available on
    | UKCC (or GW, the gateway machine).  A terminal connected in this way is treated by
    | CMS as if it were a 3270.  This allows you to use screen-oriented commands (like
    | FLIST and XEDIT), gives you Program Function (PF) keys, and allows easier input
    | editing.
    | There are many different kinds of ASCII terminals and differences in the keyboards
    | and control codes that they use.  Support is available now for several TeleVideo
    | models, DEC VT100s, Lear Siegler ADM-3As, Apple Macintoshes with Kermit or
    | MacTerminal, IBM Personal Computers with Kermit or Yterm, and others.  Some brands
    | and models that are compatible with one of these probably will work also.  (If
    | your terminal is not supported use the SUGGEST command to ask for more
    | information.)
    | Use these communication settings with a modem:
    |    Full-Duplex
    |    8 Data Bits
    |    1 Stop Bit
    |    No Parity
    | You may use a baud setting of 300, 1200, 2400, 9600, 14.4K, or 28.8K.
    | When you are ready to end your terminal session be sure to LOGoff or DISConnect.
    | You should then drop your connection to UKnet to make the port available for
    | someone else.
                                          Appendix. A:  Attaching to UKCC (or GW)     32
      CMS Introductory Guide
      APPENDIX. B:   Logging On with an ASCII Terminal
      |            Logging On Using 7171 Protocol Converter (Network Connected)        |
      |                                                                                |
      |                                                                                |
      |    Be sure that the DUPLEX switch is set to FULL and the BAUD RATE             |
      |    switch is set to 9600 before turning the terminal on.                       |
      |                                                                                |
      |                                                                                |
      |       Actions You Take                           System Responses              |
      |                                                                                |
      |    1)  Turn on the terminal.     Terminal beeps and displays cursor.           |
      |                                                                                |
      |    2)  Press RETURN              The system will respond with the UKnet prompt >>
      |                                                                                |
      |    3)  Type C (space) UKCC       The system will expand C to the word Connect. |
      |        and press RETURN                                                        |
      |                                  Terminal beeps and types                      |
      |                                  Enter your terminal type:                     |
      |                                  (TeleVideo 910+ is TVI910P,                   |
      |                                  RETURN gives all options)                     |
      |                                                                                |
      |    4)  Type tvi910p (or other    The terminal beeps and fills the screen       |
      |        terminal type if not a    with the UK logo and the prompt LOGON.        |
      |        Televideo 910+) and                                                     |
      |        press RETURN                                                            |
      |                                                                                |
      |    5)  Type userid and press RETURN   The terminal types ENTER PASSWORD        |
      |                                                                                |
      |    6)  Type your password        Terminal displays a logon                     |
      |        and press RETURN          message and the Ready; prompt                 |
      |                                                                                |
      |                                                                                |
                                  Appendix. B:  Logging On with an ASCII Terminal     33
      CMS Introductory Guide
      APPENDIX. C:   A Sample CMS Session
      |                                                                                |
      |        A sample session to create and execute a WATFOR77 program file.         |
      |                                                                                |
      |  Note that WATFOR77 allows mixed case in the program.  However, by default a   |
      |  filetype of FORTRAN will cause everything typed into the file to become       |
      |  uppercase when the ENTER key is pressed.  The XEDIT subcommand SET CASE M I   |
      |  will preserve case as it is typed.                                            |
      |                          |                                                     |
      | GRAB WATFOR77            | The WATFOR77 disk need only be accessed             |
      |                          | once at the beginning of a session.                 |
      | Xedit PROG1 FORTRAN      | This file will be called PROG1 FORTRAN.             |
      |                          |                                                     |
      | Input                    | Enter input mode.                                   |
      |                                                                                |
      | At this point, if you have an application program enter it.                    |
      | Otherwise, use the following WATFOR77 program as an example.                   |
      |                                                                                |
      |            C     This program returns the factorial of any integer up to 12    |
      |            C                                                                   |
      |            100   Write(6,10)                                                   |
      |            10    Format(' Enter an integer between 1 and 12',/,                |
      |                 1' or enter -1 to stop execution')                             |
      |                  Read(5,*) K                                                   |
      |                  If (K.eq.-1) GoTo 999                                         |
      |                  If (K) 100,100,150                                            |
      |            150   If (K-12) 160,160,100                                         |
      |            160   Ifact = 1                                                     |
      |                  Do 200 I=1,K                                                  |
      |            200   Ifact=Ifact * I                                               |
      |                  Write(6,300)K,Ifact                                           |
      |            300   Format(1x,' The factorial of ',i3,' is ',i15)                 |
      |                  GoTo 100                                                      |
      |            999   Stop                                                          |
      |                  End                                                           |
      |                                                                                |
      |                          |                                                     |
      | Press ENTER twice.       | Exit input mode.                                    |
      |                          |                                                     |
      | FILE                     | Save program on disk and exit XEDIT.                |
      |                          |                                                     |
      | WATFOR77 PROG1 FORTRAN   | Execute PROG1 and read data from terminal.          |
      |                          |                                                     |
      | Enter numbers to test.   | Program prints out number and factorial.            |
      | Enter -1 to quit.        |                                                     |
                                               Appendix. C:  A Sample CMS Session     34
      CMS Introductory Guide
                                               Appendix. C:  A Sample CMS Session     35
      CMS Introductory Guide
      -A-                                        Find, 13
      ACCEPT, 17                                 finding
      Add, 13                                        job
      AUTOLINK, 14                                      numbers, 29
                                                     output, 28-29
      -B-                                        FLIST, 7
      Batch                                      FPRINT, 9
          MVS/ESA, 27                            FTP, 15
          VM, 26
      BITNET, 15                                 -G-
      BOTtom, 14                                 gateway, 15
      BROWSE, 10                                 GML, 19
                                                 GRAB, 14
      -C-                                        graphics, 31
      carriage                                   GRIPE, 6
          control, 10
      Central, 9                                 -H-
      Change, 13                                 halt
      changing                                       execution, 25
          password, 3                            HELP, 1, 4
      CJS, 1                                         Desk, 2
      CMS, 1                                     HOLDING, 4
      command line, 12                           HX, 25
      conventions, 1
      CP                                         -I-
          READ, 4                                INPUT
      current line, 12                               INHIBITED, 3
                                                     mode, 13
      -D-                                        INSERT
      DELete, 13                                     MODE, 3
      directory, 7                               IPL, 25
      DLIST, 24
      Down, 14                                   -J-
                                                 JES, 29
      -E-                                        Job-number, 9
      editor, 10
      ENTER, 2                                   -L-
      erasing                                    Laser
          files, 8                                   Printer, 20
                                                 LaTeX, 19
      -F-                                        Locate, 13
      file, 12                                   logging
          management, 7                              on, 2
      FILEDEF, 22                                logoff, 3
      fileid, 7                                  LOOK, 17
      filemode, 7, 14                            loops, 24
      filename, 7                                LW, 20
      filetype, 7
                                                                            Index     36
      CMS Introductory Guide
      -M-                                        -S-
      MAIL, 15                                   SAVE, 12
      manuals, 1, 6                              SCALE, 12
      MORE..., 4                                 SCRIPT, 19
      MVS/ESA                                    sharing
          Batch, 27                                  disks, 14
                                                     files, 14
      -N-                                        SHIP, 14-15
      network, 15                                SPLPREP, 9
      NEWS, 2, 6                                 spool
      NOT                                            files, 3, 17
          ACCEPTED, 4                            status, 28
      NOTE, 15                                       indicators, 3
                                                 STORAGE, 23
      -O-                                        SUBMIT, 27
      OUTPUT, 18                                 SUGGEST, 6
                                                 syntax, 1
      password, 3                                -T-
      PEEK, 17                                   tape, 27
      personal                                   TELL, 15
          computers, 1                           TELNET, 15
      PFkey, 8                                   terminal
      plotting, 31                                   types, 1
      prefix                                     TeX, 19
          field, 12                              TOP, 14
          copy, 9                                -U-
      printing                                   Up, 14
          files, 9
          long                                   -V-
             records, 10                         VIEW, 6
          typeset quality, 20                    visualization, 31
      protocol                                   VM
          converter, 1                               Batch, 26
      publications, 6                                READ, 4
      -Q-                                        -X-
      QQUIT, 13                                  XEDIT, 10
      QUIT, 12
      -R-                                        7171, 1
      RBROWSE, 17
      RDRLIST, 17
      reader, 9, 17
          files, 3
          message, 2
      RENAME, 8
      RETURN, 2
      RLIST, 17
      route, 27
      RUNNING, 4
                                                                            Index     37