GH20-0860-0

Type III--1

Control Progrartl"67/Cambridge Mcinitor System(CP-67/CMS) Version 3
Program Number 360D-052_005
CMS Script User's ManualThis manual introduces you to the Script manuscript facility
that operates under the Control Program-67/Cambridge Monitor
System (CP-67 /CMS). Script .enables you to type in amanuscript, correct it, examine your corrections, and print it
out - all at a typewriter terminal - with spacing performed
automatically by the system. The spadng feature enables you
to type in text lines without regard t() margins; YOllrtext is
automatically formatted to fit within the margin size that you
specify, as in book and newspaperprinting. Other capabilities
of Script include page numbering, page heading, tab setting,indentation, centering, margin setting (top and bottom of.page, as well as right and left sides), double spacing, page
skipping,line breaking, and several special features, such asentering lines from the terminal during manuscript printout.
The hard copy, or finished product, can be outputted toeither the typewriter terminal or offline printer.
Sample documents are provided for practice in creating,editing, and printing a Script file.
The procedure for logging in from CP-67 (the Control Program)to CMS, and document maintenance within CMS are explained.
The Edit facility in eMS is described in some detail.

Class A ProgramPREFACE'
The following document is referenced in this manual:
CP-61/CMS User·s Guide
The following documents
CP-67/CMS system:

GH20-0859-0
provideCP-67 operator·s Guidefurtheronthe

GH20-0856-0

CP-67/CMS Installation Guide

GH20-0851-0

CP-61/CMS System Description Manual
CP-61 Program Logic Manual
CMS Program Logic Manual

information

GH20-0802-1

GY20-0590-0
GY20-0591-0

CP-61/CMS Hardware ~~aintainability Guide

GH20-0858-0

First Edition (October 1970)
This manual is a minor revision of the IBM Cambridge Scientific' Center Report entitled Script User's
ManUlll (320-2053).

This Type III Program performs functions that may be fundamental to the operation and maintenanceofa system.
It has not been subjected to formal test by IBM.

Until the program is reclassified, IBM will provide for it: (a) Central Programming Service, including
design error correction and automatic distribution of corrections; and (b) FE Programming Service,,including design error verification, APAR documentation and submission, and application of Program
Temporary Fixes or development of an emergency bypass when required. IBM does not guarantee
service results or represent or warrant that all errors will be corrected.
You are expected to make the f"mal evaluation as to the usefulness of this program in your own
environment.
THE FOREGOING IS IN LIEU OF ALL WARRANTIES EXPRESSED OR IMPLIED,INCLUDlNG,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESSFOR APARTICULAR PURPOSE.
This edition applies to Version 3, Modification Level 0, of Control Program-67/Cambridge Monitor
System (360D-05.2.005) and to all subsequent versions and modifications until otherwise indicated in.
new editions or Technical Newsletters.
~.

Changes are continually made to the information herein. Therefore, before using ,this publication,
consult the latest System/360 SRL Newsletter (GN20-0360) for the editions that are applicable andcurrent.
Copies of this and other IBM publications can be obtained through IBM branch offices.
A form has been provided at the back of this publication for readers' comments. If this form has been
removed, address comments to: IBM Corporation, Technical Publications Department, 112 East Post
Road, White Plains, New York 10601.

© Copyright International Business Machines Corporation 1969, 1970

CONTENTS

Introduction
Features of ScriptYour Typewriter Terminal

112

Preparing to Log In

2

Logging In

2Your Script File5

Creating and Modifying Your Script Filewith Edit

5

correcting Typing Errors

6

Creating a Script FileEntering a New File
Filing. It Away
Saving Entries for Fut~re Filing
Correcting Your File
Printing Your File
SUll'JIIary

7
7
7
7
8
8
8

Script commands
10
Heading
10Page Size Parameters
11
Page Numbering
12
Other page-Planning Commands
12
Spacing
14
Centering14
Line " B r e a k i n g " l S
No-Fill Mode
15
Fill M o d e l S
Indentation
16
The Indent C o m m a n d 1 6
The Offset Command
18
The Tab Command
19
General Example on Indentation
21
Imbedding a File within a File23
Adding a File to the End of a File
23
Entering Lines during script Printout
24
Exercise 1
24
Printing a Script File
Practice Exercises
Exercise 2

26
28
29

Interrupt.ing Typeout.,-. '.,31

Correcting a Script File
Positioning the PointerChanging Part of a Line
Example USing Loca·te;and Change.
COmrria:nds ,Repeated Changes
Changing an Entire Line
Adding a Line in Edit Mode
E,xample ·of Use of Retype Command
to Insert Lines
Example of Use of Delete Command
to Ins-ertLines
Listing Part-of a.File
Exiting from Edit Mode
Exercise 3
Exercise 4
Typical Terminal .session for Exercise 3",",,'. ."~.,~

Maintaining Script Files' ..... ,. Fil~ Transfer .
. File Erasi.ng and",t;ist<,ing'
Erasing
Listing
Summary··

:
.~

32
32
3€ i

35
37
38
39

!,

39
i€ 1

.. 41

42
i€ 3

.43
44

.

46
46
41
41
41
48

.'~

,

,Other CMS File Mainten~nce Commands, .

49

Logging Out

50
,' ,~

.

(

,

'.

~... '

.,~.

.­

:>1

:SampleScriptFile ~ ..• SCRIPT. Example'

55

, ·:1

Appendix B: Script Comma·nds

58.

i

Appendlxc: Commands in eMS command. Enviroltrq.e.nt

62.

~
t

I

.,I
"

Bibliography·Indexto Commands"

65

.i··

"

-'"?"

.'

. ":.

:."

f\.

,,.

.t;".:.

Script User·s Manual

INTRODUCTIONFEATURES OF SCRIPT"Oh nuts! I have to type. this whole page over".
That
complaint is probably heard many times in the course of
preparing manuscripts--reports, letters., minutes, and so on.
Then
there
is
the
problemofmakingduplicatecopies--frequently duplicate original copies--of a typed
manuscript.
When
we
use
an
ordinary
typewriter,
text-processing" as this is called, can be a time-consumingand' harassing job.
The Script facility, which operates
under the CambridgeMonitor System <eMS), was written tohandle these procedures for you; you merely type in thefirst version and make any necessary corrections. By using
the "commands" that you type in with your lines of text, thecomputer prints out'asmany "first" copies as you wish, with
margins, spacing. indentation" etc. performed in accordancewith your commands.
One of the most qseful features of Script is right-margin
justification, as·in book and newspaper printing. This meansthat your text is spaced as evenly as possible between themargins of your printed page, filling in with blanks where
necessary.
The printed
line is under control . of a"line-length" command: any short line that you type in will
"grab" characters from a longer line above or below it, andfill out the line with hlanks where necessary to avoid
splitting words at the margins.
This' is the ordinary (ordefault) mode under Script. You can,; however, have lines
printed out
exactly as you
type them in,with nojustification performed by Script, by including a commandthat instructs the computer to turn .offthe format mode.
This is useful for typing
figures and charts.
Linejustification can later be respecified if desired.
•

Other capabilities of Script include: page numbering: page
heading: tab setting: indentation; centering: top, bottom,
right, and left margin settings: double spacing: page
skipping: line breaking (preventing character-grabbing by,short lines in format mode): andse.veral special commands
that will be discussed.later.
Your two primary tools are the Edit and Script commands.
Edit commands are used to create and modify the source datafor your document.
Script commands operate on this source
data to' produce a finished document. Some, additional CMS
commands that may be useful to you will be described later • .

-1­

YOUR TYPEWRITER TERMINALYour communication with the computer is by means of an IBM
2141 Communications Terminal. similar to an IBM Selectric(R) typewriter. You will find a switch on the left side of
the cabinet in which the typewriter is mounted; when theswitch is set to LCL you have an ordinary Selectric
typewriter. by switching to COM you can be linked to thecentral computer by telephone line. and your typewriter is
now a typewriter Wterminal w• In this latter mode. you andthe computer wconversew through messages that you type via
your terminal to the computer, and responses you receive
back at your terminal.

PREPARING TO LOG IN
In order to log in. that is, to establish a connection withthe system from your terminal, you need an ID and apassword, which you can obtain from the operations group at
your installation. To prepare your terminal, set the left
margin at 1 and the right 'margin at 130, in order to provide
maximum typing width.
CYou should have a #963 typing
element for an EBCDIC terminal, and a #015 element for acorrespondence terminal.) Make sure the switch on the left
side of the cabinet is on COM.

LOGGING IN
Procedure 1. If your terminal has a direct wire connection.
simply press the ON button. If there is no response. hit
ATTN. The system types#

cp-67 online

xdh65 qsyosu

Hit the ATTN key.
Procedure 2.
If
your terminal
connection, proceed as follows:
a)

b)

c)

-2­

has

a

telephoneline

Turn the terminal on.
Depress the TALK button on the data set and dial theproper telephone number.
When a high-pitched continuous tone is heard on thephone. depress the DATA button on the data set andreplace the phone in its holder.

d)After the system types out
JJ

cp-67 onlinee)xdh65 qsyosu

Hit the ATTN key.

After you have completed either procedure 1 or procedure 2,
yoU are ready to log into the system. Log in by typing .
.login • 10·
For example.
login smith
Hit RETURN.

System responds with

ENTER PASSWORD:
Enter your password and hit RETURN.
(Typeout is suppressedso that no copy o~ your password. appears on the terminal
sheet. )The system
may respond with messages
giving special
instructions for system users. It always respond withREADY ATCP

-time of day· ON 'date'

Now that you are logged in, youwhich contains script. Typeare ready toaccess eMS,

ipl cmsand hit RETURN.

The system responds with

CMS •• VERSION n~heprintout

at yourLEVELmterminal shouldlook something

like

-3­

this
#

cp-61 online

xdh65 qsyosu

I smithENTER PASSWORD:
CPWILL'RUN UNTIL 17:00 ,AND FROM 18-:00 TO 24:00
READY AT 12.01.36 ON 06/20/69

CP
ipl ems
CMS •• VERSION 3

LEVEL

0

You are now ready to create a file, print an existing file,
edi t (make changes to) an existing file" etc. You are in
the CMS command environment. By entering'simple-commands(such as edit, printf" etc.) at a console, you can accessthe·full System/360'capability in . this environment, as wellas'createartd format Script files ..

I
I

To distinguish your . entries from system responses,. it isa
good idea to type your commandsin lowercase.:" (Text. lines
of a script file should,:of course, be typed exactly as you
wish them to appear on . output.). The systetn'genera:llytypes
its messages to you in uppercase. For 'example, you could
type
i •

(combination of uppercase
and lowercase)(uppercase oniy)(this" is recommended)Your command entries appear to the system as uppercase, nomatter how you type them in; the practice of using .,only
lowercase for comroandsis merely a convention to improve thereadability of your terminal printout.
Note: Single quotation marks denote that the entry is not aliteral entry; it is merely a description of the information
to be entered.
For instance,'ID' indicates that someparticular userid should be entered--without the quotation
marks.

'­-4­

YOUR SCRIPT FILE
The 'source data for your document is stored in the computerand is called a Script file.
It is composed of records ,andresides on your perroanent disk. Files are identified bya
unique combination of .filename (of your own choosing>,
filetype (Script, for all Script files), and filemode (youneed not concern yourself with this). Script files consistof t,ext lines and special command words that you type in atyour terminal.
CREATING ~ MODIFYING,~ SCRIPT FILE WITH EDIT
The EDIT facility enables you to create your Script file,
make changes to the file, or simply peruse its contents.
There are two mod:esof operationcommand: Input and Edit,.

when

using

the, Edit

When you create a new file, your terminal is placed in
Input mode, in which you can type in only text lines andScript command words; you cannot make corrections inInput
mode.

.

To make corrections to a file you have created in Input
mode, you must enter Edit mode.
Entry to Edit is automaticwhen you issue the command below fo~ ·a file that bas any
entries at all, even only one Script command, or one word of
text (or even a blank line"
for that matter);. In Edit, you
can'use Edit commands to make revisions to your file: forexample. you can locate a word or string of words, change aword string to another word string, go to the next line in
yourfile,delete words from that line,and soon.
You can go back and forth between Edit and Input modes (youwill learn how to do this later on), typing in text and
Script commands (Script commands all begin with a period incolumn 1) in Input mode, and correcting your entries in Edit
mode.
The same command is used to access both modes:
edit 'filename' script
If the file is 'new, youare placed
Otherwise, you are placed in Edit mode.

in

Input

mode.

Along with a description of Input and Edit facilities is asample Script file,which is provided as a practice session(See under -Logging but W ) .
You should enter this file'(Input mode), edit it, using several of the Edit commands,
and print it out. (It will be under format control of the
Script corr~ands included with your input lines.) It is
important to familiarize yourself with the 'system by meansof a practice session at the terminal; in no other way can'

-5­
• i
I

you gain the facility that you will need later on for
creating and operating on your own files.
While at theterminal, you might wish to refer to the appendices, which
list and briefly describe all the commands described ingreater detail in the body of this manual.

CORRECTING TYPING ERRORS
Errors must be corrected before hitting the RETURN key_(If
you have failed to do this, the EDIT facility can be used tocorrect errors to a file that has been written and "saved".
This will be described later.)
One or several @·s deletes
one or several preceding
characters--which may be blanks--and effectively backspaces
the typing element.
Thus
This es@xail@@mple
is interpreted as
This example
since the first @ canceled the s (and backspaced one space),and the next two @·s canceled- the i and I(and backspaced
twice).
Aline is canceled by the tf. symbol. Thus if, -instead ofcorrecting individual mistakes in the above example, you had
decided to start over again, you would have typed
This esail¢and hit RETURN.

Then you would have retyped

This example
Note: Ql cannot cancel ¢.
Once a ¢ has been typed, allpreceding characters (and blanks) are canceled, and theeffective line begins with the next character after the tf.
sign.

-6­

CREATING A SCRIPT FILE,~.

ENTERING A NEW FILE
First, decide on a filename, sometimes abbreviated to fn
in this manual. Maximum length is eight characters.
The
filename, together with filetype (Script, in this case) andfilemode (which we are not concerned with in this manual),
uniquely identifies a file for access by eMS commands.
When you are creating a file, make certain it has a new
filename,. unless you wish to replace an existing file with a
new 'one of the same name. Next, issue the commandedit 'filename' scriptand hit RETURN.

The system responds withNEW FILE.
INPUT:
You are now in Input mode and ready to type in your file,
one line at a time" hitting RETURN at the end of each line.
Your Script file contains textual information plus special
Script command words for controlling the tormat of youroutput. These commands are typed on separate lines from thetext" and always start with a period in column 1.
FILING IT AWAY
When you have finished typing in your file you must store
it. To do this, you must leave Input mode and enter Editmode,. To enter Edit., hit RETURN on a "null" line (a line on
which nothinghas ~een
typed--not evenspaces--and,therefore, the typing element is at the left margin).
The system responds withEDIT:
You type
fileand hit RETURN.

The system types

R: T= 'CPU times' 'time of day'
SAVING ENTRIES FOR FUTURE FILING
At intermediate points in entering
your file,
it i~generally a good idea to save your entries up to that point-7­

(as a safeguard againstsY$tem "crashes").,. withoutl~aving
the Edit program.
You can do this by pitting ·RETURN·Con anull line).

n l1

System responds with

'~

I
~

EDIT:
You type:
saveand hit RETURN.

System types

INPUT:You may now continue typing in your file from the point
where you stopped in order' to issue the Save command.
(Remember that the File command takes you from Edit mode to
the general CMS command environment--not back to Input
mode. ).'CORRECTING YOUR FILE
For making changes, additions, or
you now .simply reissue'_

deletions toyour file.,

edit -fn- script
which places you in Edit mode.
<See "correcting a Script
File" for a complete description of the Edit facility.)
PRINTING YOUR FILE
Later on, you will learn the commands for printing out yourfile at your terminal and on the offline printer. These
printouts can be done either in the format you havedetermined with your Script control words or unformatted,
that is, with text lines 'and commands in the same format inwhich they were entered .. (See "Printing a Script File".)

iI
,

"
I'

SUMMARY
To save part of. a file hit
responds withEDIT:
You issue
save

-8­

.s.

RETURN on a nullline.

Systemi,and hit :RETURN.

system t.ypes .

·':INPUT::

.'('1

;\':

..

ttiu· :'are . back in Jp.put·mode.
I

•

~'.

·,
I

To file the entire document . rand make it available for lateru~se)hit RETURN on a null line.

System respondS with
EDIT:
'YoU

issue
'file . .

and hit RETURN.

System types

R:T= 'CPU t.imes· 'time of day' .
YoU are now in the. CMScommandenvironment.

; r"

;

'j
'j

i

L

1
",

?",

. !

'1
'1

.... - ,

I
-1I
.1
I

J

SCRIPI' COMMANDS
Preliminar¥ note:
Script commands begin
in the firstcolumn. as in the following example.
(They do not. however.
appear in the first column in this manual. which has itself
been prepared using Script; if they bad been entered at theleft margin exactly like legitimate script commands. theywould have controlled printed output.).tm 4
One space separates the command from the command operand (ifany). Since there can be only one command on a line. hit
RETURN to position the typing element at the beginning of
the next line before entering another command or a textline.
The first thing you will want to do when creating a new file
is to plan your page layout. including heading ~nd page size
parameters.
HEADINGA heading. specified vi~.he 'heading line'
is printed on eacbpage except the first.
(This is the only
exception to the rule that commands and text must be enteredon separate lines.) If the heading is to appear on page 1.
it must be followed by the page advance command (see "otherPage-Planning Commands·). as follows:.he 'heading line'.pa
Changes in the heading line must be specified by.he 'new heading line'
before the text for the new pages.
The heading is printed at the left margin, and 'heading
line' must be at least ten characters less than line length(.11. see below). to allow for a page number at the rightmargin. Spaces can be inserted in front of the heading tocenter it. For example.he'heading line'

forces the heading 24 spaces away from the left margin.
This effectively centers your heading on the page, if you. -10­

have specified a line length of 60 characters (or if you
have specified
no linelength, inwhich casethe60-character length is automatically in effect).
PAGE SIZE PARAMETERS
There are several of these to set:
top margin.tm
heading margin.hm
bottom margin.bm
line length.11
page length• pI
For each of these, there are default values which takeeffect if you decide not to set your OlNn values. They are
.tm 5
.hm 1
.bm 3
.11 60.pl 66(lines)(lines)(lines)(characters)(lines),

These values are assumed and. therefore, do not have to beentered unless you are resetting default (from nondefault)
values. When entered, these page-size commands should beentered first in the file.
Note:.tm must be larger than .hm. Therefore, to print
the heading higher on the page, increase .hm, making surethat .tm has a larger value.
Examplecomments----~--~---~------------------

.tm 8
.hm 3
.he Human Relations'lines of text
taking up several
pages'.tm 5_.hm 1.he NelN Methods'more text'

Since the heading command was
not followed by the page advancecommand (.pa). the heading"Human Relations" will first
appear at the top of page 2.
The next page will have the
new heading, "New Methods".
Note that default values havebeen respecified for .hm and.tm. Since no values wereset for bottom margin, line
length, or page length, default
values are in effect.

-11­Line Length and Underscoring-~---~---~-~-~--------------

Line length can be varied to leave space on
figures or drawings (see ·Sample Script File").

a pageforIf deletion symbols (a) are included in the line, up to 132
characters may be entered, so long as the effective length
after deletions is not more than 120 cha,racters.
The usual maximum number of characters in a l-ine is 120, but-the maximum number of characters in a completely underscoredline is 40.
This is because each underscored charactercounts as three characters: the character., , the backspace,
and the underscore~
Underscoring is very Simple.
Type inthe letter(s), backs'pace (using the physical backspace key),
and underscore (using the shift key and the underscorecharacter).
Lines' of more than 40 characters can' be
underscored using hyphens in the next line.•
PAGE ,NUMBERING.pn on(default) .
• pn off.pn offno
If on, each page except the first is numbered;.
If off, page numbers are not printed, although the processor
keeps track :of the numbering.
If offno, no page numbering takes place.
Thus if .pn off is entered, no pages are numbered" but page
numbers are
incremented internally,andif
the page
numbering command is later reset to .pn on, page numberingresumes with the number sequence preserved. If you' want page
numbering to resume wit:h a different number, you can specify.pa 'n', which causes an eject to a new page, numbered "n' •(See below for a description of ~ pa 'n'.)­
OTHER PAGE-PLANNING COMMANDS

There are two page eject commands:.pa (unconditional,
which always, produces apage eject),and .cp'n'(conditional, which causes a page eject if fewer than 'n'lines remain on the page).
Unconditional.pa
The line following • pa is printed on a new page. "­-12­

.pa 'n''n' is optionaL. If specified; it- ,is the page number of the
newpage. otherwise, sequential numbering takes place. For
example, in page-numbering a report, the text of the reportis pre,~eded by introductory pages ( title· page, table ofcontents, etc.).
Numbering begins with the first page oftext.
Set.pn off at ·the beginning of the file; aftertyping the introductory pages, set.pn on followed by .pa 1,
which prints a number 1 on the first page or text. If you
just specify .pa after .pn on, the first page is numbered
page 2, since page numbering is incremented J..nternallyduring .pn off. Thus."

.pn off'introductory pages'.pn on.pa 1'first page of text'
will print a number 1 on the first page. of text, while.pn off-'introductory-pages'.pn on.pa'first page of text·
will print a number 2-onthe first page of text.
Conditional.. cp • n'This causes a page eject if less than tnt lines are left on
the page. 'n' must be specified. This command is especially
useful before section headings, to avoid printing a section
heading as the last line of a page. For example.cp 4Format control.sp 2This section describes ••••••
The .. cp 4 causes a page advance unless four lines remain in
the current page, that is, . suf·ficient -space for the heading(Format control), the two spaces after it (. sp 2), and thefirst line of the new section.
;Note: -A .cp command('n') is ignored.

not accompaniedby aninteger value-:13­

SPACING
It is not necessary to issue the .55 (single space) command
except to cancel the effect of the .ds (double space)command; which places a blank line between printed lines.
Single spacing is the default mode.
To generate blank lines anywhere in a file, issue the .sp
In'command, as in the example above.
(If tn' is not
specified, 1 is assumed.)
Note 1:
If .ds is in effect, the .sp command generates
twice as many blank lines as are specified. In other words,
the .sp command in.ds•• sp 2
generates four blank lines.
Note 2: If page end is reached during a spacing operation,
remaining blank lines are inserted after the heading on thefollowing page.
CENTERING
Page titles, captions, figures, etc. can be centered byusing the .ce command. The information to be centered must
be preceded by .ce. Remember that when centering several
lines, .ce is required for each line (see example below) •• ce.ce
I Format.ce

Example nE.ceproduces the following printout:

I Format I Example nI
I E
Leading blanks are counted a.s part of the line length, andtherefore offset the line from the center of the page.
As you have probably noticed, the default values for most of
the page-planning parameters (.tm 5, .hm 1, .bm.11 60,.pl 66, etc.) are adequate for a standard type of file.

3;

-14­

Therefore, you probably will not
day-to-day script work.

have to adjust

them, forLINE BREAKING
You will recall from the Introduction that text lines typed
beginning in column 1 are right-justified to fit neatly
within the margins specified iil the line length (.11)
command. For paragraph headings and such, it is desirable
after certain lines to prevent justification, that is, toforce a "break". One, or several, of the following methods
may be used:
No-Fill ModeUse the .nf (no-fill) commandLines are printed exactly as they appear in the file. Thisis useful--often essential--for figure drawing or lists.
Some practice is needed to produce attractive text in thismode. Note: Remember to issue • fi (fill> at the conclusionof a no-fill section.
The figure illustrating the .ce command
been drawn in .nf mode as follows:

above could

have

.nf

I Format 1 Example n

I

, E

.fi
Notice that each line of the figure was padded on the left
with blanks to force the figure to the center of the page.
The number of blanks has to be determined fairly accurately,
as no .ce <;::ommand is being used to compute center of page.
In .nf mode, no leading blanks or .br's (see "Fill Moden
below) are needed to prevent line justification, even forlines that are typed beginning in colurrn 1.
Note: A simpler method is available for figureusing the indentation command (.in), (see below).

drawing,

Fill Mode
The rest of the breaking methods apply tois the default condition and is therefore.nf is issued.

fill mode. whichin effect unlessUse of leading blanks (one is sufficient) prevents fillingof the previous line. Therefore, an automatic break is in-15­

effect for a line that begins in any column but column 1,
for ~xample, in the case of indentation.of the f·irst line ofa paragraph. Use the space bar, or a tab (.tb) setting (see"The Tab Command") to space over to the beginning column.

A blankline with or without leading blanks
following it creates a break; for example:

in theline·text' •••••••••••••· ......•.• _ ........ .
· . . . . . . . . . . . . .. . . . .

'blank line'
This line begins
with several blanks·I. .'. . . . . .

0

•

•

•

•

•

•

•

•

•

Use of the break command (.br) between input lines prevents
filling of short lines with characters from .the line
following.
Most of the command words cause a break.
Any of thecommands listed below has the same breaking effect aSobr •
.sp
.11

.. pI

.tm
.. hm
obm

.. ce
.he
.pa

.ds;
.ss ,
.rd

• in
.un
.of

.tb
•.fi
.nf

INDENTATION
Several -methods of indenting are available under Script.
Generally, it is a matter of preference which one is used,
but there are certain features that should be learned before
choosing one or the other.
The Indent Command
The indent command C.in 'n·) causes all following lines tobe indented n spaces from the left margin.
Thus" ..• in 5 preceding text lines causes printing of eachline to begin in the sixth column. This command can bealtered in several ways.

II

If you. want to move one" or a few., lines back toward theleft margin., you may use the "unQ'~nt" command (.un 'n')before each line that is to be undented. (DO not undent witha larger In' than the indent 'n', since it is impossible 'togo farther than the left margin of the page.) Hence
.in10
.un 8
'line l''.line 2'

-16-

"1

I

I

prints line 1 beginning in column 2. andfollowing lines beginning in column 11.

line 2

Indentation can be changed with .in ',new n'.

For example

and all,.in 10'Text· ••••••,.

· .. .. .,. . ....
·.in-..5.. .. .....
·... ........
•.•••.•• • e .••••::.

simply . begins printingin.coll;1mn 11., ,thencolumn 6 when .. in 5 is encountered.· .

..

mov.es' backtoIndentation can be canceled. that is. printing be made toresume at the left margin. with •.in followed. by nointege.r,
or with .in O. In the example.in 10~. .. . . .. .. ..

• • • • . • •:. • • •.• •

!'

•.in

•I. ••••••••••

,

I·
.'

.........•.•.

ithe lines after • in begin in column 1 . .

"Indentation can also be canceled by using .un 'nt, with thesame n as ~ln 'n'( .. un, 10 in the example above), but. if
many lines are to resume printing, at the, left margin. '... un'n' would have to be issued before each line, which ',.isObviously an uneconomical procedure.

I.

Note: In the sample figure under "no-fill mode" , leacUng,'
blanks were used to force the figure to the center of thepage. Indent provides a simpler method. For example:.nf.in 11··--------;-----------'"'!-~----I Format I Example. N
I
I E.-~-~.,-------

.in
.fi

..

,

J

---~---.------,.

For line length o f 6 0 characters ( default .... 11). •..in 17,
places the above 25~character box in the center of the page(leaving 11 spaces on one side and 18 on the other).

In summary. then • • in 'n' is altered as follows:

-17'"

•."I

It ,is canceled by .in (or .in 0)
It is changed by .in 'new n'
It is undented by .un 'n s

The Offset Command
The offset command (.of en') causes all but the first line
following to be indented n spaces from the left margin. If
an .in tn' setting is already in effect, the .of starts at
the indent value. The input file.in 5
.of 10·Text· •••••. . . . . .-. ... .
begins the first line of text in column 6 (remember, .ofaffects all but the first' line following); the offset valueof 10 starts printing of the remaining lines in column 16,
due to the already existing .in 5.
The offset commandor changed.
Cancelingeithercan "be altered by

the Offset

Command.

This

being either canceledis donebyissuing.ofor.inwith no integer value (or with a zero value). Following
either of these two commands, printing resumes at the left
margin (unless .of is used for canceling, and a previous
indent value is in effect; in that case, printing resumes at
the indent level, since .of can cancel only a previous .of'n' setting).
In the previous example, suppose .in follows the text lines,
as shown below •.. in 5.of 10'Text· ••••. .........
-18­

.in

•••••I. ••••
• • e'• • • • I • • •After the second .in command, the .of 10 andcanceled, and printing continues with column 1.

.in 5

are

To cancel the offset value ( .• of 10) but not the .in 51, issue.of rather than .in. In this case, printing resumes withcolumn 6, since the indent setting is still in effect.•
In other words, .in is more inclusive for cancellation than.of, since .of can cancel only an .of 'n' setting, whereas.in can cancel both .of 'n' and .in ·n·.
Changing the Offset Command.
In the example above, if

This is done with .of 'new n·.

.in 5.of 10·Text· •••••·... ...... .
'

•

•

•

•

•

•

•

I• .

e

•

•

were followed by.of 5·T.ext· •••••••• Ie •

•

•

•

•

•

•

the lines after .of 5 would start printing(since .in 5 is still in effect).

in column

11

To summarize, the offset command is altered as follows:
It is canceled by .of (or .of 0), or by .in (or .in 0).
It is changed by .of 'new n·.

The Tab Command
This is used for paragraph~type indentation, which . is the 'opposite of offset; that is, the first line is indented andsucceeding lines start at the left margin. The tab command(.tb 'n' 'n' ••• l can be set to any desired spacings (n·s).
These override default tab stops of 5. 10, 15, 20, ••• 75.
Only the line that is tabbed during input is indented:, allothers revert to the left margin.
If any previous

indent (.in) setting is ineffect, the .tb-19­command.
examplelike .of, .begins

atthe indented

column.

For.tb 8 15 24(2 tab presses) ••• ~ ••••
•

•

•

•

eo . . . . . . . . . . '. . . . . ., • ' • • •• in 10(2 tab presses).~ __ .•••.....•.•. ........
~-- .. .

producescolumn fifteen.••• '• ••column one ••••••• ~ ••••••••
column one ••••••••••••••••
column· 26 •• ,. ••••.
column eleven ••••••••••
column eleven..... '. ..... .
The first line was tabbed twice, to column 15; .in 10
preceded the next tabbed line, so that two tabs brought it
to column 26 instead of column 15, succeeding lines of text
resume printing from colu~n 11.
,

In order to return to default settings (tab stops of 5, 10,
15, 20,.,•• 75), it is necessary only to issue .tb with nointegers.
The ·tab effect" alone, can be achieved without using any
special control words, merely. by leaving the desired numberof blariksbefore the first line of input ·(forexarnple, thefirst indented line of a paragraph) and starting the nextlines at'the left margin;. Remember that any input line witha leading blank, or blanks. appears in the text just as it
is typed; the blanks act as a break to prevent filling in ofeach previous line. Consequently, when entering paragraphs
into a file, do not leave any blanks before any but thefirst line of the paragraph.
The tab command is useful for charts where printing begins
in specified columns across the page. It is also useful for
bibliographies, where line justification usually alters thenumber· of spaces, from entry .to entry, betweenthe item
number and the first word of the item. An example . of theformatted output of a bibliography created without the useof .tb follows:1.

Adair, R••• ~ ••2.

Field, M.S ••• ,• .••Although,. in both entries, two spaces were typed -between the

-20­

..

item number and the author's name, the line-justified
printout resulted in one extra space after item 2,. This
problem can be remedied in the followingmanner~.tb 5 9.of 9(tab}l.(tab)Adair. R••••••• of 9(tab) 2. (tab)Field, M.S ••••••
Pressing the tab key once before typing the item number andagain before the author'$ name makes the item number always
appear in column 5 and the name in column 9, thereby
generating two (and only two) spaces between them for every
entry •.
Be careful to turn off the .of 'n'command (by either .in or.of) and the .in 'n' command (by .in) at the completion of asection under control of either or both of these commands.
It is easy to overlook a previous setting, and this can beparticularly troublesome when an indentation is unknowingly
in effect, as described above' (.tb or .of following .in) •. For instance, if "the first example under "The Tab Command"
above were not followed by .in" subsequent tab presses.would
continue to be incremented by 11, resulting in tabs of 19,
26, and 35, rather than the intended 8,15, and 24.
General Example on Indentation. Watch out for line fillingwhen using .in,.of, .un, etc. for outlines, tables ofcontents. and such. For example, the short memoA.

CP/CMSUser's memo
1. Changes to the Script command
2. Minorrevisions
3. Major revisions
a. new page size parameters
b. deadline changes for Script memos'could-be entered in a script file in the following. manner(note.that the three sections start· in columns, 6. 10" and14, respectively):

(\.

.in 5
.of 4
A•
CP/CMS User's memo
• br
:1. Changes ., to the Script command.br
2. Minor revisions.of 8
3. Major revisions.bra. new page size parameters
.br

-21­

I
i

b.

deadline changes for Script memos

The .br commands are necessary where they are typed, sinceno other command that causes an automatic break is typed
between successive text lines.
(Text lines are supposedly
typed starting in column 1.> Thus, if there were no .br
betweenA.

CP/CMS User's memo

1.

Changes to the Script command

andcharacters from subheading 1 would be used to fill out theheading line A; The same is true for subheadings 3" a, andb.· Notice that no .br is required between subheadings 2 and
3, because the offset command acts as a break.
You could also use .in with .un
follows:

to type in the same memo as• in 13.un a
A. CP/CMS User's memo
.un 4
1. Changes to the Script command
.un 4
2..
~linor revisions.un 4
3. Major revisions.bra. new page size parameters.brb. deadline changes for Script memos
You can probably figure out why .br's were used only between
subheadings 3 and a, and between a and b. It's for the same~eason that .br's were used in the previous example, namely,
there are no commands between these subheadings, because thelast two subheadings start in column 14 and therefore noundent is needed to alter the initial .in value of 13.
Since the subheadings are typed into the file starting incolumn 1, incomplete lines would be filled if no .br.'s wereplaced between them.
:;

By using .tb, you could haiTe
following manner:

created the same memo ·in the.tb 6 10 14(one tab pres$) A. CP/CMS User's memo
(two tab presses) 1. Changes. to the Scriptcbmmand(two tab presses) 2. Minor revisions(two tab presses) 3. Major revisions

-22­

1

(three tab presses) a.
(three tab presses) b.

new page-size parameters
deadline changes for script memos

This memo could also have been created in No-Fill mode, inwhich no.br's are required between typed lines.
IMBEDDING A FILE WITHIN A FILE
A file can be inserted at a specified point in another file.by the use of the imbedC.irn) command. The correct form is.im 'filename'where 'filename' is the file to be inserted ..
Various uses of .im will no doubt occur to you, such as
insertion of a standard
title page, bibliography, or
distribution list in a document..
Imbedded files can be
added, removed, or their location changed within a file,according to the different uses for a file, at different
times.
At the completion of thefirst file resumes.

imbedding process, printing of theAnother use of the imbed command is to insert standard setsof commands at desired locations in
file.. For example:a'commands and text lines'.in 4.iro addend.ds'continuation of interrupted file'
The file called addend could consist solely of commands,
which would be executed between the indent command (.in 4)
and double-space command (.ds) of the imbedded file.
ADDING A FILE TO THE END OF A FILE
The imbed command can be used to add a file to the end of afile by making .1m 'filename' the last command in the file.
At the completion of printout for the first file, the'imbedded file will be printed out. Another command that canbe used to append one file to another is.ap • filename'
Remember, as the word "append- implies, thi13 command can beused only to attach. a file to the end of another file, notto the middle (use the imbed command for that).

-23-:­

ENTERING LINES DURING SCRIPT PRINTOUT
The read (.rd ene) command allows n lines to be entered fromthe terminal during Script output.
(If n is omitted. l i s
assumed .. ) No formatting is performed by the program on thelines that are entered during .rd•. This feature is usefulfor adding headings to form letters, etc.
An example of the use of • rd . is
.he memo to Script users
.sp 2
.rd 3
After the heading is printed, the typing head spins andaccepts three lines of input before continuing printout of
the filee
No formatting is performed on these lines. In
the above example, a name and address could be typed in on
the three "read w lines.
The inclusion of .rd in a Script file does not cause
any problems during printIng on the offline printer, wherelines cannot be typed in when a read command is reached (seenext section for the offline printer command).. The printermerely leaves n blank,lines in response to .rd 'n' andcontinues printout.

~:------------------------------------------------------EXERCISE 1:

PRACTICE SCRIPT FILE

Create the following practice
Script file,using any
filename you wish. Use deletion symbols (ol and ¢) tocorrect errors as you go along.
Assul1le.in this exercisethat the text below begins at the left margin. You may
check your file with the two files listed on the next page(illustrating .in with .. un" and .in with .of)..
These areprovided only as possible methods~-if you have found anotherthat works, fine!

"lSa.

Phrases Specified by Grammatical Structure

Prepositional-24­

Phrases:
From morning
coffee breaktoafternoon coffee break is too long.
(Noun phrase describing coffee breaks isused as subject.)
The girl from Atlanta is pretty.
(Adjective
phrase, from Atlanta, modifies the noun·
girl. )
He lives in the valley.
(Adverb phrase, inthe valley, modifies the verb lives.>

. ·:1

edit experl script

NEW FILE.
INPUT:

15a. Phrases specified by Grammati~alStructure.sp'.in 20'.
• un .20"
Pr~,ositional PhraSE!s: From morning coffee break to afternoon
coffee break is.· too long- _ . (Noun .phrase describing coff.ee.. breaks is ,used as;.subj~ct .').•un :5'
The girl from-At:lanta is pretty.. (Adjective phrase, . from Atlanta
modifies the noun 9,irL.).un 5
He lives in the·valley.
(Adverb phrase, in the valley, modifies
the. verb lives,.) •. ,
.in

EDIT:
file
R; T=0.28/1.63 10.18.03-,.t... '' .....

"if'1

editexper2 script
NEW PI.LE.
. INPUT:

i,

!

.,

·:lSa.. Phr,ases:SJ?~~ified by GrammaticalS'tructure..
"·.sp.of 20. .
Prepositional Phrases: From mo~illg -c~ffee br,eak ·to. afternoon
coffee break is too long. ,(Nounphrase describing coffee bre'aks
is used as subject.).
•in 15>- .of 5,
The girl fr.om' Atlanta is pretty. (Adjective phrase. from
Atlanta. modifies the noun girl. ) "·.of 5 ,.,.
He I i yeS in the ·va,lley.{Adverb phra,se, in the valley. ,modifies
the.. ~erb lives.),.in. ,

..

.j
I

\.

I

.,

I
.1

I

EDIT:,

.1
'1

'file

I

R;T=O. 28/1.63-·10.22.07

r

I

I

~2.5-

II

j

I

1

1

1

PRINTING A SCRIPT FILE
The basic command for printing is
script 'fn- -options'
Each option refers to a way you can modify some feature ofyour printing. If you do not specify a certain option, adefault value is automatically applied. For example, if you
do not specify. among the options in the above command,
whether you want to print on your terminal or on an offline
printer, the computer assumes that you want to print on yourterminal.
Defaults and the corresponding options are described below.
Default

OptionThe command script 'fn- prints
the specified file at yourterminal.

offline (or of) prints on theoffline printer instead of at
the terminal (recommended forlong files.) See "translate"below.

nowait (or no) starts printing
When typing is ready to begin
at the terminal the message
at the terminal without waiting
LOAD PAPER:HIT RETURN appears
for paper adjustment or RETURN.
and execution pauses to allow
you to position the paper atthe. top of a page. When ready,hit RETURN.
On terminal or printer there
is no further pause during
printout until the end of
file is reached.

Lowercase and uppercase
letters are printed on theoffline printer just as they
appear in your file. This ispossible only if the printerchain is equipped withlowercase and uppercase
letters ('TN-train'). If it
is not (you can find out by

-26­

,

1stop (or st) causes printing toIpause at the bottom of each'page on the terminal.
(At this
Itime you may change paper if
IYou are using noncontinuous
iforms.) The paper should be,positioned to the first line to,be printed (the heading, if any)
I rather than to the physical top
lof the page. Typing resumes when
'RETURN is hit.

t,translate (or tr) translates lowerIcase to uppercase letters on term1inal or offline printer. If theloffline printer isn't equipped withluppercase and lowercase letters
I (TN-train), this option is required
I ("option"?!)1Icalling the computer rooml,
it prints only the uppercase
letters in your file. There­
fore, you must specify the tr
option unless your entire
file is in uppercase (anunlikely situation).
When printed at the terminalor printer your file is for­matted by your Script control
words.

unformatted (or un) prints on theterminal or printer a copy of yourfile, unformatted by control words.

Printing at the terminal or
printer begins with the firstpage of your file.

page 'nnn' causes printing on theterminal or printer to begin on
pagennn.· nnn is a 3-digit page
number and must include leading
zeros (for example, page 4 is
page004, page 12 is page012l.
This works even if you havespecified .pn off and no page
numbers have been printed on youroutput sheets. The only time itdoes not work is if you have issued
1.pn offno, and no numbering takes.
Iplace, either printed or internally.

On the terminal or printer,no matter what page you begin
printout with, printing
continues to the end of the
file.

I

Isingle (or si) terminates after
lone page of printing on the
Iterminal or printer. Usually used
lin conjunction with the page 'nnn',option to selectively format and
Iprint portions of a manuscript.

I,

Printer output is aligned at
Icenter (or cel centers printerthe left margin of the printer loutput on the paper.
paper.

Notes
1.

Options are separated by a blank in the command
script IfnI • options'

2. Type in options with youreffect automatically.
3.

command.

They will not be in

For additional options, see CP-67/CMS User's Guide.

Below are some practice exercises and Exercise 2.
I~

Log in, using the ID and password supplied by the operations-27...

group at your installation.
Type the commands and text as they appear in the practice
exercise in this section.
Your entries are indicated inlowercase. and system responses in uppercase.
Enter Edit mode from Input mode by typing a null
followed by RETURN, and file away your entries.

line

~.

You can now practice obta1ning printouts, either formatted.
(underformat controlof your
Script commands)orunformatted (a line-by-linecopy of commands and text just
as you typed them into your file).
PRACTICE EXERCISES
Examine the printing commands below and, as practice, try
issuing some of them ('or make up some of your own) ..
script IfnI no
This will simply print·youtfile at the terminal (since theoffline option was not spec:1fied), formatted by your script
control· words.
The nowait option (no) causes printing tobegin wherever the paper is positioned at .the time thecommand is issued.
script !fn'. of tr
Note:' If the TN.... train. is not
must·· 'be included.'.

on the printer,. the:itr option

Your file,formatted by Script contr.ol . words,' will be
printed on the·offline printer (due to the of· option),entirely in uppercase letters (due to the tr option).
When you receive the reessage R:T= 'CPU times' 'time of day',you may enter another CMS command (while your file is being.
printed offline). Try this: Choose one page of your filefor printing (say, page 2). Then issue the command
script 'fn' page002 single
Only page 2 of your file will be printed (at your terminal)
since you have used the pa'ge 'nnn' and single options,.
You can print a.copy of your file, either at the terminal oron the offline printer, unformatted by control words (thatis, a copy of the file exactly as you typed it in).
For terminal output, issue
script 'fn' un-28­plus any additional options
offline)-.

you wish(except, ofcourse,For the offline printer, issue,

script 'fn- un of trwith or without additional options.
(If the offline printeris not equipped with a TN-train, remember to include thetranslate option, abbreviated tr, in the command above).
As practice, using t~e sample practice file, you might want
to issue some similar print commands, varying your choice ofoptions.

EXERCISE 2
Print out the practice Script file you created in Exercise 1
in the following ways:i ..

Unformatted at your terminal

2.

Unformatted on the offline printer3.

Formatted at y~ur terminal

4.

Formatted on the offline printerExamples of correct commands are listed on the next page.

-29­

,

Answers to Exercise 2

1.

script 'fn" un2.

script3.

script IfnI

4.

script 'fn' ··.of tr~fn"

of un tr

If the printer is not equipped with the TN-train,. use the tr option for 2 and 4. Otherwise. omit thetr option •.-30­

INTERRUPTING TYPEOUT

I f you wish to interrupt typeout (printout at the terminal),
which was begun by the command script IfnI
'options', hit
the ATTN key oncec Typing will be interrupted, and a pound
sign (#) may be printed.
If you want typing to resume, hit. ATTN a second time, then
You will notice that the line that was
hit RETURN.
interrupted' by the first, ATTN is not completed:typingresumes with the fo~lowing line.
If you want, instead. to "kill" typing (after stopping it byhitting ATTN once), hit ATTN a second't.ime and typekt
Then hit. RETURN.

The system will respond with

R: T= ·CPUtimes·'time of day'In summary:
To interrupt file printout, hit ATTN
To restart an tnterruptedprintout,
then hit RETURN.
To terminate typing,
hit RETURN.
'

hit ATTN

hit ATTN agai.n, thentype

again and
kt

and

-31­
6'

1

;

~--~--~--~----------~------~--------------------~~~--------------------------~--~.I I

CORRECTING A SCRIPT FILE
Even if. you have been exceptionally careful when entering afile in Input mode, youwill probably want to makecorrections to your file.
In Edit mode, you can insert,
replace,. or delete entire lines, and also change parts of alinea Edit mode is entered in either of two ways:"

1. For a file previously created in the Input mode
filed away with the File command, "by using the commandandedit 9fn' script

2. After you have entered part of a Script file but have
not yet saved it with the File command, by issuing a nullline followed by RETURN in Input mode.
Operation in Edit mode is by means of a pointer, which canbe moved up
and down through the fileand can beinterrogated about its position in the file at any time. In'
order to make corrections, you must know where the pointeris located.
If you have entered Edit by method 1 above, the pointer is
at a blank line preceding the first line of your file; bymethod 2. it is at the ~ast Line of input.

POSITIONING THE POINTERThe TOp Command (top or t).
This command positions thepointer to the blank line preceding the first line of thefile.
It enables insertions to be made at the top of thefile.
Note: The pointer automatically performs a TOp if you reachthe bottom of the file (you will be notified with themessage EOF:, meaning end of file)and then issue a Find(f), Locate (1), or change (c) request.
The Next Command (next 'n' or n 'n').
If ·no number is
specified, 1 is assumed. Pointer moves down the specified
number of lines in the file.
If EOF is reached, Next
positions the pointer at the last line of the file. This
command functions as a Bottom request (see below) if 'n' isgreater than the number of lines between the pointer and thebottom of the file.
'n').
If no "'number is
The Up Command (up 'n' or u
specified, 1 is assumed. Moves the pointer up in the file

1

!

'\

the specified 'number of lines.
This functions as a Top
request if n is greater than the number of lines between
pointer and top of file. The line at which the pointer ispositioned is printed out.
The Bottom Command (bottom or bolo This
the pointer at the last line of the file.
The Print Command (print or pl.
uncertain about the position ofcommand. The system responds by
the pointer is directed.

command positions

If at any time you are
the pointer, issue thistyping the line at which

The pointer can be moved either according to its line
position (as described above), or by line context (searchingfor a line by its content). Ordinarily it is easier to docontext editing, since the relative position of a file entry
is not usually known.
The Locate Command (locate /'string'/ or 1 /'string 9 / ) .
This command searches for the first appearance of thespecified string of characters. The search begins with theline after which tpe pointer is positioned, and the line inwhich the string occurs is printed.

I!

The string is enclosed by any pair_of characters (called
delimiters) not occurring in it. Generally a slash is used
as a delimiter except when the string includ.es a slash. The
rule is that any character can be used as a string delimiteras long as it does not appear in the string, and as long as
the same character is used to enclose both sides of thestring. For example, the following are legitimate uses ofstring delimiters:
locate 8string8
locate .string.
The character string must be unique to the statement being
searched, since the first occurrence of the string will be. located. However, if it is not unique and is foun'd first in
the wrong line, the command can be issued. again. Remember to ,include in the string any blanks or other unique charactersthat appear in the statement being searched: that is, thestring to be searched must be typed exactly as it appears in .
your file. Delimiters are also used with the Change command(see below).
Note: If you receive an end-of-file message, (EOF:) rather
than the text line you are searching for, try reissuing t,he
Locate with fewer characters in the string. The reason for

-33­

i

i·

, .

this is that Edit can recognize only a character string thatappears in the file entirely within one line. Therefore, if
any part of your Locate string carries over to the nextline, Edit will search through your entire file withoutfinding it, and the pointer will be positioned at the end ofyour file.
The Find Command (find 'line' or f'line').
The Findrequest, unlike
Locate, is column dependent,
and nodelimiters are used. Hence,. to. find a line beginning incolumn 2 with the words nSectionone", typef

Section one

The first blank after the command is part of the command
format. The second blank indicates a blank in column 1" andthe search for nonblank characters begins· in column 2. As
in Locate, the line in which the characters occur is
printed.
Note: To find a tabbed line, you must press the tab key
before typing the characters yotiare searching for.
For
example, to find the subheading ft1. Changes to the Script
command" from the sample memo (see under ftGeneral Example on
Indentation ft ), you would type
find (2 tab presses) 1. -Changes to the Script command
In other words, after typing the command and one blankspace, you press the tab key twice and then type incharacters from the line you are searching for.

CHANGING PART OF A LINEThe Change Command (c /·string1'/'string2'/).
Change searches left to right in the current line for the.
first occurrence of string1 and replaces it with string2.
The current line is expanded or compressed as required(stringl and string2 can be of different lengths), and theline is printed in its changed form. If no match is found,the line remains unchanged, the message FIELD NOT FOUND isprinted, and the point.er (as above) remains positioned at
the current line so that the line can be operated on until
the pointer is moved. As for the Locate command, delimiters
for the string must not occur in either of the strings.
To delete, without substituting new characters for string1,
issue a null string2, as follows:c /'stringl'//-34­

Example Using Locate and Change Commands
Suppose the second line of the file below is to be searched
for and changed (note that the text begins in column4l.
The quick brown fox jumps
over the quiet stream.'....

If, by mistake, you issue
1 /qui/

Edit locates and prints
The quick brown fox jumps
since that is
occurs.

the line

inwhich theIf you know that the desired line
file, you issue

string "qui"'firstis the next -line

in thenotherwise, you rei~sue
1 /qui/ln either case. the system types
over.the quiet stream.

with the pointer now positioned at the desired. line, you
would use the Change command to make your correction.
S'ay you want the line to readover the quiet street.
Issue
c /strearn/street/,

The system types the altered line
over the quiet street.
and the pointer remains positioned· at that line.
Suppose you

now want tochange "street" to"streets".

'If

-35­

.1

.,
you issuec /et/ets/
Edit locates the first occurrence of Wet"
prints the altered line:(in "quiet") andover the quiets street.
~.

To correct this
this:error. you

have toissue something

like

,I

c /ts/t/
The system responds:
over the quiet street.
You have corrected your error.
Now change "street" to"streets· by including more letters in the string than you
did before (th~se letters . should be unique). Suppose you
issue:
c /eet/eets/
The first occurrence of "eet" is in ·street".
altered line would then be printed out:

The desired

over the quiet street$.
I~

To delete. say. the word "quiet". you could
command with no string2 specification:

use the Change

c /quiet//
The line now reads:
over thestreet.

If you decide to reinsert "quiet". issue:c /the/the quiet/
USing the Find Command. If you had used the Find command(instead of Locate) to search for the first line in theexample above. (remember. the line begins in column 4) you
could have typed:f

The quick

The first blank is required by format rules; the next threeblanks indicate . the occurrence of blanks in columns 1. 2,
and 3 of the line being searched for. Note the absence ofstring delimiters in the Find command.

-36­

Space Accomodations.
In the above examples, the changed
lines
were automatically
expandedor contractedtoaccommodate
additionsanddeletions.
Without
thisspace-accommodating feature of Scrip't, del~tion of the word"quiet"from"over the quiet street" would have left a gap:
over thestreetWhen making changes to charts and diagrams, you often haveto do your own space accommodating. especially if you want
to retain the space left by a deletion. Take the following
example:
2314
2311

RPQ
RPQ

23lJ56. 123lJS(There are two spaces on each side of 2314 and 2311.)
If, to remove the 11 from 2311. you typec /2311/23/.

the two spaces left by the deleted 11 would be compacted,
and the revised line (second line below) would read:
231lJ I. RPQ
23 I RPQ'I

23lJS612345 IIf, on the ',other hand" . you
string2 of the Change commandc /2311/23

include~ theblank spacesin/.

the desired spacing is retained (second line below):
2314
23

RPQI
RPQ I

23456
12345

Repeated Changes
The Change command can actually be issued just once to makea correction in any number of lines--either . on just thefirst, or on every occurrence of the string in those lines.
This is done by adding parameters to the Change command.
For example:
c /string/bring/ 10
In the next ten lines (starting with . the one pointed, to)"string". will be searched for and the fi·rst occurrence. of"string" in each line will be changed to "Dring"~.If youwant every occurrence of ·string" in those lines to bechanged to "bring" you need a second parameter, an asterisk:-37­

c /string/bring/ 10 *The * denotes "in every case".
Toinake the specified change in every line as well, use an
asterisk as the first parameter instead of a number:c /string/bring/ **Note:
You cannot use just the second parameter without
specifying a first parameter. For example, to change every
occurrence of a string in just one line, you cannot issueleaving a blank for the first parameter.
type:the number 1 for the first paralT'eter:

In sucha case,CHANGING AN ENTIRE LINEThe Retvpe Command (r 'line'). The current line is replacedwith 'line'. If no 'l'ine' ,is specified (that is, if only r
is typed) the current line.· is deleted, and the Input mode isentered. This is useful when it is necessary to replace thecurrent line with more than~one line, or when many additions
must be made to a file that 1. has already been created (it iseasier to use Input mode ['for this purpose) .. Remember thatyou must type a nulle,line ""to reenter Edit mode, and issue
the File command to save your insertions.
Retype corresponds in format rules to Find:'line' isseparated from the request by only one blank, and any otherblanks are considered part of 'line': no delimiters areUsed; and the request is column-dependent.
Example: We shall use'the.same two lines as in the example
above illustrating Locate; Change and Find (remember thatthe lines start in co!umn(4):The.quickbr0WTl fox j'umps
over"the quiet stream.
Let's use Retype to change "stream"·to "streets".
(This isa more laborious procedure, since Change is easier to use
for small changes; Retype is used here merely to compare itwith Change.)
Assuming the pointer is positioned at thedesired line~ issue:r-38­

over the quiet streets.

Note that the entire new line must be typed, since the oldline is going to be overlaid by the new one. Also, the same
number of blanks separate r from 'line' as were used in(Bothcommands
are
the
Find
commandabove.
column-dependent.)
The Delete Command (d tnt). starting with the current line,
the specified number of lines are deleted.
If no number is
specified, only the current line is deleted. The pointer ispositioned at the line after the last deleted line.
Thus, to reposition the pointer at the line followingt.hedeleted one(s), the next 'n' command is not issued (thiswould position it one line too far down).
Note: Because of this, before making additional changes;: itis helpful to issue
p (for Print) to ascertain current
line position following a Delete command .•ADDING A LINE IN EDIT MODE
The Insert Command (i 'line'). This command allows a line
to be added to a file without transferring to the Input
mode. The line is inserted after the line at which thepointer is positioned, and the pointer is advanced to theinserted line.
Thus, additional lines can be entered
between existing lines. A blank line can be inserted byusing one or more spaces for 'line' but, if 'line'isomitted and no spaces are inserted, the Input mode isentered. The same format rules as for Find and Retype areobserved.

Example of Use of Retype Command
to Insert Lines
As mentioned in the description of the Rety~e command, if r
is issued with no 'line' specified, the current line isdeleted, Input mode is entered (the word INPUT is typed by
the system), and many lines can be inserted in place of thedeleted line. Edit mode must be reentered later {null line
followed by RETURN) in order to file your additions.
For example, suppose the pointerline of the sample:

is positioned at the first.' The quick brown fox jumps
If you issue

-39­

r

followed immediately by RETURN. the system responds with:
INPUT:The line previously pointed to has now been deleted, and you
can insert any number of lines; in the file the insertedlines precede ·over . the quiet str eam". For example. toinsert a line beginning in column Il, · issue:
The slow green chicken hops
This first inserted line replaces. and begins incolumn as. the deleted line. If you then issue

the samearound the farmyard
and swims
the altered file will appear as:
The slow green chicken hops
around the farmyard
and swims
over the quiet stream.
In other words, the three inserted lines replace the deleted
one, and precede the next one ("over the quiet stream.") in
the file.
To review ••••• with the pointer at the first line of
The quick brown fox jumps
over the quiet stream.
we issued the commandr

System answered:
INPUT:

Then we entered
The slow green chicken hops
around the farmyard
and swims(null line)
The system now responds with
EDIT:

-40­

-I

Then we enter
file

- 0I
i

and the result is the revised file listed above.
1

Example of Use of Delete Command
to Insert Lines,.

The same result could have been obtained using Delete andInput. In the above example" with the pointer.positioned at
the first line. we issuedrfollowed immediately by
RETURN" - This caused Input mode to be 'entered.,Instead,this time 'we:issuedfollowed immediately byThis simply deletes the line (the system responds. wi th a click sound).
RETURN.

Then we issue
input
and proceed as with Retype (making additions in Input mode).

LISTING PART OF A FILE
In the process of editing, it is easy to lose track of thechanges that have beenmade~ .Byusing the Print::' command, we
can list one line. several lines/l or the entire filewithin Edit.mode.
(Remember that the command
script'fn'• options' produced an entire listing, . but inCMS commandenvironment, not in Edit mode. ) To ~print only one . :line,
issue

1

.1

P 1
or simply.p

To print part of a file. use Next/l Find, or Locate toposition the pointer at the first line to be printed, andissuep • n'

wheren:is the numberof.lines to be printed.
In order to print the entire file on the terminal,
issue
"

\

,

t
,
.1

1

where n is greater than the number of lines in the file.
Using the practice Script file in Exercise 1 (in Edit mode),
issue
t

P 5
P 3

You will notice that the p 3 command begins typing with thelast line typed by p 5.· This is because the pointer remains
positioned at the last line printed in a print command.

EXITING FROM EDIT MODE
There are three ways to·exit from the Edit environment:
1.

To save your edited
environment, issue

text

and

enter

CMS

commandfile
followed by RETURN.

system responds with

R;T= 'CPU times· 'time of day'2;

If you decide not to save the changes made in Edit, andto enter CMS command environment" issue
quitfollowed by RETURN.
3.

System will respond as before.

If you wish to enter
edited text, issue

Inputmode

without saving

yourinput.
followed by RETURN.
You will then be returned to Input environment, and be able
to enter lines after the one pointed to when you issued the
input request.
Input entries will be inserted into yourfile at that point.

-42­
,
.

'"

..-,"

EXERCISE 3
Make the following changes to your practice Script file:
Change"morning" to "mid-afternoon".

Retype. "The girl from Atlanta is pretty" as "Theman from Sioux City is handsome".

Remove"lives" from the last line.

A possible answer is listed on the next page.

EXERCISE 4
The sample Script file. called "SCRIPT example"" that·· isincluded with this marmal employs a wider variety ofcommands than the 'practice file you just created, printed,
and edited. but you might find that SCRIPT example is easierto create because the commands it requires are simpler.tomaster than indentation commands.
Using any filename you wish. write your own file. print it
out, and make any necessary corrections until it looks like
SCRIP'l' . example~(Crib sheet
following "Sample Script
File". )
.

-43-

I

I

TYPICAL TERMINAL SESSION IN ANSWER TO EXERCISE 3

edit exper1 script
EDIT:
f Pre-positional,
Prepositional Phrases: From morning coffee break to afternoon.c /morning/mid-afternoon/
prepositional Phrases: . From mid,..af-ternoon coffee break to afternoon
I /Atlanta/
The girl. from Atlanta is pretty.
{Adjective phrase" from Atlanta,r The man from Sioux City is hapdsome.
(Adjective phrase,
i from Sioux Cityn

modifies the noun girl.)
c /girl/man/
modifies the noun man.)
I /lives/
He lives in the valley.
(Adverb phrase, in the valley, modifies
I /lives/
the verb lives.)c / lives//
the verb.)
file
R~ T:::O. 21/1.27 11..18.51 .

Notes: The Retype'd line (r'I'he man.from•••• l was .too longto fit on this page. Therefore, . part . - of the revised
sentence, "from sioux City·,
was Ihsert'ed under the
Retype~d line.
Locate /lives/ was issued erroneously ("lives" occurs in' ~tJ1eline above the line searched, as well as in the 'line
searched). Therefore it was issued a second time. The Next
command could have been used just as well.
In order to remove the space after the ·b" in "verb" andbefore the period, a space is included in string1 of the
Change command. If the commandc /lives//
had been issued, the result would have been:
the verb .)There are other ways these revisions could have been made;this terminal session merely illustrates one of them.
If printed out using the Script command for printout,. theEdit'ed file, experl script, would look like this£'

-44­

~

\

)

15a.

Phrases Specified by Grammatical structure

From mid-afternoon coffee brea,k. to
Prepositional Phrases:
afternoon . coffee break ,is 'too long.;(Noun phrase describing coffee breaks is. used as subject.)
The manfrom Siouxcity ishandsome ..
(Adjective phrase, from
Sioux 'City,
modifies the noun man.)
He lives in the valley_(Adverb phrase, inthe valley, modifi·es the verb.. )

I

,I

I

-45­

MAINTAINING SCRIPT FILES.. :IThis section describes procedures for listing your files(list·f), transferrino files to another user (xfer), or ,fromanother user to you ,(disk load), and erasing files (erase).
FILETRA.NSFER
If'. another user wishes . to access one or several of yourfifes'/ he: mi'ght ask you td transfer ·them to him; that. is, tohis 'ID'•. I·f you agree to do this, proceed as follows: Issue"CP xfer d to 'ID'

System responds
R; T= 'CPU times' 'time of day'For each file that you wish to transfer, issue.. disk dump "fn' script,
System will respond each time with
R; T= 'CPU times'':time -of day'At the completion of your transfer, issue
cp xfer doff
System response isR; T='CPU times' 'time of day'If, instead, files are begin transferred toreceive the message~.CARDS

you, after you

XFERD by 'ID' •••issue
disk load
System responds'FILENAME'SCRIPTP1
LOADED
R; T= 'CPU times' 'time of day'
Note: Disk' 'load will overlay" an already existing
the same name on your disk.

-46­

file ofFILE ERASING AND LISTING
Note:

Read '"Listing- below before erasing files.

Erasing
Since you have a limited amount of disk space, you will not
be able to maintain voluminous files-.,-nor, in fact, are you
likely to want to, since a certain number of your files willprobably become obsolete." Using the Erase command, you candelete specified files from your disk.
(Make certain you
wish to do this, since no copy of the file will remain under
your ID). The command format is:erase 'fn' script
Listing
In preparation for an Erase, it is sometimes a good idea tohave a listing of all: or part, ·of your files on your disk.
The command is
listf
or
I

followed by RETURN.
You will get a response of this type:
FILENAME FILETYPESAMPLE·SCRIPTPRAC
SCRIPTRi T= 'CPU times'

MODE
P5
P5

NO.REC.
018
033

DATE
8/27
9/1

If all your files are Script filetype (column 2 of thelisting above), the only column that need concern you is thefirst, called FILENAME.
If, on the other- hand, .you have files other than Script
filetype, you will be interested in the complete form of thelistf command, which is
listf 'filename' 'filetype'where 'filename', or 'filetype', or both, can be denoted'"all'" by using an asterisk (*).
For example, if you wa-nt alisting of all files of a specified filename,but any
filetype, type-r,n­listf -filename' *If~instead" you want a listing of all files of a specified
filetype, but of any filenameqtype
lisft * 'filetype'

Finally,'either

if youwant alistingof allyour files.

type. .. Ii listf.

or
listf '**c
Note:: Wait ,for the R; T:::: • CPU times' • time of day' message
at the compl~tion of each command beforeissliing anotherce,rnfnand". summary
In preparation for'an erase (or for any other reason) you
can list your files by filename, filetype, or neither (thatis, all your files regardless of name or type} using thelistf command, as shown helow".
(\,'

For a specific file:
listf 'filename- 'filetype'

By filename:listf • filename'·*By filetype:
listf "';.- filetype'.:.­For all files:
listf
or

!

.'

-listf '"*You are now ready to erase. The Erase procedure is the same
whet.heror not you have issued listf. For every file you
wish:to eraSei issue.
erase 'filename- script-48­

OTHER CMS FILE MAINTENANCE COMMANDS
~.

\

j

'l'here are additional eMS commands thatlearn to enhance your· terminal sessions.•.you mightwant. to"tape" commands enable you to dump your files, forbackup, from your disk to magnetic tape, and to load themback from tape to disk as you need them.

~eStatistics on your disk use--number of records in use, total
available records, percentage of
total space in use,etc.--can be ascertained with the "stat" command.
Through another usage of the listf command, you can perform
certain operations, such as disk dump, tape dump, or print
on the offline printer, on every file on your disk (or every
file of a specified filetype, like Script), by issuing justone command.
These
commands
andothersaredescribed
CP-67/CMS User·s Guide (see Bibliography).

in

the

-49~

- - - -____________________~r-~________________________________~______________________________

LOGGING OUT
Normally, when you are working on a file (creating, editing,printing, etc.) you are in the CMS command environment. At
the completion of your work you will want to transfer out of
CMS to CP(Control Program) environment by issuing the
Logout command to CMS, and then logout a second time before
turning power off.
To log out from CMS, type
logoutand hit RETURN.
The-system respondsi

R: T= "CPU times' 'time of day'
CP ENTERED, REQUEST., PLEASE

A<:tua11y, you canwhile in CMS.

bypass this first logout ' by hitting ATTN

Then, to':log out from CP, type:'16'<g()Ut
and hit RETURN.
The system types out three sets of times:
CONNECT: 'time-

VIRTCPU= -time'

TOTCPU=, 'time­andLOGOUT AT -time- ON -datePress the OFF button on the te~ina1.

-50­--~----------------------------~----------------------------~--~--------------------------~

SAMPLE SCRIPT FILE
FORMATTEDSCRIPT Example
This example

will demonstrate someof thecapabilities of

the SCRIPT facility_ This file was created by issuing:
edit example script
Since thefile did notplaced directly into thepreviously exist, theterminal was

Input environment.

This paragraph

was double-spaced with the .ds control.
on thisthepage--it was createdheader line

in' ;ohe(Notice the heading

using the .ce-heading'

command, sincedoesn-t start

printing

until the second page.)No
Break command
was needed
here,
since the.ss(Single-Space) control acts as a break. Alt hough this i s inFill mode, tabular information
can be included.
For
example:SPACESINGLE SPACEDOUBLE SPACE
The leading
separately.

.SP
.SS
.DS

blanks.sp.ss.ds
caused

each

line

to

be

handledUse of the Line Length control allows space to be left
within a page for figures or drawings. NaturallYr itmay
take some experimentation to find how many paragraphs will
fit next to a figure.

new line length must takeeffect at a paragraph"since
it acts as a Break. The switch
back to standard line length,
usually 60. also is a Break,and must end
a paragraph.
This works only in Fill mode.
By switching out of Fill mode
CAPTIONand doing some justificationby eye, fancier effects can be obtained. This also
takes some practice and experimentation.

~he

-51­

SCRIPT Example

PARAGRAPHS
If no space follows a paragraph heading, and if'tbe
paragraphs are not indented. a Break is necessary in Fillmode, to keep the heading line from being justified.
A few leading blanks are the easiest way to force a
Break and separate paragraphS ~ 'Aline with only a blank will
also force a Break and a blank line, if the following line
also begins with a ?lank, as follows:~n··\.J ..

i'.

.

The Center con:tr~H is handy . for small figures includedin thet;ext~' A .'cein- front6f~achline'; of'thefl.gureis
necessary. Note that lea,ding blanks count for, figuring:thelength to ,be centered:' ­- I' -,--'~ ~I
I~. FORMAT-,- - - - ... .-

.'

"

.;.

~--

EXAMPLE n

E';""- - - '_. ­.

-'. ­ I. "t,Figure 'EX.A
.

.

"~

:

" , , ' ".

. '.

. ~".

<:.

. ,

... ;
t

.

"', '

. .'.

. .

..•.. ;

.~

"'

.

'.

, '.

. ',:.?;.;

.

:
."

.

.
'

UNFORMATTED

~

\

J

.t.

n

.tm 10.he
SCRIPT Example.ce
SCRIPT Example
.sp 2
.ds
This example "will demonstrate some of the capabilities of the
SCRIPT facility. This file was created by issuing:.bredit example script.brSince the file did not previously exist. the terminal was placed
directly into the Input environment. This paragraph was
double-spaced with the .ds control.
(Notice the heading on thispage--it was created using the .ce command. since the headerline in .he 'heading' doesn't start printing until the second
page. ).ssosp
No Break command was needed her~. since the .ss <Single-Space)control acts as a break. Although this is in Fill mode,. tabular
information can be included. For example:
.sp
SPACE
.SP
.sp
SINGLE SPACE.SS ' . ss
DOUBLE SPACE
.DS
.ds
.sp
The leading blanks caused each line to be handled
separately •• sp
Use of the Line Length control allows space to be left withina page for figures or drawings. Naturally, it may take someexperimentation to find how many paragraphs will fit next
to a figure •• 11 30.sp
The new line length must take effect at a paragraph, since it
acts as a Break. The switch back to standard line length,
usually 60, also is a Break, and must end a paragraph. This works
only in Fill mode •• 11 60.nf
By switching out of Fill mode
CAPTIONand doing some justificationby eye. fancier effects can be obtained. This also
takes some practice and experimentation •• sp 2.fi.cp 5
PARAGRAPHS.br
If no space follows a paragraph heading, and if the paragraphs

-53­

,,
I
I
I

are not indented, a Break is necessary in Fill mode, tokeep the heading line from being justified.
A few leading blanks are the easiest way to force a
Break and separate paragraphs. A line with only a blank will
also force a Break, and a blank line, if the following line also
begins with a blank, as follows:
The Center control is handy for small figures includedin the text. A .ce in front of each line of the figure isnecessary. Note that leading blanks count for figuring
the length to be centered:
.cp 5

.sp
.ce
.ce·
I FORMAT.ce

EXAtl:PLE n

I

E

.ce
.ce
Figure EX.A

-54­

~.
~/

APPENDIX A: COMMANr:S IN EDIT MODE

(in alphabetical order)
Edit mode is entered when
edit 'filename' script
is typed for a file that was previously saved, using theSave and/or File commands. Edit mode can also be entered byhitting RETURN on a null line while in Input mode.
In this listing, the standard
given at the right.
Bottomformat ofeach commandisbopositions the pointer at the last line of the file.
changec /'stringl'/'string2'/'string2' replaces the first occurrence of 'string1' in theline pointed to. The pointer is not advanced by thiscommand. The changed line is printed out.
c /'string1'/'string2'/ In''n' denotes the number ofoccurrence of 'stringl'.

*

lines

to be

searched forthe* means that every occurrence of string1, not just thefirst, is to be replaced by string2 in In' lines.
(If * isspecified, 'n t must be specified, even if it is only 1.>
Deleted'n'Deletes n lines starting with the line pointed to.
Thepointer is positioned at the line following.the last deleted
line. If 'n' is omitted, l i s assumed.
File

file

Saves a copy of your file on your disk. Transfers-from the·Edit environment to the CMS command environment.
(See
Appendix C for a summary of commands that can be used in theeMS command environment.)
Find

f 'characters'

The search begins with the line after the line where thepointer ispositioned; a column-dependentmatch with-55­

'characters' is sought, and if found, the line in which itis printed out .. The pointer 'is positioned "at thisline. Note:
Do not surround 'characters' witli delimiters(slashes, etc.).

oec~rsi

Input

Trail.sfers· froJllthe;Edit to the Inputenvi.ronment. .(SeeAppendixB .. fora summary. of Script commands , that can· beplaced in a file in the Input. environment.)
Inserti'line'

Inserts 'line' immediately following the line at which thepointer is positioned. The pointer is then posi tioned ..at theinserted line. A blank line can be inserted by using one or.more spaces . for 'line'. If .nothing is typed. for 'line' (noteven spaces) Input mode is entered.
Locate. I /'string'/,

The 'search begins with . the', line after the line where thepointer is positioned; the search is.' from left to right ineach line for the ,·first occurrence of 'string'. If fourtd,
the entire line containi~g, 'string' is printed. out, and thepointer is positioned at, that line.
Note the us'e of stri.ng
delimiters.• ···.(Remember. that the', Find. command did not use
delimiters.)

Moves the pointer ahead n lines.
If no • n' is specified., 1
is assumed. (If 'n' is larger than the number of lines
between the pointer and the bottom of the file, an automatic
Bottom is performed.)
Print
Prints out In' lines, beginning with the line pointed to.
Pointer will be positioned at the last line printed. If 'n'
is omitted, 1 is assume~.
(See Appendix C for a summary of
the .·Print command that can.be used in the CMS commandenvironment.)q

Prevents saving ofanewlY'created file or of changes to an
existing file. The CMS command environment is. entered.
(See Appendix C for a summary of 'commands that· can be usedin.theCMS.command environment.)·

-56­

.

r -line'

Retype~.
/Replaces the line currently pointed to with 'line': thepointer remains positioned at -line'.
If 'line' is omitted
in this command, the current line is deleted and Input mode
entered.. In other words, the Retype command on a null line
has the same effect as the pair of commands d andi;namely, delete the current line and enter Input environment.
save

Save

Saves a copy of your file on your disk and enters Input
environment.
(compare this with File, which transfers intoeMS command environment.)t

Positions pointer to the blank line preceding the firstprinted line of your file (whereby lines can be inserted atthe very beginning of your file) •

.

u tn'
Pesi tions pointer ;n' lines above line pointed .·to. . If t n~
is omitted, 1 is assumed. If tn' is larger than the:numperof lines b~tween the pointer line and the topof·the file,
an automatic Top is performed~-57­

APPENDIX B: SCRIPT COMMANDS(by functLonal category)

Input mode is entered when
edLt 'fLlename' script
is typed for a file that does not exist.· Another way toenter Input mode from Edit mode is to type the Edit commandi , which Ls an abbreviation for "input". Entry to Input
mode can also be made from several other Edit commands (SeeAppendix A, "Insert" and "Retype").
The standard format for each·command Ls shown on the right.
Page Layout
BottOm margLn.bm 'n'Causes n blank lines to be' left
Default value = 3 lines.

at the bottom of each page.

Heading margin.hm 'n'Causes n blank lines to be .left between the heading and thefirst line cif text.
(This does not include top margin, .tm)
Default value = 1 line.
Line length
Specifies a line length of n characters.
characters.
Page length

Default value = 60

.pl ' n'Specifies n lines of printing perlines.
TOp margj..n

page.

Default value = 61=~• tm • nl

Specifies the number of lines to be left for the top marginof each page (includes the heading line). Default value = 5lines. Check to see that .tm is always larger than .hro.
Note:
All ofspecification.

-58­

the

above

commands

require. an, nilPage Control
Conditional page eject.cp 'n'Causes a page eject if fewer thanpage.
'n' must be specified.
Heading line

'n' lines are left on the.he 'heading line'

Prints 'heading line' at the top of each subsequent page.
This command must be followed by .pa if the heading is toappear on the first page of a printed fil~. Note: This is
the only command that is typed together with the text thatit controls, all on the same line•
Unconditional page eject .

• pa

('n')

The line following • pa
Causes an immediate' page eject.
(' n') will beprinteq on a new page.
'n' is optional; if
specified,. it will be the page number of the new page.
Otherwise, sequential page numbering will take piace.
Page number.pn on (default condition).pn off.pn offno

The default is .pn on and therefore does not have to be
specified if sequential page numbering is desired.
The
command .pn off suppresses printing of page numbers; page
numbering will resume if .pn on is specified later on in the
file.
The command .pn· offno suppresses . printing . andinternal registering of page numbers.

Spacing
Double space.ds

Causes double spacing of the printed page•Space
Produces n blank lines
omitted. 1 is assumed.

• sp 'n'between printedlines.

If'n' is-59­

Single space.ssSingle-spaces the printed page. This is the default modeand therefore has to be-specified only in order to cancel aprevious double space (.ds) command.

,.
Paragraph -Layout~-

Indent.in 'n'Indents the left side of the printed page 'n' spaces.
Offset·.. of'n'Offsets the lines following -this comlt'a'nd, ,except for ,thefirst line, 'n' spaces from the printed left margin. Thismeans that if a previous indent' (.in In') has been set,
offset begins at the indented cdlumn~'
Tab settirig~tb• n1n2'Ji3 ••• nNe

Creates internal tab'settings'of n1:.~.nN that take effectwhen the tab key is depressed. Overrides default settingsof 5,- 10. 15 ••• 75.) Tabbing~ like offsetting, is affe·cted
by a previously set indent value •Undent• un 'n'

The line following th~scommand will start 'n'· spaces
further-left th~mthe column' :setby • in 'n'. Cannot be used
if no irident value (.in"n') -has been set:: 'TheurtdEm:t 'n'cannot be larger- than the indent' "n' preceding it~

Formatting Modes
Break

.br

prevents line· justification inFill mode.
Therefore,
information typed before' and_ after ;. br "will --appear" On
separate lines of the printout. Breaking is not necessary
in No-Fill (.nf) mode.
Note that many· of the Script-break between ptinted-:liries.­

commands themselvescause a,,'Center~1.

J

The immediately following
printed page.
Fill mode

.ce
line

will

be centered

on

the

.fi

Causes line justification. Fill mode is the default mode in
Script.
It therefore needs to be set only to cancel apreviously set 'no-fill· (.nf) •.
No-fill mode.nfPrevents line justification. Lines are printed exactly as
they were typed in the file. Therefore, no breaking (.br)
is required between typed lines.

Special Feature
Read.• rd 'n''n' lines .can be . typed. in durinq terminal pri.ntout.
If In'
is omitted, l ' is 'assumed.
No formatting' ,takes place onthese lines.

Manuscript Layout
Append'l'ppends the contents of the named file
end of·the file just printed.
Imbed

I­

.• ap' 'filename'('filename') to the.im 'filename'Places the contents of the named file ('filename') at a
specified location within another fileiprintout of theoriginal file resumes when printing of the imbedded file has
been completed.

i.
I

I
i

-61­

.'

APPENDIX C:COMMANDS IN CMS. COMMAN r ENVIRONMENTThe CMS commandenvironment
environment by typingisentered

from

the

CP

ipl cms
after logging in (login ·userid').
from Edit mode by typing

Entry toCMS can be made

file
or
quit

Erasing

erase 'filename' 'filetype'

Erases from youJ; disk the file or files specified in'filename' and ·filetype·"(This manual is concerned with'filetype· Script.)
An qsterisk (*) used in place of'filename·oI? 'filetype·specifies"all".
"Killing" typeout(ATTN) (ATTN) kt

stops terminal typeout begun by a CMS command.
Listing files

listf 'filename' 'filetype'

Prints a table of the specified files that you have on your
disk.
Lists
filename. filetype,
filemode,
number ofrecords, and the date last worked on (for example, changed
under Edit and filed away) for .each file specified in thelistf command. An asterisk (*) used in place of 'filename'or 'filetype' spe~ified "all".
Printing files
The command format isprintf 'filename' script '1st line' 'last line'orscript 'filename' 'options·
The first command above enables you to print a part of your
Script file, at the terminal. unformatted by the control
words. The options are beginning- line number and last line
number.
(If neither of the options is specified. the entire-62­

file will be printed.)
The second command is used to print the entire file,the' terminal or offline
formatted or unformatted, atprinter. See-Printing a Script File" in the manual for a
description of options that can be used with the Script
command.
Transferring files
The command formats are
cp xfer d to 'userid'disk dump 'filertalI'e' 'filetype'or
disk load
Use the first two commands. to transfer a copy of your files
to a another user: you must issue the .second command foreach file that you wish to transfer.
If a file has been transferred to you from another user (youare notified with the message ... CARDSXFERD BY 'USERID' •• ),issue the third command above, until the message •• CARDSXFERD BY 'USERID' •• no longer appears.
Note:

/'

,-

Transferring a file does not erase it from your disk.

.,-63 ...

EIBLIOGRAPHY'For fUrther informat.ion 'on the .CP-6 7/CMS ,system and . thevirbial' machine
concept.:refer
to 'thefollowing
publications:.­,.

Adair, R. J •• R. a .. Bayles, L. W. Comeau, and R. J. Creasy.
A Virtual Machine System for· the 360/40 4 ,IB101
Cambridge Scientific Center Report 320-2007,
Cambridge, Massachusetts, May 1966 .. 'Field.' M.. S... Multi Access 'Systems ':'The Virtual Machine Approach"IBM Cambridge Scientific Center Report 320-2033,. Cambridge, Massachus'etts,'"septembe:t1968~.,
Hendricks, E .. C., C .. I. Johnson, R. D. seawright, ONLINE/OS
User's Guide, IBM Cambridge Scientific Center Report320-2037, cambridge, Massachusetts, FebJ:'uary 1969.
Hendricks, E. C."C~ I.Johhson .. 'R~ nooSeawright,Introduct;ion to. ONLINE/OS, IBM cambridge Scientific -center Report320-2036" Ca.mbridge,Massacnusetts,February 1969 •.
Madnick.· S. E. ~G.A. Moulton.' ,SCRiPT:" An Online Manuscript
Processing'System,IBti] Cambridge Scientific Cent.erReport"320-2023, ahd IEEE Transactions 6nEngineering Writing
Systems. August 1968: . , '...
.
"'-: . ,
The followingdocument$are availablethro~gh your local 'IBM
Branch Office:CP-67/CMS System Description Manual, IBM Form Number GH20­
0802-1CP-67/CMS User's Guide, IBM Form Number GH20-0859-0
CP-67 Operator's Guide, IBM Form Number GH20-0856-0
CP-67 Program Logic Manual, IBM Form Number GY20-0590-0
eMS Program Logic Manual, IBM Form Number. GY20-0591-0
CP-67/CMS Installation Guide, IBM Form Number GH20-0857-0"

INtEX TO COMMANDS('.

\

The symbols placed to the left of index entries indicate theenvironment (s·) in· which commandsar~entered (E=Edit,
S=Script).
CMS

CMS Commands (Summary. Appendix C)

62

CMS, E, S

Deletion symbols (a and6

E

Edit commands. Summary (Appendix A).botto~. changedeletefile
findinsertlocate
next
print
quit
retype
save
top
up

¢)

32
55

33
311
39, 111
7, 112311, 36
39
33
32

33
112
38, 39
7

32
32

CMS

Erase

47

CMS

Killing typeout (kt)

31

CMS

Listf

117

Login preparation

2

CP

Login

2

CMS, CP

Logout50

S

Script commands
Summary (Appendix B)
.. ap
.hm
.hr
.. ce
.cp
.ds
.fi
.. he
.hm
.im
.in
.11
.nf

10

I

58

23
11
16
111
13
111
15
10
11
23
16
11
15

,
I

" !

"';65­.

~----------------------------------------------------------------------------------~~.

GH20-0860"()

."

.of
.pa
.pI
.pn

18
12
11
12
24
14
14
19
11
11

.rd

.sp
.5S

.th
.. tm
.un
CMS.·CP

Xfer

46

"

()
'tI

~

--s:
()

!!!

<
CD

;;J

0'

;:I

w

('\

()

s:

(fl
(fl

Q

:S'

.c
..3:
..

.!!/

'

:l
C

~

..,"0

;5'

S

~

;5'

C

(n

>­
G)

:t

,:>

1'0)

0

6(1)
~
.0

'.

International Business Machines Corporation
Data Processing Division
112 East Post Road, White Plains, New York 10601(USA only), IBM World Trade Corporation
821 United Nations Plaza, New York, New York 10017(International)•••••••••

••

:,'

e"

~

r

READER'S COMMENT FORM
GH20-0860-0(CP-67/CMS) Version 3

CMS Script User's Manual

Please comment on the usefulness and readability of this publication, suggest additions anddeletions, and list specific errors and omissions (give page numbers). All comments and sugges­
tions become the property of IBM. If you wish a reply, be sure to include your name and address.

COMMENTS

fold

fold

fold

fold

.---- ­"

• Thank you for your cooperation. No postage necessary if mailed in the U.S.A.
FOLD ON TWO LINES, STAPLE AND MAIL.

GH20-0860-0

YOUR COMMENTS PLEASE ...
Your comments on the other side of this form will help us Improve' future editions of this pub~lication.Each reply will be carefully reviewed by the persons responsible for writing and pub­'lishing this material.
Please note that requests for copies of publications and for assistance in u.tilizing your IBM
system should be, directed to your IBM representative or th~' JBM branch office serving yourloc;ality.

\':

fold

fold

..

.............................................................. " ........................................................................ ," ................................................................................................ .
FIRST CLASSPERMIT NO, 1359
WH lIE PLAI NS, N. 't.

. •'.
BUSINESS

REPLY

MAIL

NO POSTAGE NECESSARY IF MAILED IN THE UNITED STATESPOSTAGE WILL BE PAID BY, . ,IBM Corporation
112 East Post Road
White Plains, N. Y. 10601

c

E
,,;

Attention: Technical Publicotions,.................... " ............................................ " ................................................................................................................................................... ".. .. .. .. .. .. .... :

fold

~

fold

;?
Cl>

~~.

-"

a. '" ' "/

:;.

c

en

~

):.

G')

:r::

I\J

0

6

00
O'J
0

6

International Business Machines Corporation'
Data Processing Division
112 East Post Road, White Plains, N.Y.I060l[USA Qnlyl.·
IBM World Trade Corporation
821 United Nations Plaza, NewYork,NewYbrk10017 .
[International].

0":- ~,:'.~..

L