GH20 0859 0_CP67_Version_3_Users_Guide_Oct70 0 CP67 Version 3 Users Guide Oct70

GH20-0859-0_CP67_Version_3_Users_Guide_Oct70 GH20-0859-0_CP67_Version_3_Users_Guide_Oct70

User Manual: GH20-0859-0_CP67_Version_3_Users_Guide_Oct70

Open the PDF directly: View PDF PDF.
Page Count: 608

DownloadGH20-0859-0_CP67_Version_3_Users_Guide_Oct70 GH20-0859-0 CP67 Version 3 Users Guide Oct70
Open PDF In BrowserView PDF
GH20-0859-O

Type III

Control Program-67/Cambridge Monitor System
(CP-67/CMS) Version 3
Program Number 3600-05.2.005
User's Guide

CP-67/CMS is a general purpose time-sharing system
developed for the IBM System/360. This guide
describes the facilities of CP-67/CMS and provides detailed information about the user
commands available and their usage.

Class A Program

First Edition (October 1970)
This Type III Program performs functions that may be fundamental to the operation and maintenance
of a 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, AP AR 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 Imal evaluation as to the usefulness of this program in your own
environment.
THE FOREGOING IS IN LIEU OF ALL WARRANTIES EXPRESSED OR IMPLIED, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE.
This edition applies to Version 3, Modification Level 0, of ControIProgram-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 and
current.
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,
1133 Westchester Avenue, White Plains, New York 10604.

PREFACE
The following documents
User's Guide.
Fortran

are

referenced

in the

CP-67/CMS

OS/360 Fortran IV Language
GC28-6515
Systew/360 Basic Fortran IV Language
GC28-6629
Syste~/360

Fortran IV Library Subprograms

GC28-6596
OS/360 Fortran IV (G and H) Programmer's Guide
GC28-6817
Scientific SubroutinE Package
Scientific Subroutine Package - Version II
Programmer's Manual
GH20-0205
PL/I

OS/360 PL/I

(F)

Programmer's Guide

GC2~-6594

OS/360 PL/I Subroutine Library Computational
Subroutines
GC28-6590
GC28-6808

A PL/I Primer
Assembler-

OS/360 Assembler Language
GC28-6514
OS/360 Assembler (F) Programmer's Guide
GC26-3756

CP-67/CMS Documents - CP-67 Operator·s Guide GH20-0856
CP-67 Program Logic

~anual

GY20-0590

ctJ"S Prograrr' Logic Manua 1 GY20-0591
CP-67/CMS Installation Guide GH20-0857
C~S

SCRIPT User's Manual GH20-0860

i

SNOBOL

CMS
SNOBOL User's
Manual, Type
III
Documentation, Program
360D-03. 2,. 016, IBM
Corporation,
DP
Program
Information
Department,
40
Saw
Mill
River
Road,
Hawthorne, New York. October, 1910.

BRUIN

CMS
BRUIN
User's
Manual, Type
III
Documentation, Program
3600-03.3.013. IBM
Corporation,
DP
Program
Information
Department,
40
Saw
Mill
River
Road,
Hawthorne, New York, October, 1910.

Miscellaneous- System/360 Principles of Operation
GA22-6821
2140/2141 Communications Terminal
Operator's Guide
GA21-3001
OS/360-Supervisor & Data Management
Macro-Instructions
GC28-6647

ii

CP-67/CMS User's Guide
CONTENTS
Introduction
Components of the System
System Environment
The Control Program, CP-67
Cambridge Monitor System
CMS Batch Monitor
CP-67/CMS Sample Terminal Session

1
1
1
2
4

5
6

CP-67 Terminal Usage
2741 Characteristics
2741 Initiation Procedures
1050 Characterisitcs
1050 Initiation Procedures
Type 33 Teletype Characteristics
Type 35 Teletype Characteristics

16
17
18
18
20
24
25

CP-67/CMS Conventions
Logging Procedures
CP Login
CMS Initialization
CP Logout
Dialing a Multiaccess System
Dialing
Disconnecting
General Typing Conventions
Attention Interrupt
CMS File Conventions
Disk Facilities
File Identifiers
File Sizes
Disk Considerations
Environment Conventions
CP-67/CMS Environment, Commands, and Requests

27

CMS Commands
File Creation, Maintenance, and Manipulation
ALTER
CEDIT
CLOSIO
COMBINE
EDIT
Operation of the context Editor
Line Pointer
Saving Intermediate Results
Input Environment
Edit Environment
Edit Request
File (Record) Formats
Memo Files
iii

27
27
30
30
32
32
33
34
36
37
37

38
41
41
43

45
46

50
52
54
55
57

59
60
60
60
61
61
62
63
63

SCRIPT Files
Record Lengths
Tab settings
serialization of Records
Special Characters
Logical Tab Character
Logical Backspace Character
BACKSPACE Request
BLANl< Request
BOTTOM Request
BRIEF Request
CHANGE Request
DELETE Request
FILE Request
FIND Request
INPUT Request
INSERT Request
LOCATE Request
NEXT Request
OVERLAY Request
PRINT Request
QUIT Request
REPEAT Request
RETYPE Request
SAVE Request
SERIAL ~eqnest
TABDEF -Request
TABSET Request
TOP Request
UP Request
VERIFY Request
X and Y Request
ZONE Request
ERASE
FILEDEF
FINIS
LISTF
OFFLINE
PRINTF
SCRIPT
Script Control Words
APPEND Control
BOTTOM MARGIN Control
BREAK Control
CENTER Control
COMMENT Control
CONCATENATE Control
CONDITIONAL PAGE Control
DOUBLE SPACE Control
FORMAT Control
HEADING Control
HEADING MARGIN Control
IMBED Control
iv

63

63
64
65
65
65
66
69
11

12
13
14
16
17
79
81
82
84
86
87
89

90
91
92

93
9:4

96
97
99
100
101
102
103
105
107
112
114
118
124
121
131
132
133
134
135
136
137
138
139
140
141
142
143

INDENT Control
JUSTIFY Control
LINE LENGTH Control
NO CONCATENATE Control
NO FORMAT Control
NO JUSTIFY Control
OFFSET Control
PAGE Control
PAGE LENGTH Control
PAGE NUMBER Control
READ Control
SPACE Control
SINGLE SPACE Control
TAB SETTING Control
TOP MARGIN Control
UNDENT Control
SPLIT
STATE
UPDATE
Execution Control
EXEC
Special Features of EXEC
Labels
EXEC Words (&words)
Numeric Variables
Keyword Variables
Exec-Set Keywords
User-Specified Keywords
Exec Control Words
Profile EXEC
GENMOD
GLOBAL
LOAD
LOADMOD
REUSE
START
USE

$
Debugging Facilities
CLROVER
DEBUG
BREAR
CAW
CSW
DEF
DUMP
GO
GPR
IPL
KX
ORIGIN
PSW
RESTART
v

144
145
146
lLJ7

148
149
150
151
152
153
154
155
156
157
158
159
164
167
168
113
115
119
119
179
180
180
180
181
181
188
189
192
196
202
204
206
208
210
212
214
218
221
227
228
229
232
235
238
240
241
242
244
246

RETURN

SET
STORE
TIN
X

SETERR
SETOVER
Language Processors
ASSEMBLE
Assembler Language Programming
Program Naming
Program Entry
Program Exit
Linkage to CMS Commands and Routines
CMS Macros
C1, a card read punch unit, and a printer. The real
systew usually has a larger number of disk drives, a drum,
tape drives, and perhaps more core storage.
Because there is not room in real core for all users'
virtual core"
a technique called "paging" is used by the
system. Virtual core is divided into 4096-byte blocks of
storage called ·pages·. All but ~urrently active pages are
kept by the system on direct access secondary storage: this
direct access space is allocated only on a demand basis: as
active and inactive pages change status they are "paged" in
and out of real core on demand. While the paging operation
is being performed for one virtual machine, another can be
operating. The paging operation, and resultant allocation
of real core to a given user's pages, is transparent to the
user. Special hardware is provided on the System/360 Model
61 that translates, at execution time, the user's (or user
program's) addresses into the current real addresses of the
relocated
pages.
This is
called
"dynamic
address
translation" and is transparent to the user.
All virtual machine I/O operations are handled by CP, which
must translate them into real machine I/O operations. This
requires two translations, accomplished as follows:
CP
intercepts all user I/O when Start I/O (SIO> is issued. It
translates virtual
device addresses into
real device
addresses, translates virtual core storage addresses into
real core storage addresses, ensures that all necessary
pages are in real core storage, builds a channel command
word (CCW) string for the user, and issues SIO when the
channel is free.
The virtual machine is not given control
from the time it issues an SIO until CP issues the real SIO
and delivers the resulting condition code to the virtual
machine. In the meantime, other virtual machines may be
executing. When CP receives an interrupt indicating I/O
completion, it sets an interrupt pending flag in the user's
virtual machine status table; when control is returned to
the virtual machine, the proper I/O interrupt is simulated.
Virtual machine unit record I/O is normally spooled onto
disk by CP. Thus, any card deck to be "read" by a virtual
machine would, in the normal case, have been read by CP
before the user's call for it on his virtual machine. or
transferred to that user from another user's files via the
XFER console function in CP; the physical deck must have
been preceded by a card containing the USERID, so that CP
can know who will read the card-image file. Later, when the
virtual machine has read the card deck, a card reader end of
file is simulated.
Card and printer output, similarly
spooled, is not queued for physical output until CP is
notified of end of file in one of three ways: the user logs
off the systerr (end of file is assumed): the CLOSF console
function specifies the (virtual) address of the device to be
INTRODUCTION

3

closed; or CP detects an invalid Ccw addressed to the device
(end of file is assumed). Further output for a closed
device is assuwed to start a new file. So that the system
operator can separate physical output, CP precedes all
printed and punched output files with a record containing
the USERID.
The CP console functions allow the user to control his
virtual machine frow. the terminal wuch as an operator
controls a real machine. To perform an IPL, for instance,
the user types IPL and a device address or the name of a
"named" operating system, such as CMS. The user can stop
his virtual machine at any time by hitting the ATTN key and
can request display of any portion of his storage and
registers.
He can modify the contents, if desired, and
restart his machine.
CP also recognizes a few special
purpose commands, such as the XFER function mentioned above,
the QUERY function to obtain the number of users on the
system and their USERID's, as well as the number of current
spooled files, the ~SG function to communicate with other
users, the DIAL function to connect the terminal to a
mUltiaccess system, and the ATTACH and DETACH functions to
add or
remove I/O
devices from
a virtual
machine
configuration (ATTACH can only be issued by the Operator) ,.
CAMBRIDGE MONITOR SYS-rEM.
The Cambridge Monitor System
(CMS) is a single-user,
conversational operating system capable of running on a real
roachine as well as on a virtual machine. It interprets a
simple command language typed in at the operator's console
(underCP-67, at the user's remote terminal).
When running on a real machine, eMS operates in the
supervisor state. When running under CP-61, CMS operates in
the pseudo-supervisor state: that is, CMS "thinks" it is
running in the supervisor state,
but CP is actually
intercepting and translating supervisor interrupts.
Whether running on a real machine (see note below) or a
the following
machine
virtual
machine, ~S
expects
configuration:

4

INTRODUCTION

Device
Number
1052
2311,2314
2311,2314
*2311#2314
*2311,2314
*2311#2314

Virtual
Address

Symbolic
Name

Device Type

009
190
191**
192**
000**
000**
19C**

CON1
console
DSKl
system disk (read-only)
DSK2
permanent disk (user files)
DSK3
temporary disk (workspace)
DSK4
A disk (user files)
DSK5
B disk (user files)
DSK6
C disk (user files)
*2311~2314
1403
OOE
PRNl
line printer
OOC
2540
RDR1
card reader
OOD
PCBI
card punch
2540
TAPI
tape drive
180
*2400
181
TAP2
tape drive
*2400
at least 256R bytes of core storage, 360/40 and up
*Optional devices not included in the minimum configuration
**This virtual address may be changed at any time by the
CMS LOGIN command.
Note:

For use on a real machine not having this I/O
configuration, the device addresses can be redefined at
load tiroe.

Under CP, of course, these devices are simulated and mapped
to different addresses and/or
different devices.
For
instance, CMS expects a 1052 Printer-Keyboard o~erator's
console, but roost remote terminals are 2741s: CP handles all
channel prograro modifications necessary for this simulation.
CMS allows the user to add his own programs for I/O devices
not supported by the standard system. CMS also provides for
dynamic specification of SVC routines.

CMS Batch Monitor
As well as being a conversational monitor, CMS provides a
batch facility for running CMS jobs. The CMS batch monitor
accepts a job stream from a tape unit or the card reader and
writes the output on tapes, on the printer, or on the card
punch. The job stream can consist of a System/360 Operating
System SYSIN job stream with FORTRAN (G) and ASSEMBLER (F)
compile, load, and go
jobs calling certain cataloged
procedures; or it can consist of CMS commands. along with
control cards and card decks for compile, load, and go jobs
for all the CMS-supported compilers.
Like the conversational CMS, the batch monitor can run
either from a virtual machine or from a real machine. Under
CP, it can be used as a background monitor along with other
conversational eMS users.
INTRODUCTION

5

To eliminate the possibility of one job modifying the CMS
batch monitor·s nucleus in such a way as to affect the next
job, eMS is reIPLwed before each job begins. Files can also
be written onto the batch monitor's permanent disk and then
punched or printed (such as files written by FORTRAN
programs); these files should be of limited size and
considered temporary. as they are erased at the completion
of each job.
CP-67/CMS SAMPLE TERMINAL SESSION
A sample terminal session is described and illustrated
below. User input is in lowercase; typeout from the system
appears in uppercase.
After logging in to CP-67 and initializing CMS, the user,
eSC1, issues a LISTF command to obtain a list of all files
stored on his read-write disks. To allow multiple comroands
to be entered on one line, there is a line-end character.
The LINEND comroand is issued
to define the line-end
character as the exclamation point (!) and to allow the
pound sign (n) to be used as the logical tab character in
EDIT. The file MAIN FORTRAN is then created and filed on the
user's per~anent disk. Compilation of the file is terminated
due to prograro errors (indicated by a $ symbol below the
error encountered). The file is then Fodified and edited to
correct the line in error, and the new source file stored on
disk. Again an error is encountered and the file reedited.
After a successful compilation, the $ command is called to
load the file into core and execute it.
LOAD and START
perform the saroe function as $ (as shown). Specifying the
XEQ option with the LOAD command also causes execution to
begin after the file is loaded.
LISTF and ERASE commands are used to selectively list and
erase files, and the PRINTF command is used to print all,
and then part, of the contents of a file. KT causes typeout
to be discontinued if entered after the ATTN key is hit
twice.
The OFFLINE command punches or prints the specified file on
offline devices. The ALTER command changes the identifier of
a file.
KX, entered after hitting ATTN twice, stops
execution of the current program, reloads a new copy of eMS,
and returns control to CMS.
An EXEC file (consisting of CMS commands) is created and
filed.
The file is then executed by issuing the EXEC
command, which causes each of the commands contained in the
file to be executed individually. Operand substitution is
illustrated by modifying and reexecuting the file using
6

INTRODUCTION

ampersand (&) arguments.
Hitting ATTN once transfers control to the Control Program.
where the QUERY console function is issued to determine the
number of users on the system. their names. and the message
of the day from the operator. The BEGIN console function
then returns control to CMS and the user logs out from both
eMS and CP-67.
The sample terroinal session follows.

INTRODUCTION

7

it

cp-67 online

xd.65 qsyosu

login cscl
<-------The user·s id is specified upon logging in.
ENTER PASSWORD::
<----------------------------------The protected password does
CP WILL BE UP 24 HOURS A DAY
not print when entered.
READY AT 09.14.49 on 11/27/69
CP
ipl cms
CMS ••• VERSION nn

LEVEL

rom

listf
FILETYPE ~ODE NO.REC.
003
Pl
INDIAN
LISTING
009
DUMPREST SYSIN
Pl
SUPERSCR SYSIN
010
Pl
MY
001
FORTRAN
Pl
002
INDIAN
TEXT
Pl
001
FORTCLG EXEC
P1
LOAD
P5
003
MAP
FIN
Pl
001
SCRIPT
TUES
SCRIPT
Pl
001
FRST
SCRIPT
Pl
001
007
DUMPREST LISTING
Pl
001
AGENDA
Pi
SCRIPT
INDIAN
001
FORTRAN
Pl
Ri T=0.06/0.21 09.16.12
FILENA~E

DATE
8/18
8/20
8/22
8/26
8/29
8/29
8/30
8/30
8/31
8/31
9/01
9/01
9/01

linend !
Ri T=0.01/0.02 09.16.20
edit main fortran
NEW FILE.
INPUT:
c main program Nov. 21, 1969
write (6,10)
10Jformat (I a = .) <--------The # is a logical tab character that
#read (5,20) a
inserts blanks and places the following
20#format (8.3)
characters typed on the line into column
#write (6.25) a,x
1 of the card image in a FORTRAN file.
#call exit
#end
<--------Carriage return with no data entered
EDIT:
on line (that is, a null line) takes
file
user out of Input mode into Edit mode
Ri T=O.08/0.51 09.18.31
of the EDIT command.

8

I Nl'RODUCTI ON

fortran main
0004

20
01)

FORMAT (8.])
$
IEY013 I
SYNTA,X
IEY022I

UNDEFINED LABEL

25
E(00008); T=0.29/0.92 09.1P..42
edit main fortran
EDIT:
print 20

C MAIN
10
20

PROGRA~
NOV. 27, 1969
WRITE (6,10)
FOR~AT (' A = ')
READ (5,20) A
FORMAT C8.3)
WRITE (6,25) A,X
CALL EXI1'

END

EOF:
locate /forrrat/
10
FORMAT Ce A = ')
locate /forrr.at/
20
FORMAT CR.])
change /8/f8/
20
FORMAT CF8.3)
up 2
10
FORMAT (' A = ')
change / ' / ? ' /
10
FORMAT (' A = ?')
find 20
20
FORMAT CF8.3)
insert #x = a**2
<--------Carriage return hit to confirm
environment the user is ine
EDIT:
print
x = A**2
top
print 20

C

~AIN

10
20

PROGRA~
~OV. 27. 1969
WRITE (6,10)
FORMAT (' A = ?')
READ
FORMAT (Fa.3)
X = A**2
WRITE: (6,25) A, X
CALL EXIT

END

EOF:
file
INTRODUCTION

9

Ri T=0.16/1.08 09.21.34

fortran main
IEY0221
25
E(OOOOS); T=O.30/0.94 09.21.43

UNDEFINED LABEL

edit ~ain fortran
EDIT:
locate /25/
WRITE (6,,25) A,X
insert 25#format C' a = 'f8.3,' x = 20.3)
print
25
FOR~AT (9 A = 'F8.3,' X = 20.3)
change /20/' f20/

25
FORMAT C' A = -F8.3,' X
file
Ri T=0.12/0.64 09.23.16

= '

F20.3)

fortran main (list source)

Ri T=0.31/0.97 09.23.35

$ main
EXECUTION BEGINS •••
A = ?
2.5
A =
2.500 X =
Ri T=0.28/0.94 09.24.01

6.250

load main

Ri T=0.23/0.78 09.24.14
start
EXECUTION BEGINSo ••
A = ?
3.1
A

=

3.100 X =

9.610

Ri T=0.04/0.18 09.24.29

load wain (xeq)
EXECUTION BEGINS •••
A = ?
3.2
1\ =
3.200 X =
Ri T=0.26/0.93 09.24.50

10.240

load roain!start
<------The! allows multiple
Ri T=0.23/0.74 09.25.04
commands per line.
EXECUTION BEGINS •••
A = ?
2.5
2.500 X =
A =
10

6.250
INTRODUCTION

Ri T=0.04/0.13 09.25.15

listf main *
FIL~NAME FILETYPE MODE NO.REC. D~TE
MAIN
LISTING
P1
003
11/27
MAIN
FORTRAN
P1
001
11/27
MAIN
TEX~
Pl
002
11/27
Ri T=0.02/0.07 09.25.23
listf * listing
FILENAME FILETYPE MODE NO.REC. DATE
003
8/18
INDIAN
LISTING
P1
003
11/21
MAIN
LISTING
Pl
001
8/20
DUMPREST LISTING
Pl
Ri T=0.02/0.01 09.26.08
erase * listing
T=0.03/0.10 09.26.30

Ri

listf * listing
FILE NOT FOUND
E(00002); T=O.01/0.04 09.21.05
printf main fortran
C MAIN PROGRAM
NOV. 27, 1969
WRITE (6 11 10)
10
FORMAT (. A = ? ')
READ (5,20) A
20
FO~AT (FS.3)
X = A**2
WRITE (6,,25) A,X
25
FORMAT (' A = 'FS.3,' X = • F20.3)
CALL EXIT
END

Ri

T=0.03/0.09 09.27.23

printf rrain fortran

*

3 25

NOV. 27
WRITE (6,,10)
FORMAT (. A = ? .)

C MAIN PROGRAM

10

R; T=0.02/0.08 09.30.47

printf main fortran

C MAIN PROGRAM
NOV. 27, 1969
WRITE (6,,10)
10 "
CP
<------------------------ATTN was hit once to enter CP
<-----------~------------ATTN was hit a second time
INTRODUCTION

11

kt <------------------------to kill typeout
R: T=0.03/0.09 09.31.02
offline punch main texti~SSfortran <--The four a characters delete
R: T=0.03/0.14 09.31.32
the previous four characters.
offline print main fortran
R: T=0.03/0.10 09.31.40
offline print main listing
FILE NOT FOUND
E(00002); T=0.Ol/0.05 09.31.53
listf
FILENAME FILETYPE MODE NO.REC. DATE
009
8/20
DUMPREST SYSIN
Pl
010
8/22
SUPERSCR SYSIN
P1
8/26
001
FORTRAN
MY
P1
8/27
001
FORTCLG EXEC
P1
8/30
P5
003
MAP
LOAD
001
11/27
FORTRAN
MAIN
Pl
8/30
P1
001
FIN
SCRIPT
8/31
001
TUES
SCRIPT
Pl
8/31
001
P1
FRST
SCRIPT
9/1
001
AGENDA
SCRIPT
P1
11/27
002
MAIN
Pl
TEXT
9/1
001
INDIAN
FORTRAN
P1
Ri T=0.05/0.14 09.33.05
alter main fortran * mainone
R: T=0.02/0.12 09.33.28

* *

listf main fortran
FILE NOT FOUND
E(00002): T=O.02/0.05 09.33.35
listf * fortran
FILENAME FILETYPE MODE NO.REC. DATE
MY
FORTRAN
PI
001
8/21
MAINONE FORTRAN
P1
001
11/21
INDIAN
FORTRAN
P1
001
9/1
R: T=0.01/0.01 09.33.45

$ main
CP
kx

<-------------------ATTN was hit once to enter CP
time

<-------------------ATTN
was hit a second
<-------------------to kill execution

CMS •• VERSION n

LEVEL

m

listf mainonnae * <----- The a deletes one character.
FILENAME FILETYPE MODE NO.REC. DATE
MAINONE FORTRAN
P1
002
11/27
12

INTRODUc-rION

R: T=O.03/0.17 09.34.25

edit fortclgo exec
NEW FILE.
INPUT:
fortran 1I1ainone
$~load mainone (xeq)
EDIT:
file
R: T=O.07/0.43 09.35.02

printf fortclgo exec
FORTRAN MAINONE
LOAD ~AINONE (XEQ)
R: T=O.02/0.06 09.35.11

exec fortclgo
09.35.23 FORTRAN ~AINONE
09.35.27 LOAD
MAINONE (XEQ)
EXECU~ION BEGINS •••
A

=

?

3.4
A =
3.400 X =
H: T=0.60/1.94 09.35.40

11.560

edit fortclgo exec
EDIT:
change /mainonp/ &1/ * G
FORTRAN &1
LOAD &1 (XEQ)
EOF:
file
Hi T=0.10/0.60 09.36.17
exec fortclgo mainone
09.36.53 FORTRAN MAINONE
09.36.59 LOAD
MAINONE (XEC)
EXECUTION BEGINS •••
A = ?
5.1
A =
5.100 X =
26.010
R: T=0.62/2.00 09.37.10
edit fortclgo exec
EDIT:
insert &set err exit
print 9
&SET ERR EXIT
FORTHAN &1
LOAD &1
(XEC)
INTRODUCTION

13

EOF:
file
R; T=O.10/0.S1 09.31.39
edit mainone fortran
EDIT:
print 4
C MAIN

PROGRA~
NOV. 27, 1969
WRITE (6.10)
10
FORMAT (. A = ?')
blank aa
FORMAT (. A = ?')
next
READ (5,20) A
change /read/red/
RED (5 , 20) P<.
file badone
R: T=O.13/0.71 09.40.15

listf * fortran
FILENAME FILETYPE MODE NO .. REC. DATE
MY
FORTRAN
P1
001
8/27
MAINONE FORTRAN
Pl
001
11/27
INDIAN
FORTRAN
P1
001
9/1
BADONE
FORTRAN
Pi
001
11/27
R: T=O.03/0.11 09.41.23
exec fortclgo badone
09.41.36 FORTRAN BADCNF
0002
FORMAT (' A = ?')

$
0003

01) IEY0021
LABEL
RED (5,20) A

$ $
01) IEYOOI1 ILLEGAL TYPE
IEY022I
10
!!! E(00008)

!!!

R: T=0.36/1.02 09.42.03
edit fortclgo exec
EDIT:
change /&1/&1 &2 63 &4 &5/
FORTRAN &1 ~2 &3 &4 &5
LOAD &1 &2 &3 &4 &5 (XEQ)
EOF:
file
R: T=O.11/0.65 09.43.00

14

*

9

INTRODUCTION

02)
IEY013I SYNTAX
UNDEFINED LABEL

exec fortclgo mainone
09.43.19 FORTRAN MAINONE
09.43.28 LOAD
MAINONE
EXECUTION BEGINS •••

A = ?
1.9
A =
1.900 X =
R; T=0.64/2.21 09.44.10

(XEQ)

3.610

CP
<-----------ATTN was hit once to enter CP.
query user
14 USERS. 00 DIALED
query user names
LOVE
- 044,SEYMOUR-02A,OPERATOR-009,~EYER -045,
-028,
ROSATO - 024,NEWSON -040,LEVEY
-027,BOYD
DJL
- 056,BURR
-062,SHIFLDS -051,SCHUPP -055,
EDNA
- 043,CSCl
-026
query logmsg
CP WI~L BE UP 24 HOURS A DAY
begin
CMS

<-----------------

BEGIN returns contrel to CMS.

logout
T=S.49/20.S3 10.24.42
CP ENTERED, REQUEST, PLEASE.
CP
logout
CONNECT= 02.50.17 VIRTCPU= 000.05.49
LOGOFF AT 10.25.06 ON 11/27/69

INTRODUCTION

TOTCPU=OOO.20.54

15

CP-61 TERMINAL USAGE
The conversational input/output device used to access the
CP-67/CMS system is referred to as a "terminal" and is
operated by a
·user" who types information
that is
transmitted
either
by
telephone
line
or
by
permanently-connected wiring to a
computer, where the
information is receiveo and processed by the system.
In
addition to receiving and processing information, the system
may cause information to be typed out at the terminal.
Information typed frorr the terminal keyboard by the user is
called "input": that typed out at the terminal by the system
or by a user prograw is called "output".
Anyone

of four terminals may be used to access the
systere. These are the IBM 2141 Communication
Terminal, the IBM 1050 Data Communications System Terminal,
the Type 33 Teletype Terminal, and the Type 35 Teletype
Terminal. Any of these terminals may be connected to the
computer by direct wiring or by telephone lineo
If the
terminal is not directly wired to the computer, a data-phone
is placed near the terminal keyboard,
and must be used to
dial an installation-specified number in order to establish
a connection with the computer. The procedure for using a
data-phone is described under "CP Login" in the "Terminal
Usage-Logging Procedures· section.
CP-67/C~S

Terminals which are equivalent to those explicitly supported
also fUnction
satisfactorily.
The customer
is
responsible for establishing equivalency.
IBM assumes no
responsibility for the irrpact that any changes to the
IBM-supplied products
or programs
way have
on such
terminals.

~ay

16

Terminal Usage

2741 CHARACTERISTICS
The IBM 2741 Communication Terminal consists of an IBM
Selectric typewriter mounted on a typewriter stand.
The
stand
includes
the electronic
controls
needed
for
communications, a cabinet for mounting a data-phone. a rack
for mounting a roll of paper, and a working surface. For
use with the CP/CMS system, the 2741 should be equipped with
the Transmit Interrupt and the Receive Interrupt features.
The 2741 has two modes of operation: communicate mode and
local mode. The mode of the terminal is controlled by the
terminal mode switch. which is located on the left side of
the typewriter stand.
When in local mode. the terminal is
disconnected from the computer. It then functions as a
typewriter only, and no information is transmitted or
received. When in communicate mode. the terminal may be
connected to the communications line to the computer. The
power switch on the right side of the keyboard must be set
to ON before the terminal can operate in either communicate
or local mode. The procedure for establishing connections
with the computer and the terminal switch settings which
should be used are discussed below under "2741 Initiation
Procedures".
Either of two 2741 keyboard configurations may be used in
accessing the CP/CMS system.
These are the PTTC/EBCD
configurations (shown
in Figure 1) and
the standard
Selectric configuration (shown in Figure 2). On either
keyboard. the alphameric and special character keys, the
space bar, power switch,. the SHIFT. LOCK, TAB, tab CLR SET.
and MAR REL keys all operate in the same way as standard
Selectric typewriter keys.
On most 2741 terminals, the space bar. backspace. and
hyphen/underline keys have the typamatic feature. If one of
these keys is operated normally, the corresponding function
occurs only once.
If the key is pressed and held, the
function is repeated until the key is released. The RETURN
and ATTN keys have special
significance on the 2741
keyboard.
The RETURN key is hit to signal the termination of each
input line. When RETURN is hit. control is transferred
to the system. and the keyboard is locked until the
system is ready to accept another input line.
The ATTN key
is used to generate
an attention
interrupt. It may be hit at any time (since it is never
locked out) and causes the keyboard to be unlocked to
accept an input line. Refer to "Attention Interrupt"
for a discussion of the transfer between environments
that occurs when an attention interrupt is generated.
Terminal Characteristics

17

The 2741 paper controls (such as the paper release lever,
line-space lever, impression control
lever, etc.) are
identical to the corresponding controls on an IBM Selectric
typewriter and operate accordingly.
Any invalid output character (one which cannot be typed by
the terminal and for which no keyboard function, such as tab
or carriage return, exists> appears in terminal output as a
space. For a further discussion of 2741 characteristics,
refer to the 2741 component description manual (GA24-3415).
2741 INITIATION PROCEDURES
The steps for preparing the 2741 for use are described
below. After these steps have been performed, log in.
1. set the terminal mode switch located on the left side of
the typewriter stand to LCL. This ensures that the terminal
is disconnected from the computer.
2. After making sure that the terminal is plugged in, turn
the power on by pressing the ON portion of the terminal
power switch at the right side of the keyboard.
3. Check to see that the margin stops, which are located on
the typing guide just above the keyboard, are set at the
desired positions (normally 0 and 130). If so, proceed to
step 4. To reset a margin stop, push it in, move it to the
desired position, and release it.
4. Check that the tabs are set at the desired intervals by
tabbing an entire line using the TAB key.
If the settings
are satisfactory, proceed to step 5. Note that these tab
settings do not govern the internal positioning of input
characters.
For a discussion of internal tab settings,
refer to EDIT. If the tabs are to be reset, position the
typing element to the right margin, press and hold the CLR
portion of the tab control keYi, and hit the RETURN key.
This clears all previous tab settings. New settings may be
made by spacing the typing element to the desired locations
and pressing the SET portion of the tab control key. After
tab stops have been set for the entire line, hit RETURN to
position the typing element at the left margin.
I

5. set the terminal mode switch on the left side of the
typewriter stand to COM. The terminal is now ready for use.
1050 CHARACTERISTICS
The IBM 1050 terminal is composed of the 1051 Control Unit
and a 1052 Printer-Reyboard. The 1051 Control Unit includes
the power supplies, printer code translator, data channel,

18

Terminal Characteristics

and control circuitry needed for 1050 operation. To be used
with the CP/CMS system, the 1051 should be equipped with the
Time-out suppression and the Transmit Interrupt and Receive
Interrupt special features. The 1052 keyboard is similar in
appearance to the standard IBM typewriter keyboard. Figures
3 and q illustrate the 1050 switch panel and keyboard. The
alphameric and special character keys, the space bar, LOCK,
SHIFT, and TAB keys,. and the paper controls operate in the
same way as those on a standard IBM typewriter.
The
following keys are of special significance on the 1052
keyboard:
RETURN. If the Automatic EOB special feature is included on
the terminal being used, and if the EOB switch on the switch
panel is set to AUTO. the RETURN key may be used to
terminate an input line. otherwise,
(if the Automatic EOB
special feature is not available on the terminal being used,
or if EOB on the switch panel is set to MANUAL) the
character transmitted when RETURN is hit is considered part
of the input line.
ALTN CODING. This key, when pressed and held while one of
the other keys is hit j,
originates a single character code
such as restore, bypass. reader stop, end of block (EOB),
end of address (EOA), prefix, end of transaction (EOT), or
cancel.
Note that input lines frow 1050 terminals not
equipped with the automatic EOB special feature must be
terminated by pressing the ALTN CODING key and holding it
down while hitting the 5 key.
This procedure causes a
carriage return at the terminal.
RESET LINE. Hitting this key (at the left side of the
keyboard) causes an attention
interrupt (provided the
terminal is equipped with the Transmit Interrupt special
feature). The RESET LINE key may be hit at any time, since
it is never locked out" and causes the keyboard to be
unlocked to accept an input line. Refer to -Attention
Interrupt- for
a discussion of the
transfer between
environments which occurs when an attention interrupt is
generated.
RESEND. This key and its associated light (both located on
the right of the keyboard) are used during block checking.
The light comes on when an end-of-block character is sent by
the terminal; it is turned off when receipt is acknowledged
by the system.
If the light remains on, indicating an
error, RESEND may be hit to turn off the light!, and the
previous input line may then be reentered. While the light
is on, no input is accepted from the keyboard.
LINE FEED. This key causes the paper to move up one or two
lines,. according to the setting of the line space levert,
without moving the typing element.
Terminal Characteristics

19

DATA CHECK.
This key should be hit to turn off the
associated light (to its left), which comes on whenever a
longitudinal or vertical redundancy checking error occurs,
or when power is turned on at the terminal,.
Any invalid output character (one which cannot be typed by
the terminal and for which no keyboard function, such as tab
or carriage return, exists> appears in terminal output as a
space. For further information on the characteristics and
handling of the 1050 terminal, refer to the 1050 reference
digest (GA24-3020).
1050 INITIATION PROCEDURES
The procedure for preparing the 1050 for use are described
below. When these steps have been performed, log in.

1. After making sure that the terminal is plugged in, set
the panel switches (shown in Figure 3) as follows:
switch

Setting

SYSTEM
MASTER
PRINTER1
PRINTER 2
KEYBOARD
READER1
READER 2
PUNCH1
PUNCH 2
STOP CODE
AUTO FILL
PUNCH
SYSTEM
EOB
SYSTEM
TEST
SINGLE CY
RDR STOP

OFF
SEND REC
REC
SEND
OFF
OFF
OFF
OFF
OFF
OFF
NORMAL
PROGRAM
see below
(up)
OFF
OFF
OFF

ATTEND

If an EOB switch appears on the terminal, it may be set to
either AUTO or MANUAL. If it is set to AUTO, the RETURN key
may be used to terminate an input line. If the EOB switch
is set to MANUAL, or if it does not appear on the terminal,
all input lines must be terminated by hitting the 5 key
while the ALTN CODING key is pressed and held down.
2.
Check to see that the margin stops--the two blue
indicators invisible in the transparent strip just below the
switch panel--are set as desired (normally at 0 and 130).
If so, proceed to step 3.
To change margin settings, set

20

Terminal Characteristics

the PRINTER1 and :KE¥BO}\JID swi tches to HOME.
Turn power on
at the terrninaiby s·ett:ing t!he Il'a.inline switch to POWER ON.
Move the typingelemen't. 1tO 1i::he center of the line by spacing
or tabbing. 1)urn pow.e:oc- 'off at the terminal.
Lift the top
cover of the lC52 and ,t·li.lt down the hinged portion of the
front panel.
Press tb,p blue margin indicators toward the
back of the 1052 and slide theIr to the new locations.
Return the hinged panel to its original position and close
the top cover.
3. Check the tab settings by setting PRINTERl and KEYBOARD
switches to HOME, turning power
on at the terminal,
positioning the typing element at the left margin,
and
hitting the TAB key repeatedly.
If the tab settin~s are
satisfactory, proceed to step 4.
Note that terminal tab
settings do not govern
internal positioning of input
characters.
For a discussion of internal tab settings,
refer to EDIT. If the tabs are to be reset,
position the
typing eleroent to the right margin.
Lift the tab setting
switch,
labeled CLR/SET, and hol~ it while hitting the
RETURN key.
This clears all previous tab settings.
New
settings way be made by spacing the typing element to the
desired locations ana then pressing down on the tab setting
switch. After tab stops have been set for the entire line.
hit the RETURN key to position the typing element at the
left margin. Turn off power at the terminal.
4. Reset the PRINTERl switch to SEND REC
switch to SEND.
5. Turn the roainlin€ switch to POWER ON
the Login procedure.

Terminal Characteristics

and the KEYBOARD
and continue with

21

Figure 1.

IBM 2741 Keyboard (PTTC/EBCD Configuration)

Note: When this keyboard and associated prinl elements are specified the mechanical changes in the keyboard mechanism
determine the li;le code assignments of the graphic characters. These arrangements are not compatible with the
assignments provided by the use of the PTTC/BCD and PTTC/EBCD keyboards and associated print elements (see Code
Chart, Figure 6).

Figure 2.

22

IBM 2741 Keyboard (Standard Selectric
Configuration)

Terminal Characteristics

SYSTEM

MASTER

PRINTER 1

PRINTER 2

KEYBOARD

READER 1

READER 2

PUNCH 1

PUNCH 2

STOP CODE AUlO Fill

PUNCH

SYSTEM

EOB

SYSTEM

TEST

SINGLE CY

RDR STOP

111111111111111111,,111111," ,I"" I" 111,",11"'/"11 1111,1 I:, Ii 1111111"1,, 1,1" "II,,, I"" I"" I,,, ,I,,, Ii,,, ,I II III,,, ,/"" I
~

Figure 3.

~

'~.~

J

_~

<

IBM 1052 Switch Panel

D

om
FEED

D

D
D

D
D I

Figure 4.

RESEND

I

IBM 1052 Keyboard

Terreinal Characteristics

23

TYPE 33 TELETYPE CHARACTERISTICS
The KSR (Keyboard Send/Receive) model of the Teletype Type
33 terminal is supported by CP-67.
The Type 33 KSR includes
a typewriter keyboard,
a control panel, a
data-phone,
control circuitry for the teletype, and roll paper.
The
Type 33 RSR keyboard contains all standard characters in the
conventional arrange~ent. as well as a
number of special
symbols. All alphabetic characters are capitals. The SHIFT
key is used only for typing the "uppershift" special
characters.
The CTRL
key
(Control key)
is
used in
conjunction with other keys to perform special fUnctions.
Neither the SHIFT nor CTRL key is self-locking; each must be
depressed when used.
In addition to the standard keys,
the keyboard contains
several non-printinq keys with special functions.
These
function keys are as follows:
LINE FEED generates a line-feed character and moves the
paper up
one line
without ~oving
the printing
roechanis~.
When the terminal is used offline, the LINE
FEED key should be depressed after each line of typing
to avoid overprinting of the next line.
RETURN is the carriage return key
physical end of the input line,.

and signifies

the

REPT repeats the action of any key depressed.
BREAK generates an attention interrupt and interrupts
program execution.
After breaking program execution,
the BRK-RLS button must be depressed to unlock the
keyboard.
CNTRL is used in conjunction with other keys to perform
special functions.
The tab character (Control-I) acts
like the tab key on the 2741.
Control-H acts like the
backspace key on the 2741.
Control-Q and Control-E
produce an attention interrupt like BREAK if the
teletype is in input mode.
Control-S
(X-OFF)
and
Control-M act as RETURN. Control-D (EOT) should not be
used as i t may disconnect the terminal.
Control-G
(bell), Control-R (tape), Control-T
(tape), and all
other Control characters are legitimate characters even
though they have no equivalent on the 27ql.
HERE IS and RUBOUT are ignored by CP-67.
ESC (ALT MODE on soree units)
generates a legal character.

24

is not used by CP-67, but

Terminal Characteristics

The control panel to the right of the keyboard contains six
buttons below the telephone dial, and two lights, a button,
and the NORMAL-RESTORE knob above the dial. The buttons and
lights are as follows:
ORIG
{ORIGIN.ATE}. This butt.on obtains a dial tone
before dialing. The volume control on the loudspeaker
(under the keycoard shelf to the right)
should be
turned up such that the dial tone is audible.
After
connection with the computer has been made, the volume
can be lowered.
CLR
(CLEAR).
This button, when depressed,
the typewriter.
ANS

(Answer).

TS~

(TEST).

turns off

This button is not used by CP-67.
This button is

used for testing purposes

only.
LCL
(Local). This button turns
local or offline use.

on the typewriter for

BUZ-RLS
(Buzzer-Release).
This button turns off the
buzzer that warns of a low paper supply. The light in
the BUZ-RLS button remains on until the paper has been
replenished.
ERR-RLS
(Break-Releas~).
This button unlocks the
keyboard after prograw execution has been interrupted
by the BREAK key.
REST.

This light is not used by CP-67.

NORMAL-RESTORE. This knob is set to NORMAL, except to
change the ribbon, in which case the knob is twisted to
the OUT-OF-SERV l~ght. The knob is then set to RESTORE
and returned to NORMAL when the operation has been
completed.
OUT-OF-SERV
(Out of Service). This light goes on when
the NORMAL-RESTORE knob is pointed to it for ribbon
changing.
Most teletype units have a loudspeaker and a volume control
knob {VOL}
located under the keyboard shelf.
The knob is
turned clockwise to increase the volume.
TYPE 35 TELETYPE CHARACTERISTICS
The KSR (Keyboard Send/Receive) model of the Teletype Type
35 terminal is supported by CP-67.
The Type 35 KSR, like
the Type 33 KSR, includes a typewriter keyboard, a control
Terminal Characteristics

25

panel. a data-phone, control circuitry, as well as roll
paper. The Type 35 has basically the same features as the
Type 33. The additional features of a Type 35 are the
following:
LOC-LF (Local/Line Feed). This button operates as the
LIND FEED
button without generating
a line-feed
character. It is used along with the LOC-CR.
LOC-CR (Local/Carriage ~eturn). This button returns
the carrier as RETURN does without generating an
end-of-line character. LOC-CR is normally used only to
continue a line of input to the.next line.
LOC-BSP (Logical/Backspace). This button generates a
character but it has no meaning with the KSR model.
BREAK. This button generates an attention interrupt
and interrupts program execution.
After execution has
been interrupted, BRK-RLS, and then the K buttons must
be depressed to unlock the keyboard.
K (Keyboard).
This button unlocks the
sets the terminal for page copy only.

keyboard and

Most Type 35 terminals have a volume control knob (SPKR VOL)
for the loudspeaker located to the right of the keyboard.
Turning the knob clockwise increases the volume.
A column indicator at the uoper right of the keyboard
indicates the coluwn that has just been printed. When the
LOC-CR key is used. no end of line is recorded and the
column indicator does not reset.
A red light to the right of the column indicator warns the
user that the carrier is approachinq the right marginQ

26

Terminal Characteristics

CP-67/CMS CONVENTIONS
LOGGING PROCEDURES
This section
describes the procedures which
roust be
performed at the terminal to begin and to terminate use of
the CP-67/CMS system. For the procedures of connecting a
user to a multiaccess system such as RAX or APL,
refer to
wDialing a Multiaccess System w •
Before the facilities o£
the CP-67/CMS system are made available to a user, he must
identify himself to the Control Program by giving his userid
and his password (two identifiers which are assigned to hiro
at the time he is authorized to use the system).
This
identification procedure is referred to as CP Login. When
CP Login is completed, a console function may be issued to
initialize CMS, as described below.
Note.
During the LOGIN procedure CP-67 uses the line
time-out feature when reading the userid and password.
If
the user fails to type any character for 28 seconds, the
line will time-out and be disablen.
When the user has co~pleted his use of the system, he
signals this fact by issuing a WlogoutW to the Control
Program.
The period between CP Login and CP Logout is
referred to as a terminal session.
CP Login
After the terminal has been prepared for use (as described
under ftTerminal Characteristics n )
the procedure described
below must be performed in order to gain access to the
CP-67/CMS system.
(Note that input may be entered in either
uppercase or lowercase. Uppercase is used below to indicate
words which must be typed as they are shown; lowercase
indicates fields whose contents may vary.)
1.
A
communications line to
the computer
must be
established. If the terminal is directly wired to the
computer this is automatic, and you may proceed to step 2.
If the terminal is a Teletype 33 or 35, depress the ORIG
button, rr.ake sure the dial tone is audible, and then dial
the installation-specified number and proceed to step 2; the
ORIG button is lighted at this point--if the light goes out
during the terminal session, this CP Login procedure must be
repeated.
Otherwise, a data-phone is placed near the
terminal and should be used to establish a communication
line with the computer as follows: After making sure that
the plug from the data-phone is connected to the walljack,
press the button labeled TALK, lift the receiver, and dial
the installation-specified number. When a continuous tone
is heard, press the button labeled DATA and replace the
receiver.
The DATA button should now be lighted, and
Logging

21

remains lighted as long as the terminal remains connected to
the computer.
If this light qoes out at any point during
the terminal session, the CP Login procedure must be
repeated.

2. The system acknowledges that a communication line has
been established by typing one of the following messages:
CP-67 ONLINE

xxxxxxxxxxxx

xxx:xxxxxxxxx

CP-67 ONLINE

CP-67 ONLINE
The first message is typed if the terminal is a 1052 or 2741
equipped with an EBeD character set. If the second message
is
typed, the
2141
bas
a standard
Selectric
or
correspond'~nce
character set.
In
either case,
the
xxxxxxxxxxxx portion of the message consists of meaningless
characters and should be ignored.
If the terminal is a
Teletype Type 33 or 35, the third message is typed.

3. At this point the system must be notified that someone
wishes to use the terminal. To do this, hit ATTN once. On
the Teletype 33 or 35, hit BREAK and then BRK-RLS.
4. The system responds by unlocking the keyboard on a 2141
or 1052 or waiting for input on the Teletype 33 or 35.
5. Identify yourself to the system by typing LOGIN userid,
followed by a carriage return, where userid is your user
identification.
Note.
The LOGIN
and userid cannot
character-delete or line-delete symbols.
6.

be

edited

using

The system responds with one of the following messages:

ENTER PASSWORD:
This message indicates that your
been accepted. Proceed to step 1.

user identification

has

RESTART
If this roessagei:s ,typed" the word LOGIN has been entered
incorrectly. Return to step 5 and retype the input line ..
LOGGED IN ON DEV xxx
RESTART
This message indi.cat:es ·tha~t another user with the same
userid is log.gedonat the terminal whose address is xxx.
You will not ~e ~ble to log in with the same userid until
the other user has legged off.

28

Logging

USER NOT IN DIRECTORY.
RESTART
If this message is typed, an invalid userid
specified. Return to step 5 and log in again.

has

been

MAX NO. OF USERS EXCEEDED
LOGGED OUT AT xx.xx.xx ON xx/xx/xx *** BY OPERATOR***
If the keyboard unlocks or CP-67 waits for input, return to
step 5.
If the message is typed, the system is already
servicing the maximum number of
users and the login
procedure is terminat~d. In this case wait for a few
minutes" and then try again by returning to step 1.
UPDATING DIRECTORY
RESTART
The CP-61 system directory is being updated.
In this case,
wait a few minutes, and then try again by returning to step
5.

7. Type your password, followed by a carriage return: the
password may be edited.
If the 2741 terminal is equipped
with the Print Inhibit feature, the password is not typed at
the terminal as the keys are hit. The Print Inhibit feature
applies only to the typing of a password. If the terminal is
a Teletype 33 or 35,
three lines of characters are
overprinted before you are allowed to enter your password.
8. At this time, if there are any cards in the virtual card
reader or output for the printer or punch, the message
FILES:- xx RDR, xx PRT. xx PUN
is typed. If the CP operator has set any log messages for
the day, they are typed also.
9.

The system responds with one of the following messages:

READY AT xx.xx.xx ON xx/xx/xx
where xx.xx.xx is the time of day and xx/xx/xx is the date.
This message indicates that the password has been accepted
and the CP log in procedure is completed. The Control
Program environroent has been entered, and any console
function roay be issued. To initialize CMS, proceed to step
11. To initialize any other operating system proceed to
step 10.
PASSWORD INCORRECT.
RESTART
If this message is typed, an invalid password has been
specified and the log in procedure is repeated. Return to
step 5.

Logging

29

10~ Any operating system can now be loaded into the virtual
machine. To load in CMS, go to step 11. To load in another
operating system, issue the IPL console function to CP-67,
specifying the device froro which the system is to loaded.
For example, IPL 293 or IPL OOC. If the device that is
IPL'ed contains an operating system (such as OS/360>, your
terminal becomes the operator's console. For information on
running os under CP-61. see WOS/360 in a CP-67 Virtual
Machine w , by C. I. Johnson, IBM Cambridge Scientific Center
Report 320-2035. Cambridge, Massachusetts, March 1969 .•

CMS

11.

Initialization
To initialize CMS., issue the console function
IPL 190
or
IPL CMS

followed by a carriage return. This causes a copy
CMS nucleus to be brought into core from disk.
12.

of the

The message
CMS ••• VERSION nn LEVEL rom

where nn is the version level and mm is the modification
level, is typed, and the keyboard is unlocked. The CMS
Command environment has control at this pOint,
and any CMS
command may be issued.
CP Logout
When the user has finished using the system and wishes to
end his terminal session, he should do so by logging out
from the Control Program. If the user is not already in the
Control Program environment at the time he wishes to log
out, he may enter this environment by hitting ATTN once.
The keyboard is unlocked and the user types LOGOUT, followed
by a carriage return. The system responds with
CONNECT=hh.rom.ss VIRTCPU=mmm.ss.hs
LOGOUT AT xx.xx.xx ON xx/xx/xx

TOTCPU=~mro.ss.hs

and the connection to the computer is lost. The connect time
is in hours, minutes, and seconds; the virtual CPU, and
total CPU times are in minutes, seconds, and hundredths 011 a
second. The logout procedure is then completed, a~d the
user may turn power off at the terminal.
If the user desires to end his terminal session, but not
lose the connection with the computer so that another user
may log in from the terminal, the user types LOGOUT
30

Logging

anything. followed by a carriage return. The "anything"
must be at least one character or any combination of
characters. The connection with the computer is not lost
and the CP-61 ONLINE message is typed out for the next user
to log in. as in step 2.

Logging

31

DIALING A MULTIACCESS SYSTEM
This section
describes the procedures which
must be
performed to connect a user to a system that provides
multiterminal facilities. such as APL or RAX..
The process
of placing a user into a multiaccess system is referred to
as "dialing". The system to be dialed into must be logged
onto CP-67 (as in the logging procedures writeup) with some
2102 or 2103 lines available
and enabled before the
connection can be made.. When the connection is made, dialing
has been completed, and the terminal is under the control of
the system dialed into; consequently, the user is not known
to CP-67 as a regular logged in user but as a dialed user.
When the user has completed his use of the multiaccess
system,. he should log out of that system in the appropriate
manner; when that mUltiaccess system issues a "disable"
command for that terminal, the 'terminal will be free for
another user to login to CP-67/CMS or to dial a multiaccess
system.
Dialing
After the terminal has been readied for use (as described in
"Terminal Characteristics·) i, the procedure described below','
must be performed to gain access to a mUltiaccess system.
(Note that input may be entered in either uppercase or
lowercase. Uppercase is used below to indicate words which
must be typed as they are shown; lowercase indicates fields
whose contents may vary.)
1-4. These steps are, as
pages earlier.

for ·CP Login", described several

5. Specify the multiaccess system to which you wish to gain
access by typing
DIAL

systeIII

followed by a carriage return.
of the mUltiaccess system.

where "system" is the userid

Note.
DIAL
and
system
cannot
be
character-delete or line-delete symbols.
6.
The systero
messages

then

responds with

one

edited
of the

using

following

••• connected •••
This message indicates a connection has been made between
the terminal and the multiaccess systerr, and the terminal is
now under control of that system. Further responses will be
those of the multiaccess system, as the user cannot get to
32

Dialing

CP-61 to issue console functions.

system ALL LINES BUSY
RESTART
There are no 2702 or 2703 lines available on system. The
lines way not be available for anyone of the three
follo~ing reasons: 2102 or 2103 lines are not defined in the
virtual machine, the virtual lines are not enabled by
system. or all of the lines are in use.
system NOT AVAILABLE
RESTART
The system being dialed is not logged in to CP-67.
system LINES NOT READY
RESTART
The system has not issued an enable
lines.

for the 2702

or 2703

system NO DIAL LINES
RESTART
The system has no 2702 or 2703 lines in its virtual machine
description.
£isconnecting
The dialed terminal remains connected to system until one of
the three following events occur:
(1) system issues a disable for that terminal.
This is
usually brought about by logging out of system in the
correct manner.

(2)
system issues the CP console
specifying the terminal address.

function

DETACH.

(3) system logs out of CP-67.

When the terminal is disconnected from system, the following
message is typed out:
CP-67 LOGOUT

The terminal can now be used to log in to CP-67, or to dial
into a mUltiaccess system again.

Dialing

33

GENERAL TYPING CONVENTIONS
The typing conventions described below should be observed
when entering input to the CP-67/CMS system from a 2741,
1050, or a Teletype 33 or 35 terminal.
Input may be entered in either uppercase or lowercase.
When the keyboard is unlocked on the 2741 or 1050. the
terminal is ready to accept input.
The keyboard r~mains
unlocked on the teletype, therefore a > (greater than sign)
is typed at the left marqin when the teletype is ready to
accept input. If the user types too soon on the teletype,
an interrupt may occur which will probably cause the user to
go back to CP: if this happens, type BEGIN to return to
where you were previously.
The character-delete symbol (a) may be used to delete the
preceding character in the input line.
n character-delete
symbols delete the preceding n characters in the input line
and themselves. Exception: This feature does not apply with
the
K-level
comroands
or
the
RT
command.
The
character-delete symbol can be redefined by the CHARDEF
command for use in eMS: it can never be redefined for CP.
The line-delete symbol, which is the
¢
on the 2741 or
1050, and the shift K (left bracket) on the teletype, may be
used to delete all characters in the current input line and
itself. A line-delete symbol
(¢l cannot
be deleted by a
character-delete symbol
(a).
Exception: This feature does
not apply with the R-level commands or the RT command. The
line-delete symbol can be redefined by the CHARDEF command
for use in CMS; it can never be redefined for CP.
An input line may be a maximum of 130 characters in length.
Any line longer than
130 characters--including delete
symbols, blanks, and the tab character--is truncated to 130
characters.
On the teletype 33, an input line can only
contain a maximum of 72 characters.
An input line from the 2741 or teletype is terminated by
hitting RETURN. To terminate an input line from the 1050,
hit the 5 key while holding down the ALTN CODING key, unless
the 1050 is equipped with the Automatic EOB special feature.
If this special feature is available and the EOB panel
switch is set to AUTO, input lines may be terminated by
hitting RETURN.
Input lines~ can contain a number of logical input lines
Each
which are separated by the. line-end character (#).
call to read a line from the terminal returns a
logical
input line.
Subsequent calls to read a line from the
terminal return the logical input line which was typed

34

Typing conventions

following the previous logical input
single input line

line~

For exarople. the

FORTRAN ABLE # $ ABLE
causes the file ABLE FORTRAN to be compiled, loaded, and
executed. The single input line to the EDIT environment
T # L /BUFT/ # C /FT/FFER/
causes the characters BUFT to be located and changed to
BUFFER. The line-end character can be changed with the
LINEND command for use in CMS: it cannot be redefined for
CP.

An output line on the 2741 and 1050 can be a maximum of 130
characters.
Any line longer than 130 characters causes
overprinting at the right margin. On the teletypes, lines
longer than 72 characters in length are printed as two
lines; the first line cuts off after the 71st character, and
an up arrow is printed at the end of the line to indicate
continuation.
Illegal output characters appear in terminal typeout as
spaces. An illegal output character is one which cannot be
typed and for which no keyboard function, such as a carriage
return or a tab, can be generated.
On the Teletype 33 or 35 terminal, the arrow translates to
underscore ( ), the backslash translates to a not sign (~),
and the uparrow to a vertical bar (1).
One or more blanks are used to delimit the fields
input line to the CMS command environment.

Typing Conventions

of an

35

ATTENTION INTERRUPT
After a phone connection with the computer has been made and
the message "CP-61 Online" has been printed, pressing the
attention key causes the CP login procedure to begin, or the
dialing of a multiaccess system to begin.
The user's machine may be interrupted (stopped) an1 the
terminal readied for input at any time by pressing the
attention key (marked ATTN) on a 2141, hitting the RESET
button on a 1050, or the BREAK key on the Teletype 33 or 35.
This causes control to pass to CP provided that the Control
Program was not already in control. CP console functions
can then be issued.
After a previous attention (pressing ATTN) causes control to
pass from CMS to CP, a subsequent attention passes control
back to CMS. If C~S previously had control and was reading
a line from the terminal (that is, the keyboard was
unlocked), the CMS program is restarted and the keyboard is
unlocked again. If CMS previously had control and was not
reading a line from the terminal (that is, the keyboard was
locked), the interruPtion permits a single line of input to
be entered and stacked. Stacked lines of input are used on
successive calls to read a line from the terminal until
there are no more stacked lines.
Input is then taken
directly from the terminal. After a line to be stacked is
entered, CMS continues from the environment which was last
interrupted. Any number of lines m~y be input and stacked
in this way.
When entering two attentions to the system to stack input,
ATTN should not be pressed the second time until the
keyboard has been unlocked in
response to the first
attention. If the second attention is entered before the
keyboard is unlocked. it is ignored.

36

Attention Interrupt

CMS FILE CONVENTIONS
One of the purposes of C~s is to provide the user with
various file-handling facilities.
Files to be use0 under
CMS may be stored on disk, cards, or magnetic tape.
However, most CMS cowmands assume that files are stored on
disk. This rreans that files stored on media other than disk
wust be transferrea to disk before rrany of the CMS commands
can be issued for thew.
The commands which deal with
transferring files
between disk and other
media are
discussed
under
"File
Creation,
Maintenance,
and
Manipulation".
conventions given in this section apply to disk files only.
Disk Facilities
Disk areas are available to each CMS user for storing
inforwation. A user may have up to five read/write disks and
one read/only (that is, the syste~) disk attached to his CMS
virtual machine at anyone time. These areas are referred to
as the user·s disks although the size of each area seldow
constitutes an entire physical disk. The sizes of a user's
"mini" disks are assigned by the system administrator at the
time he establishes that person as an authorized user of the
CP-61/CMS system.
These assigned sizes are based on the
amount of disk space available and the amount which the user
is likely to require.
P-ssigned disk sizes may vary among
users.
The logical names of the disks a user may have are P, T, A,
B, S, and C. This order is normally the standard order of
search for C~S files. All users normally have a P (191) and
an S
(190) disk. The P disk contains user files retained
between terwinal sessions until the user erases them either
collectively or singly.
The S disk (that is, system disk)
contains the C~s nucleus of which each user receives a copy,
and the disk resident portion of CMS which is normally
shared by all users. The system disk is read-only--any
attempt to write on it is denied and causes an error message
to be typed to the user.
The T (192) disk contains information that is retained only
from the time it is created until the user terminates his
terminal session. The A, B, and C disks contain information
that is retained between terminal sessions as does the P
disk.
Before a user can access the P, T, A, B, or C disk for the
first time, he must format each one by issuing the FORMAT
command in c~S.
If the disks are not properly formatted,
I/O errors occur.

File Conventions

37

Infor~ntation stored on
~isk is organized into
files.
on the system disk are referred to as system files.

Files

File Identifiers
Each file must have a unique identifier, which is composed
of a filename, a filetype, and a fileu1ode. This identifier
(or a portion of it) is used by the various CMS cowmands to
access user and systew. files.
If a new file is created with
an identifier identical to that of an existing user file,
the original file is erased.
The filename may be any combination of from one to eight
nonblank EBCDIC characters, provided the first character is
not a zero or an asterisk. with system files, the filename
is the name which is issued by the user in calling a
specific command, and it is also the name of the program
whose code
constitutes that
command.
Permanent
and
temporary files may be assigned any filename the user
wishes, since filenaroes in themselves do not have any
special implications in eMS.
Filetype may be any combination of from one to eight
nonblank EBCDIC characters, provided the first character is
not a zero or an asterisk. Certain filetypes imply specific
file characteristics to CMS. Fil~types which have specific
implications for user files are given in Figure 5. The user
may assign any of the filetypes in this figure to any file
he wishes, but he should note that the commands which use
these filetypes are not
successfully executed if the
contents of the file are in any forro other than that which
the assigned filetype implies.

38

File Conventions

Filetypes
AED
ALPHABET
ALPHANUM
ASP360
ASl130
BRUIN
COBOL
COPY
CVTUTl
DATA
DAxx

F
F

F
F
F

F

F
F

80

F

132
80

V or F

(FILE)

V or F

~.

80
80
80
80
80
80
80
80

F
F

DIAG
EXEC
FILE

FLOW
FT01FOOl
FT02FOOI
FT03FOOl
FT04FOOI
FTOSFOOI
FT07FOOl
FT08FOOl
FT09FOOI
FT10FOOl
FORTRAN
INTER
LISTING

t"Ij

I

Record Format Created by
and Length
These Commands

F

EDIT, OFFLINE
MAPPRT
MAPPRT
OFFLINE, EDIT
OFFLINE, EDIT
BRUIN
OFFLINE, EDIT
EDIT, OFFLINE
CVTFV
EDIT, OFFLINE
FORTRAN
ASSEMBLE
EDIT, OFFLINE, LISTF
EDIT, CEDIT, OFFLINE

F

F

F
F
F
F
F
F

F
F
F

80

MAP

F

72

MACLIB
LOAD, USE, REUSE, $

(j

132
80

MACLIB, TXTLIB
EDIT, OFFLINE

MAP

F

o

MEMO

F

<

MODULE
NUMERIC
PLI
PRINTER
REPS
SCRIPT
SNOBOL
SPLI
SYSIN
SYN
SYSUTI
SYSUT2
SYSUT3
TEMP FILE
TEXT
TXT LIB

V max:6SK
80
80
F
132
F
80
V max:i32
F
80
F
80
F
80
F
80

F
F

80
80

.. TYPE ..
UPDATE
UPDLOG
UTILITY

F
F
F

80
80
80

:::1

~.

o
~

en

EXEC,

EDIT, OFFLINE
FORTRAN
FORTRAN
FORTRAN
FORTRAN
FORTRAN
FORTRAN
FORTRAN
FORTRAN
FORTRAN
EDIT, OFFLINE
FORTRAN
UPDATE
ASSEMBLE, FORTRAN, PLI PRINTF, EDIT, OFFLINE

MACLIB

rt

MACLIB

COMBINE, DISK, TAPE

It
~

MACLIB

80
80
80
80
80
80
80
133
140
80
80
80
121

F
F
F

.....

 LISTF
(file does not exist)
EDIT-------~-----~--->

(file exists)
EDIT------>
PRINT
NEXT
FIND
LOCATE
DELETE
CHANGE
INPUT-----> xxxx
xxxx
TOP
(null line)
RETYPE
FORTRAN<---FILE
PRINTF
LOAD
START
ERASE
DEBUG----------------------------> x
store
dump
CPFUNCTN<------------------------ restart
ECHO-----------------------------------------> abc
SCRIPT<-------------------------------------- return
OFFLINE
MSG <----(press ATTN key)
BEGIN--->
LOGOUT

<-----

Environment Conventions

45

eMS COMMANDS

The CMS commands provide user facilties for file maintenance
and ~anipulation, execution control, debugging,
language
processing, and various utility and control operations, and
are described below in alphabetical order under these
general headings.
These comroands may be issued from the terminal or called
from user progra~s. Each command consists of a command name
and its
operands, if
any.
Abbreviations
have been
established which allow the user to specify only as many
characters of each command name as uniquely identify that
command.
In the case of commands with the same leading
characters" the more commonly used command has been assigned
the
shorter abbreviation.
For
example,
A is
the
abbreviation for the ASSEMBLE command, and AL for ALTER.
Any number of additional characters beyond the minimum may
be specified in the command name.
For this reason, AL, ALT,
ALTE, and ALTER all identify the ALTER command.
The following is a list of the minimum number of characters
required to invoke CMS coromands:
Systero
Commands
ASSEMBLE
ALTER
CLOSIO
CPFUNCTN
DEBUG

EDIT
FORTRAN
GENMOD
LISTF
OFFLINE
PRINTF
SCRIPT
STAT

Shortest
Form
A

AL
CL
CP
DE
E
F
G
L

o
P
SC
S

TAPE

T

UPDATE

U

If the user wants to change the abbreviations or to use
synonyms, the SYN command can be used to create the command
names,
(see SYN).
The comuand name and each of its operands must be separated
by one or more blanks. The operands which are valid for each
command are discussed under
-Format" in each command
description, and also in Appendix B. Each command must be
specified in a single line of input. The carriage return
signals the end of a typical input line. To stack multiple
46

eMS COFmands

CMS commands on one line of input. use the line-end
character, which is defined as # .
The line-end character
can be redefined via the LINEND command. CMS commands cannot
be continued onto additional lines.
Each eMS command has a corresponding comman~ program which
resides in the nucleus, in a transient area. or in the
disk-resident portion of CMS. This program is i~entified by
the command word or its abbreviation. which is issued as the
leftmost input on the cororoand line.
When a command is issued from the terminal, the user's
directories and the system directory are searched in the
standard order for a file with the specified filename and a
filetype of EXEC. The first file found which meets these
requirements has control transferred to it as if "EXEC
filename- had been issued. If the EXEC file is not found, a
check is made for a~breviations rr1 checking for user-defined
synonyms (see SYN) and then standard abbreviations; if a
match is found for a synonym or abbreviation, the typed
command is expanded to the original CMS command name and the
above searching sequence is repeated.
If the EXEC file search is not satisfied from above. the
tables of the
transient area cororoands and
then the
nucleus-resident coromands are searched for the corresponding
command program.
If the program is located in one of the
tables, it is assurred to be in core, and control is
transferred to it directly by a BALR instruction. If not, a
LOADMOD is issued to bring the command program into core. In
attempting to locate this program on disk, the user's
directories and the system directory are searched for a file
with the specified filename (command name) and a filetype of
MODULE, indicating that the file is in core-image form. The
first file found which meets these requirements is loaded
into core and control is transferred to it.
If the MODULE
file is not found, a check is made first for abbreviations
by checking for user-defined synonyms (see SYN), and then
for standard system abbreviations; if a match is found for a
synonym or abbreviation, the typed command is internally
expanded to the original CMS command name, and the above
searching sequence is repeated.
This means that the user is able to substitute his own
programs for disk-resident commands by creating a core-image
file of the program and assigning it a filename identical to
that of the command it is to replace. This also means that
any user file in core-image form may be called directly as a
command. by issuing the filename (and any operands or
parameters expected by the program) as an input line to ~he
CMS Command environment.

CMS Commands

41

A brief description of each CMS command is given in Appendix
A. Any invalid command, that is, one whose command program
does not reside in the eMS nucleus or transient-area and for
which an EXEC file or a core-image module cannot be located,
is ignored, and the message INVALID CMS COMMAND is typed at
the terminal.
Operand processing is handled
by the
individual command programs, and these programs provide all
messages dealing with command format.
The format and usage of each of the CMS commands are
described in detail in the following sections. The general
format for CMS commands follows.
operation

< operands >

command name

one or more operands delimited by spaces
field may be blank

The symbols used to represent
document are described below.

command

formats

in

this

UPPERCASE

information given in capitals must be
typed exactly as shown, although it may
be entered
in either
uppercase or
lowercase.

lowercase

lowercase information designates the
contents of a field, and does not in
itself constitute meaningful input.

( )

parentheses must be typed as shown when
any of the information appearing within
them is specified.
a period designates the beginning of a
Script control word, and must be typed
as shown.
a hyphen must be typed where shown, and
must not be offset by blanks.

/

a slash denotes any string delimiter,
other than blank, which does not appear
in the string.

*

an asterisk, specified where shown,
indicates the universality of an item or
items.

The following
typed:
48

are logical symbols

CMS Cororoands

only, and should

not be

< >

brackets indicate
be omitted.

< >< >

successive brackets enclose items which,
if specified, may appear in any order.

«

nested brackets indicate
specified, must appear
shown.

»

information which may

ite~s

in

which, if
the order

an ellipsis indicates that the preceding
item(s) may be repeated more than once
in succession.
1

2
3

N

these suffixes indicate first, second,
third, and Nth items respectively.
underlining indicates the value which is
assu~ed if
none is specified.
When no
underlined item appears in bracketed < >
information, the default value is ~.
Stacked items not enclosed in anything
indicate that only one item may be
specified.

All parameters for CMS commands are positional unless
otherwise stated in the individual com~and description.
Examples of command usage and each response and error
message which may be issued are also given.
A response is
any message typed at the terminal to indicate the cause of
an error return code in register 15. which terminates
command execution.

CMS

Commands

49

FILE CREATION,

~AINTENANCE,

and MANIPULATION

File Creation. Facilities are available in CMS for the
handling of disk, card, and tape files.
Most of the CMS
commands, however,
require that the files they access be
stored on disk. This means that card and tape files must be
transferred to disk before many of the commands can be
issued for there.
Disk files can be created from terminal. card, or magnetic
tape input, or frcro other disk files.
Issuing the EDIT
command for a disk file which does not currently exist
allows the specified file to be created from terminal input.
To create a disk file from card input, the OFFLINE READ
command can be used. OFFLINE READ accepts card input in any
format.
Card files are created in CMS by requesting that the
contents of disk files be punched.
The OFFLINE PUNCH
command punches out any disk file whose records are 80
characters or less in length.
File Maintenance. Several commands provide facilities for
maintaining disk files. UPDATE and EDIT allow any portion of
an existing file to be changed, deleted, or added to.
UPDATE processes the existing file against an update file,
also stored on disk. EDIT allows the contents of an existing
disk file to be changed from the terminal. To change the
identifier of a disk file without changing its contents, the
ALTER command may be used. A file or group of files C3n be
deleted from disk by issuing the ERASE command. CLOSIO is
used to signal the completion of output to the card punch or
printer from a user program.
File Manipulation.
eMS file manipulation
consists of
copying. combining, reoving, splitting, and listing disk
files. To copy a disk file, the EDIT or COMBINE coromands
can be used. COMBINE also creates a new disk file from the
contents of two or more existing disk files and may be used
to transfer a file between the disk areas.
The SPLIT
command creates a new disk file coroposed of the specified
portions of an existing disk file or files.
LISTF and PRINTF cause file information to be typed at the
console. The LISTF command types
the identifie~s and sizes
of any or all files stored on the user and system disk
areas. PRINTF types out all or the specified part of a disk
file.
To print the contents of a disk file on the offline printer,
the OFFLINE PRINT, OFFLINE PRINTCC, or OFFLINE PRINTUPC
commands can be issued. OFFLINE PRINT prints the file with
single spacing and CMS headings, the PRINTCC version uses
50

File Creation.Maintenance,Manipulation

the first character of each record as a printer carriage
control character, and the PRINTUPC version prints the file
in uppercase (for MEMO or SCRIPT files when the PN train is
on the printer).

File Creation, Maintenance, Manipulation

51

ALTER
Purpose:
The ALTER command changes
specified filets).

the name, type,

or mode

of the

Format:
ALTER

ofn

oft

ofro

nfn

nft

nfm

*

*

*

*
=

*
=

*
=

of~

oft

nfn nft

ofn

are the original filename,
filemode, respectively.

nfm are the new filename., filetype,
respectively.

*
=

filetype,

and

and filemode,

An asterisk for ofn means all files with that
name" for oft means all
files with that type,
and for ofm means any read-write disk.
An
asterisk for nfn, nft, or nfm means no change.
means the same as before. no change.

Usage:
The name, type, or mode number of files on a user's
read-write disk may be changed with the ALTER command. All
fields of the command must be specified.
Notes:
a.
ALTER does not move files between disks. The
letter, may not be changed (see the COMBINE command).
h.
ALTER may not be used for
such as the sytem (SY) disk.

files on a

mode

read-only disk

Responses:
ALTER gives no response except
error message and code.

the Ready

message, or

an

Examples:
a.
ALTER BEN SYSIN P5 PROG3 SYSIN P2
The file formerly called BEN is now referenced by
filename PROG3 and is read-only instead of read-write.

52

ALTER

the

h.
ALTER JBS LISTING * JLEVEL3 = =
The LISTING file from an assembly of JBS
by the filename JLEVEL3.
c.
ALTER * LISTING P5 = = P2
All files with LISTING type and
mode P2.

is now referenced

mode of P5 are

changed to

Error Messages:
E(OOOOl)
OLD SPECIFIED FILE CANNOT BE FOUND
The file to be redesignated is not in the file directory.
Check whether it was specified correctly.
E (00002)
NEW SP:ECIFIED FILE ALREADY EXISTS
A file with the ne~ name, type, and rr.ode already exists.
Change one of the fields of the new designation.
If
concatenation with ar existing file is wanted,
use the
COMBINE command.

E(00003)
C~D ~ODE IS ILLEGAL FOR A CHANGE
The original ~ode specified is invalid--it may be for a
read-only disk, or it may not end with a number frow one to
six.
E(00004)
NO CH]l,NGES WERE MADE AT AI.L
The new designation specified is the same as
designation.

the original

E(00005)
CHANGE-CF-MODE IS ILLEGAL
An attempt was made to change the mode letter. ALTER does
not move files between disks (see the COMBINE command).
E(00006)
NEW MODE IS ILLEGAL
The new mode specified is not a valid one or the mode nurober
is not between one and six.
E(00007)
INCORRECT "ALTER- PARAMETER-LIST
Name, type, and mode were not specified for both files.
E(00008)
SPECIFIED FILE IS IN "ACTIVE" FILE TABLE
A fil~ may net be changed while it is active.

ALTER

53

CEDIT
Purpose:
CEDIT creates and makes changes to card image files only.
Format:

I CEDIT I

filetype I

filename is the name of the file to be created or modified
filetype is the type of file being created or modified
Usage:
CEDIT works
only with card-image
files
(fixed-length
SO-character records).
If CEDIT is issued for larger
records (for example, LISTING
files). each record is
truncated to 80
chlracters. If CEDIT is
issued for
variable-length records (for exa~ple. SCRIPT files), they
are made fixed-length.
CEDIT should only be issued for files too large for EDIT.
and then only for card-image files,
as EDIT is faster.
CEDIT uses work files during editing, whereas EDIT is an
in-core editor.
The same requests used for EDIT are used for CEDIT, with the
exception of X, Y, and ZONE.
The responses are also
baSically the same. (See the EDIT command for all requests,
responses, and error messages).
CEDIT searches all disks for the specified file.
If the
file is found its roode is saved and CEDIT writes the
modified file back to the same disk. If the file is not
found~ the P disk is assumed.

54

CEDIT

CLOSIO
Purpose:
CLOSIO notifies the system that I/O operations to an offline
unit record device are complete, or that output to an
offline device is to be collected before it is actually
output to the physical device.
Format:

,

-----~--------~--------~~--------------

I
I
I
I

READER

CLOSIO
PRINTER
PUNCH

OFF
ON
OFF
ON

OFF collects files output to the specified device, but does
not output the files to the physical device.
ON

notifies the systero that I/O operations to the sgecified
device are complete and output should begin on the
physical device. ON is the default.

Usage:
CLOSIO is normally used as a supervisor-supplied function
within prograros written in assembly language.
However, it
may be used as a command in cases where user-written
programs that include unit record I/O routines terminate
abnormally, or do not include a call to CLOSIO, or where
concatenatlon of spooled output is wanted.
CLOSIO either
notifies the system of
an end-of-file
condition for the devices specified or collects out~ut to
offline devices. Any combination of the three devices may be
specified with the command.
Undefined devices are ignored.
When CP-61 detects the end-of-file condition, the disk
spooling area assigned to the user for the specified device
is closed. Printer and card-punch files are queued for
actual output. Card-reader input files are erased.
If it is desired to collect output of punch or printer files
into one spooled output file per device preceded by only one
header record, the CLOSIO command can be issued to the
PRINTER or PUNCH with OFF specified. All succeeding output
to the OFF device is collected until ON is specified with
CLOSIO for that device. at which time the collected files
are queued for the physical device.

CLOSIO

55

Notes:
a.

CLOSIO is not used after CMS I/O commands.

b.
All unit record devices are
user logs out.

closed by CP-67

c.
CP-67 interprets any invalid CCW
device to which it is addressed.

as a CLOSIO

when the
for the

d.
If READER, PRINTER, or PUNCH is not specified.
three devices are closed as if ON were specified.

all

e.
If the 'OFF' option has been specified, the device must
be explicitely turned 'ON' to be reactivated.
Responses:
None.
Examples:

a.
CLOSIO PRINTER READER
Spooling areas assigned to the user for the printer and card
reader are closed. The reader area is erased. The printer
file is queued for actual output.
CLOSIO PRINTF,R OFF
All further output to the print~r
end-of-file condition is generated.

b.

is collected

and

no

c.
CLOSIO PRINTER ON
An end-of-file condition for the printer is generated: thus
the spooling areas assigned to the user for the printer are
closed. The printer file is queued for actual output.
Error Messages:
None.

56

CLOSIO

COMBINE

Purpose:
The COMBINE command joins two or more disk files into a
single file, moves files between disks, and changes file
designations.
Format:

I COMBINE I nfn nft nfm ofn1 oftl ofm1 ••• ofnN oftN ofmN
-~~-~-~----~~----------~-----------~---~-~~~--~~----~- ------

nfn fnt nfm are the filename, filetype, and filemode of the
file to be created.
ofn

oft ofm

are the filename, filetype, and filemode of
existing file(s} to be included in the new file.

Osage:
The file to be created and each of the included files must
be specified by filename, filetype, and filemode.
Input
files must
have the
same record
format (fixed
or
variable-length). Input files of fixed-length records must
have the same record length. Any number of input files can
be included in the new file, in the order named"
but the
command must not exceed a single input line.
The output file is created on the specified disk, according
to the mode letter of the new file.
Input files may be on
any disk.
If the new filename, filetype, and filemode are those of an
existing file, the old file will be erased when the new file
is created. The old file may be among the input files.
Notes:
a.

Files may not be copied to the system (SY) disk.

h.
As the input files are processed, a temporary work file
is created with the identifiers (TEMP) (FILE) mm, where rom
is the specified mode of the output file. When processing
is completed, this file is given the designation specified
for the output file.
If an error occurs such that input
files are destroyed, records can be retrieved from this work
file.
Responses:
None.
COMBINE

51

Examples:
a.
COMBINE FILE DAOl P3 TSTl FILE P5 TST2 FILE P5
The file FILE DAOl P3 is created on the P-disk. It contains
all the records of TST1, followed by the records of TST2.
TSTl and TST2 are not changed.
b.
A

COMBINE JOBS EXEC T5 JOBS EXEC PS
copy of the P-disk fi1e JOBS is made on the T-disk.

c.
COMBINE JOBA FORTRAN P5 JOBA FORTRAN P5 SUBRl FORTRAN P5
The file SUBR1 is appended to a copy of JOBA, and the new
file replaces the ori9inal JOBA.
Error Messages:
E(OOOOl) FILE -filename filetype filemode w NOT FOUND.
The file specified in the message was not found. Files
remain as they were before the command.
E(00002) DISR ERROR WHILE READING.
An I/O error occurred. or there is
for buffers.

insufficient core space

E(00003) DISR ERROR WHILE WRITING.
An I/O error occurred, or the user's allotted disk space is
filled.
E(OOOOS) ERROR IN NAME, TYPE. OR MODE OF OUTPUT FILE.
Correct the designation of the output file.
E(00010) INCORRECT PARAMETER LIST
The command format was incorrect. Files were not changed.
EC00011) MODE SPECIFIED FOR OUTPUT FILE IS ILLEGAL.
Correct the mode specification of the output file.
If the
first input file had mode number 3 or 4, it has been erased.
E(00012) ATTEMPT TO WRITE OUTPUT FILE ON READ-ONLY DISK.
Files may not be written on READ-ONLY disks. Change the mode
of the output file.
E(00013)

ATTEMPT TO COMBINE FIXED AND VARIABLE LENGTH
FILES.
The input files must all have the same record format.

58

COMBINE

EDIT
Purpose:
EDIT has three purposes: (1) to create card image and SCRIPT
files, (2) to make changes to existing files, and (3) to
allow context-directed!, online perusal of files.
Format:
EDIT

1 

filetype

filename specifies the filename of the
created

file to be edited or

filetype specifies the filetype of the
created

file to be edited or

Usage:
If a file with the specified filename and filetype does not
exist, EDIT assumes that the file is being created, the
Input environment is entered, and information typed by the
user thereafter becomes input to that file. If such a file
does exist, the Edit environment is entered, enabling the
user to issue EDIT requests and to modify the specified
file.
EDIT searches all disks for the file.
If the file is found,
its mode is saved and EDIT writes the new file back to that
disk. If the file is not found, the newly created file is
put on the P disk.

EDIT

59

OPERATION OF THE CONTEXT EDITOR
The Editor is a program designed to provide facilities for
the creation and modification of card-image and SCRIPT files
from an online terminal. Editing is performed upon a
main-storage-resident copy of the file.
This approach
provides for rapid movement both forward and backward
through the file.
It does, however, limit files which may
be edited to those wbi,ch may be wholly contained within the
available main storage.
It is possible to perform edit
operations upon larger files by using the CEDIT command,
(but the movement within the file may be slower, as CEDIT
works with disk files and not a core copy of the file) or by
issuing SPLIT for the file. to break it up into smaller
files that can be handled by EDIT.
LINE POINTER
Associated with each file is a pointer which refers to a
line in the file considered to be the current line. The
current line is defined as the line that is being created or
edited in the file.
Various Edit requests are provided for moving the current
line pointer. This pointer may be moved (1) to a specific
record (indicated by its record number),
(2) to a record
specified by its relative
displacement (in number of
records) forward or backward from the current pOSition of
the pointer, or (3) to a record containing a specified
string of ·.:haracters or having a specified label.. The
ability to search for strings allows the user to concern
himself only with the textual context of the desired
movement" relieving him of the concern of keeping track of
record numbers and counts of inserted and deleted records.
Many of the record modification requests also reposition the
current line pointer (for example, LOCATE, FIND, DELETE., or
CHANGE). When a FIND, LOCATE, or CHANGE request is issued,
if the pointer is positioned at the end of file, the pointer
is automatically moved to the TOP of the file before
executing the command.
the environment is changed from Input to Edit, the
pointer is positioned to the last line entered from the
terminal. When it changes from Edit to Input,the pOinter is
positioned such that the lines being entered follow the last
line edited.

~hen

When the EDIT command begins in the Edit environment, the
pointer is positioned before the first line in the file.
During the Edit a null line is automatically placed in front
of the first line of the file to permit the insertion of
lines at the beginning of the file. When EDIT begins in the
Edi t environment or when a TOP request" or possibly the UP
request, is issued, the pointer is positioned at this null
line. The null 1ine never gets written onto disk, nor is it
I

60

EDIT

ever printed by the terminal. When the pointer is positioned
at the null line, a PRINT request types a blank line.
If a null line is entered in the Input environroent, the Edit
environment is entered.
If a null line is entered in the
Edit environwent, the confirming message "EDIT:" is typed
out.
To enter
the Input environwent from
the Edit
environment, issue the INPUT (I) request.
SAVING INTERMFDIATE RESULTS
If extensive input and/or changes are beinq maje to a file,
it is a good time-sharing practice to rrake a few additions
and/or changes at a tirre, issue the S~VE request, and then
continue making additions or changes to the file.
The
process should be repeated until all additions and/or
changes are wade. The final copy of a file being edited, or
the first copy of a newly-created file,
will not be
permanently written onto disk until the FILE or SAVE request
is issued. This procedu~e will pnsure that a miniroum of work
would be redone in the case of a system failure or a gross
user editing error.
A file rr-ust consist of at least one line to be written
permanently on disk.
A file consisting of only a null line
may not be saved.
INPUT ENVIRONMENT
The Input environment is indicated by the message "INPUT:",
a carriage return, an~ the unlocking of the keyboard. The
user may then type successive lines of input to the file as
fast as he wishes.
One card image is created from each
input line. To insert a blank line in a file, type at least
one space and hit carriage return. A null line
(that is, a
carriage return with no prior blanks or characters> entered
from Input ~ode does not add a blank line to the file.
Entering the Edit Environwent
The Edit
environment
is
enterec froIT the Input environroent by typing a null line
(that is, a carriage return with no prior input on the
line).
EDIT ENVIRONMENT
The Edit envircnroent is in1icated by the message "EDIT:", a
carriage return, ann the unlocking of the keyboard.
The
user roay then type requests to the EDIT command.
All
changes to the file becowe effective immediately in core,
thus allowing recursive mo1ifications to be made to a file.
Changes are written out on disk with the FILE and SAVE
commands; QUIT keeps the original file as it existed before
any changes were wade.
Response Modes. There
E~it
environmpnt may

are two response modes in which the
operate:
"verify· mode and "brief"
EDIT

61

mode. Verify is the normal mode and causes an automatic
typeout of each line that has been changed or found as the
result of a request.
The brief mode does not respond by
retyping the specified lines, and thus the user must issue a
PRINT request to get the typeout if it is wanted.
The messages "EDIT". " INPUT", " EO F: " • and "TRUNCATED", are
always printed even if the user has selected the brief
message mode.
End of File.
If the end of file is reached by an Edit
request, an "FOF:" rressage is typed, and the pointer is
positioned after the last line of the file.
Entering the Input Environment. The Input environment may be
entered by typing thp INPUT request, and a carriage return.
EDIT REQUES'IS
Requests are issued to the EDIT command only when the user
is in the Edit environlTlent. These requests allow theluser
to manipulate and edit files.
If requests are issued during
the Input environwent, they becolTle lines of input to the
file.
Request For~ats. Each request is separated from its operand
by one or more spaces unless otherwise specified.
These
spaces can be inserted by using the space bar, the tab key,
or the logical tab character, which is discusse~ in a later
section. If the tab key or the logical tab character is
used and the request has "line" as the operand, the "line"
is placed in the card iroage as if the tab key or logical tab
character were the first character in "line".
The tab settings discussed are internal or logical tab
settings, not the external or physical tab settings on the
terminal. Detailed information concerning record for~ats,
serialization, and special character conventions follows.
String Arguments. Several of the Edit requests require
arguments called string arguments. These arguwents either
are matched against strings in the text, or replace a string
in the text.
A string argument beqins with a jelimiter and
continues as a sequence of any legal characters until the
initial character
(that is. the delimiter)
is again
encountered. Neither delimiter character is involved in the
actual ITatching or replaceroent operation.
Although, by
convention. the slash (/) is used in the following request
descriptions to denote the string delimiter,
any legal
character may be used as the d.elimiter. The delimiter
character is redefined in each new request by its appearance
at the head of a string. If two strings exist in one
request, the same deli~iter character roust be used in each
string.
Only one delirroiter may be used to separate two
adjacent string arguments in a request (for exarople, as in
the CHANGE request).
62

EDIT

FILE (RECORD) FORMATS
In general, the editor is used for the preparation of
fixed-length (logical) records of 80-character card images
with uppercase characters.
The exceptions are defined
below.
All input to the file being edited is converted from
lowercase to uppercase unless a filetype of MEMO or SCRIPT
has been specified. If a filetype of SCRIPT has been
specified, the file consists of variable-length (logical)
records.
If a filetype of ~EMO is specified, the file
consists of 80-character card images.
MEMO Files
A filetype of ME~O is use1 to input 80-character card images
containing both uppercase and lowercase letters.
SCRIPT Files
The EDIT corrmand allows processing of SCRIPT files in a form
compatible with the SCRIPT command.
If the filetype is
SCRIPT, all input lines introduced in the Input environment
and strings introduced in the Edit environment through use
of CHANGE, OVERLAY, RETYPE, and INSERT are interpreted
without converting lowercase characters to uppercase. The
character-delete and line-delete symbols have the usual
effect;
all
other
characters
are
stored
without
modification, including the tab key.
For
SCRIPT files,
the
file format
is
set to
V
(variable-length records) so that the SCRIPT command can be
used to edit or print files created by the EDIT command.
Input lines containing a backspace character are converted
into canonical forw, such that only one backspace follows
any character and only one backspace precedes the character
that overprints the character preceding the backspace.
Record Lengths
The truncation
follows:

colu~ns

INPUT and REPLACE:

for

EDIT

requests

are

as

colurr,n 71 for SYSIN, ASP360, UPDATE, COpy
column 72 for FORTRAN, COBOL, and PLI
files
column 132 for SCRIPT, LISTING,
PRINTER files
colurrn 80 for other files

FIND, OVERLAY, and BLANK:
LOCATE and CHANGE:

used

column 80

end ZONE column
EDIT

63

PRINT:

coluren 12, if serialization is defaulted on, or if
VERIFY column is set after serialization is turned
on: otherwise all 80 columns are printed.

VERIFY:

column 72, unless set otherwise.

(See the ZONE cororoand.)
Tab Settings
Internal or logical tab settings indicate a column position
that defines the beginning of a field within a record. The
logical tab settings are automatically assumed according to
the filetype specified. These internal tab settings have no
relation to the external tab settings on the terminal. The
assumed internal tab settings are given below, where the
first of these numbers indicates the column of the record in
which input is to begin.
Filetype Specified
in EDIT Command
AED
ASP360
AS1130
COBOL
COpy
DATA

EXEC
FLOW
FORTRAN
LISTING
MEMO
PLI
PRINTER
REPS
SNOBOL
SPLl
SYSIN
UPDATE
default

Assumed Tab settings

1,10,15.20,25,30.35,QO,QS
1.10,16,31,36,Ql,46,51,56,72
1.21,27,32,35.45,50,55,60
1 0 1,10,15,20,25,30
same as ASP360
default
1,5,8,17,27,31
same as ASP360
1~7,10,15,20,25,30

d·.!fault
default
2 0 10.15,20,25,30,35,40,45,50,55,60
d,.!fault
7,,, 17 If 31,36
1 0 10.20,25,30 n 35"40 o 45,50,55,60
1"7,17,30,40,50,60
Sij.me as ASP360
saroe as ASP360
1.5,10,15,20,25,30,35,40,45,50

If the specifieo filetype is not one of those listed, the
default setting of every five spaces is assumed.
The
assumed tab settings can be redefined by the TAP-SET request
from the Edit environwent.
UPDATE files have the same tab settings as
are not sequenced.

SYSIN files but

If a filetype of REPS is EDITed. tab settings are assumed
and a 12-2-9 character is inserted into column 1 if it
appears blank.

64

EDIT

COBOL as a filetypeis included to allow COBOL source
decks to be entered under CMS. Note that the COBOL compiler
is not included under CMS.

~.

Serialization of Records
If serialization is assumed for the filetype being edited,
or if it is specified by the SERIAL request, an identifier
is placed in columns 73-80 of each record. The identifier
consists of a three-character identification followed by a
five-digit sequence number.
The identification is taken
from the first three characters of the filename. or from the
first parameter of the SERIAL request. The sequence number
begins at 00010 and is incremented by 10.
The line
identifier in columns 73-80 can be changed by issuing the
SERIAL request when in the Edit environment.
Serialization is suppressed unless requested by the SERIAL
request. for all filetypes except FORTRAN, COBOL, PLI,
SYSIN, UPDATE, SPL1. COPY, SNOBOL, AED, FLOW, AS1130, and
REPS. If serialization is selected for other filetypes, and
neither ZONE 1 71 nor SERIAL id is issued during subsequent
Edits of
the file,
serialization characters
may be
inadvertently shifted into column 72" or columns 73-80 may
be overwritten.
The placing of the identifier in columns 13-80 can be
eliminated by specifying no serialization in the SERIAL
request; this causes the truncation of input lines at column
80 and no identifier to be assigned to each record. A file
whose filetype is MEMO, SCRIPT, PRINTER, LISTING, or EXEC
should Dot be serialized.
SPECIAL CHARACTERS
Logical Tab Character
There is a character" called the logical tab character. used
in conjunction with the logical tab settings. This character
causes blanks to be inserted into the record from the column
position at which this character is input, until the first
column position of the next field defined by the logical tab
settings,. The next character from the input line after the
logical tab character is inserted as the first character of
the next field. This blank insertion is done for all
filetypes except SCRIPT: for blank insertions in SCRIPT
files, refer to the SCRIPT command.
The standard logical tab character is the pound sign (#).
The logical tab character can be redefined by the TABDEF
request in the Edit environment, or by the CHARDEF command
in the CMS environment to allow the pound sign
to be used
as a normal input character. The physical tab key on the
terminal can also be used for blank insertions, as it is
interpreted in the same manner as the logical tab character.
The only difference between the tab key and the logical tab
EDIT

65

character is that the tab key moves the typing element to
the next physical tab stop and does not print, while the
logical tab character prints when the character is depressed
and the typing element does not move to the next physical
tab stop.
Note that the logical line-end character is also defined as
the I
and it takes
precedence over the logical tab
character.
Logical Backspace
There is also a character~ called the logical backspace
which is used to backspace one column position in the
record. For n logical
backspace characters, n column
positions are backspaced in the record, and the n backspaced
positions are overlaid with the n characters which follow
the n logical backspace characters.
If no character is
given after a logical backspace character, the previously
entered character is not overlaid.
The backspacing is
performed for the column positions o£ a record, and not for
the characters of an input line.
The standard logical backspace character is the ~ character.
It may be redefined by the BACKSPACE request in the Edit
environment or the CBARDEF command in the CMS environment to
allow the I sign to be used as a normal input character.
The logical backspace character has the same effect as the
physical backspace key on the terminal for all filetypes
except SCRIPT. With SCRIPT files the physical backspace key
moves the typing element back one position, and generates a
valid input character that takes up one column in the record
for each time the key is depressed; the backspace key does
not print when entered on the terminal, nor does it print on
the offline printer" but it backspaces the typing element
one position per character when the record is printed out at
the terminal.
Thus the backspace key allows underscoring
and overprinting at " the terminal for SCRIPT files.
The
logical backspace character prints only when entered and
does not take up a column in the record; it logically
backspaces one column in the record for allfiletypes,.
l•

The logical
tab character and the
logical backspace
character can be used in the following requests in the Edit
environment to insert blanks, and to backspace in the record
respectively:
BLANI<, FIND
INSERT"
OVERLAY, and RETYPE.
The logical
tab character and the
logical backspace
character can be used as normal input characters in the
string operands of the CHANGE, LOCATE;. and DELETE requests.
1,

Responses:
NEW FILE.
The specified
file does not
exist, thus
the Input
environment is entered. All subsequent input lines will be
accepted as input to the file.
66

EDIT

INPUT:
The logical tab settings
The Input environment is entered.
may be either those defined by the user or those assumed
from the filetype. All subsequent input lines will be
accepted as input to the file.
INVALID REQUEST: XXX ••• XXX
The invalid request xxx ••• xxx was issued to EDIT.
DEFAULT TABS SET
The filetype specified is not recognized by the EDIT
command; thus I' the default settings are taken for the
logical tab settings.
EDIT:
The Edit environment is entered. The logical tab settings
may be either those defined by the user or those assumed
from the filetype. An edit request may now be issued.
NO PRIMARY NAME SPECIFIED
The EDIT command was issued specifying only the fi1etype.
When the file request is issued, a name must be specified.

TRUNCATED
The input line was too long. If the filetype was FORTRAN,
PLI. SPLi, AED, FLOW t• EXEC. ASM1130. or REPS, then the input
line was truncated after 72 columns. If the filetype was
ASP360;. SYSIN, COpy .• or UPDATE, then it was truncated after
column 71. If the filetype was SCRIPT or LISTING, then it
was truncated
after 132 columns.
Otherwise,
it was
truncated after column 80. Continue typing more input.
EOF:
The end of the file has been reached during an EDIT request.
The request has
been terminated and the
pointer is
positioned after the last line of the file.
Another EDIT
request may be issued.
EDIT WORK FILE "(INPUT1) FILE Pl" EXISTS:
IF GOOD, ALTER IT TO APPROPRIATE FILENAME & FILETYPE:
OTHERWISE. ERASE IT.
The EDIT command was issued but the EDrT environment was not
entered since the EDIT workfile" (INPUT1) FILE, exists.. The
workfi1e contains whatever file the user had been editing
during a previous EDIT command that had not terminated (that
is t, if CP has crashed while the user was editing a file and
the READY message had not appeared yet. this file may
contain the updated file). If the contents are good~ alter
its identifiers: otherwise, erase it and then reissue EDIT.
Error Message
E(00002)
FILE EMPTY - EXIT TAREN
The user has attempted to save an empty file.
The file is
not written on the disk and the EDIT command is terminated.
EDIT

67

SUMMARY OF EDIT REQUESTS
The requests are listed below by functional group
Environment Selection
INPUT
(See also SAVE)
(null line)
returns to EDIT mode'
(See also FILE)
QUIT
Message Mode Selection
VERIFY
BRIEF
Pointer Movement
BOTTOM
FIND
LOCATE
NEXT
TOP
UP

*

Requests marked with * in the rest of this
the pointer under certain conditions.
,Modification of Recerds
BLANK
CHANGE (*)
DELETE (*)
INSERT (*>
OVERLAY
REPEAT (*>
RETYPE (*)
File Handling
FILE
SAVE
Information Requests
PRINT (*>
Special Characters and Format conventions
BACKSPACE
SERIAL
TABDEF
TABSET
ZONE
Miscellaneous
REPEAT (*)
X (*)
y (*)

68

EDIT

list may move

BACKSPACE Request
Format:
BACKSPACE



BACK

character is any valid character. The default character is ~
or the character specified by the CMS CHARDEF
command .•
Usage:
The BACKSPACE request defines the character to be used as
the logical backspace character. If the request is not
issued, the default character is assumed.
The logical
backspace character causes one column to be backspaced in
the card image for each logical character in the input line.
The backspace character must be redefined to allow
character to be used as a normal input character.

the

~

If BACKSPACE is issued without specifying a character, the
logical backspace character is reset to the character
specified by the eMS command CHARDEF, which defaults to the
, character.
The backspace
character is very useful
for defining
continuation cards in FORTRAN files. If the first logical
tab setting is set to column 1, the tab key or logical tab
character followed by a logical backspace character may be
used to enter a character in column 6 instead of counting
forward the appropriate number of spaces. An example of the
use of the logical backspace character follows:
column
1
6
i #~5 'page')
input line:
5'PAGE')
card image in file:
This places w5-PAGE-)· beginning in column 6 of the card
image,• assuming the first logical tab setting is set to
column 1.
Note:
If the logical backspace character is redefined in the Edit
environment, the BACKSPACE request must be issued each time
a file is edited if it is necessary to use the same
redefined logical backspace character.
If the logical
backspace character is redefined by the CMS CHARDEF command,
that character is remembered from one Edit command to the
next.

EDIT - BACKSPACE

69

Responses:
The keyboard is unlocked.
Example:
BACR $
The character
character. The
character.

70

$
~

is defined
as the logical backspace
character can now be used as a normal input

EDIT - BACRSPACE

BLANR Request
Format:
line

BLANK

I
I

B

Rline w

I
1

is any valid input line.

Usage:
The BLANK request places blanks in the current line wherever
nonblank characters occur in wline w•
Either the tab key or the logical tab character can be used
to generate blanks in the card image.
The wline w is separated from the request by only one blank.
All other blanks are considered part of wline w•
Responses:
Verify Mode:

The changed line is printed out.
The keyboard is unlocked.

Any mode:
EOF:
The end of file was reached by the request. For BLANK to
reach the end of file. the repeat request had to be issued
before BLANR.
Example:
BLANK AAAAAA A
line before request:
request:
line after request:

column
1
6
ABCDFJMNOP
blank aaaaaa a
M OP

Blanks are placed in columns 1-6, and 8
in the file.

EDIT -

BLANK

,
1

of the current line

71

BOTTOM Request
Format:
BOTTOM
EO
Usage:
BOTTOM positions the pointer at the last line of the file.
Example:
BO
The pointer is positioned at the bottom of the file.

72

EDIT - BOTTOM

BRIEF Request
Format:
.-..-~-----

.......- .... ------

BRIEF
BR
Usage:

The BRIEF request deselects the verify message mode (see the
VERIFY request), and selects the brief message mode in the
Edit environment. In the brief mode, lines that are changed
in the file are not typed out automatically_ The requests
that are affected by BRIEF are BLANK, CHANGE, FIND, LOCATE,
NEXT" OVERLAY, and UP _ If INSERT or REPLACE was issued and
the line was truncated, the line is not verified in the
brief mode.
Example:

BR
This request selects the brief mode.

EDIT - BRIEF

13

CHANGE Request

Format:

CHANGE

/stringl/string2/ <

n

*

1

C

< G

*

»

I

,

,

---~~----------~-~~-~-~---~--------~--------

/

is any unique delimiting character that
appear in string1 or string2.

does not

string1

is the group of characters to be replaced

string2

is the group of characters to replace string1

n

specifies the number of lines to be
string1. The default is one line.

G

signifies that the change is to be applied to every
occurrence of string1 in the lines.

*

is used to mean -to EOF- or -GLOBAL- (G), or both,
in a change request as follows:
C /a/b/ * *

searched for

Usage:
The CHANGE request replaces the occurrence of stringl in n
lines by string2. If G or * is specified, every occurrence
of string1 1n n or * lines is changed; if G is not
specified, only the first occurrence of string1 is changed.
If neither n nor * is specified, only the current line is
searched for string1.
If the occurrence of string1 is not found, the line(s) is
(are) not altered. The pointer remains positioned at the
last line searched for the occurrence of string1.
String1 and string2 can be of different lengths.
Each of
the n or * lines is expanded or compressed accordingly.
If an end-of-file condition immediately preceded the CHANGE,
an automatic TOP request is performed before CHANGE begins.
Notes:
a.

The n or

*

is required if G is to be

specified~

b. If n is greater than the number of lines to the end of
the filer, every occurrence of string1 from the current line
to the end is changed.
c.
That part
occurrence of

74

of each record
string1 is the

which is scanned for the
part defined by the ZONE

EDIT - CHANGE

request, or it defaults to those
under -File Record Formats-.

columns defined

earlier

Responses:
Verify Mode: The changed lineCs) is (are)
the keyboard is unlocked.
Brief Mode:

printed out and

The keyboard is unlocked.

Any mode:
EOF:
The end of file was reached by the request. To position the
pointer at the top of the file~ a TOP request must be
issued. When a CHANGE request is issued after the occurrenCe
of an end-of-file condition, a TOP request is automatically
issued before the request begins.
Examples:

a.

C

/ALPHA/DELTA/
Column
7
ALPHA=ALPHA - BETA
c /alpha/delta/
DELTA=ALPHA - BETA

1
line before request:
request:
line after request:

The first occurrence of ALPHA in
DELTA.

the one line is changed to

The above"
lowercase. example works for
files where
automatic .~apitalization is standard. For other files, such
as SCRIPT or MEMO, where capitalization is not automatic,
characters must be typed as they were input.
b.

C

*ALPHA*DELTA*

1

G
Column
1

line before request:
request:
line after request:
Every occurrence
DELTA.
c.

of ALPHA

1

ALPHA=ALPHA - BETA
c *alpha*delta* 1 9
DELTA=DELTA - BETA
in the

C .card-image.card-image.

one line

is changed

to

* *

Every occurrence of card-image from
end of file is changed to itself.

the current line to the

In
verify mode,
every
line
containing the
string
-card-image- is printed, although this example does not
effectively change the contents of those lines.

EDIT - CHANGE

75

DELETE Request
Format:

1
,

1
n

DELETE
D

I
I
t

n

<

1

/string/

I

> I

1

specifies the number of lines to
default is 1,.

/string/

specifies the
string
which,
terminates the delete operation.

be deleted.
when

The

matched,

Usage:
If /string/ is specified. all lines, starting with the
current line and up to (but not including) the first line in
which /stringl is matched, are deleted.
If n is specified, the DELETE request removes n lines from
the file, starting with the line at which the pointer is
currently positioned. Upon completion of this request, the
pointer is positioned after the last deleted line. If n is
0, the current line is deleted.
If n or /string/ is not
deleted.

specified"

only the current line is

Responses:
EOF:
The end of file was reached by the request. To position the
pointer at the top of the file, a TOP request must be
issued.
Examples:

a.
D 5
The current line,. plus the next four lines"
are deleted.
The current line pointer is then positioned at the fourth
line from the original current line.

D -/*All lines,. starting with the current line and up to (but not
including) the first record containing a /. sequence" are
deleted.

h.

76

EDIT - DELETE

FILE Request
Format:
FILE



filename specifies the name to be used as the filename.
Usage:
The FILE request terminates the editing of a file.
A
permanent copy of the file is written onto the disk as it
existed after the last pass through the file.
If the file
is being permanently stored for the first time,
it is
written onto the disk.
If the file already exists on the
disk., i t is written on the same disk in the same mode as it
previously existed. This latest copy replaces any existing
copy of the file on the disk, and the file directory is
updated.
If "filename" is specified, it is used as the filename of
the file.
If -filename" is not specified, the filename used
at the time of the invocation of the EDIT command is used.
After the file has been written onto disk, control is
returned to CMS. A file must consist of at least one line to
be permanently written on disk. A file consisting of a null
line only may not be filed.
Note:
If it is desired to move a partially-edited file to disk as
a precaution against system or user failure, use the SAVE
request. It does not terminate the EDIT session.
Responses:
The EDIT command is terminated and an entry for the file is
made in the appropriate file directory.
FILE EMPTY - EXIT TAREN
The FILE request was issued for an empty file.
No file is
saved on the disk and its entry is removed from the file
directory. The error EC00002) is generated, and the EDIT
command terminated.
NO PRIMARY NAME SPECIFIED - RETRY
When EDIT was issued, only the filetype was specified.
Therefore, a filename must be given with the file request.

EDIT - FILE

77

Examples:
a.
FILE
request:
response:

file
R; xx.xx/xx.xx

hh.mm.ss

This request writes the latest copy of the file onto disk.
b.

FILE RECALC

request:
response:

file recalc
R: xx.xx/xx.xx

hh.mm.ss

This request writes the latest copy of the
and RECALC is its filename.

18

EDIT - FILE

file onto disk,

FIND Request
Format:
FIND

line

F
~-----------~-----~--

line

is any valid input line. It may contain blanks and
the logical tab character and/or tab--key .•

Usage:
The FIND request compares the nonblank characters in "line"
with each line in the file.
The compare begins on the next
line from where the pointer is currently positioned and
continues down the file until a match occurs or until the
end-of-file is
reached.
If an
end-of-file condition
immediately preceded the FIND request, an automatic TOP
request is performed before FIND begins. If "line" is found,
the pointer is positioned to the record in which "line" is
contained.
If -lineis not found, the
pointer is
positioned after the last line of the file. The compare is
column-dependent, as the only columns compared in each
record are the ones specified by nonblank characters in
"line". For example, if wline w contains A C, the search
will be for an A in column 1 and a C in column 3.
"Line" is separated from the request by only one blank.
other blanks are considered part of "line".

All

FIND can be used to search for a specific line identifier in
columns 73-80. One technique is to issue FIND, followed by
the appropriate number of tabs to position the specified
identifier to column 73.
Responses:

Brief Mode:

The record is typed and the keyboard
is unlocked.
The keyboard is unlocked.

Any MODE:

EOF

Verify Mode:

The end-of-file was reached by the request. To position the
pointer at the top of the file;, a TOP request must be
issued. When a FIND. LOCATE, or CHANGE request is issued
after the occurrence of an end-of-file condition, a TOP
request is automatically issued before the request b~gins.

EDIT - FIND

19

Examples:
a.

FIND 90

Column
request:
line found:

1
f 90

1

90

FORMAT (S16)

The FIND request searched for 90 in columns 1 and
first line found is typed out in the verify mode.
h.

2.

The

FIND $$SUMX
If $ selected as
logical tab char.
Column

1
request:
line found:

10
$$sumx
LOOP
A

16

f

SUMX.X

Assuming that the logical tab settings are set in 1, 10, 16,
the request searches for SUMX in columns 16-19. The first
line found is typed out in the verify reode.

80

EDIT - FIND

INPUT Request
Format:
INPUT
I

Usage:
This request causes the Input environment to be entered from
the Edit environment. All subsequent input lines--including
Edit request--are treated as input to the file. and are
placed after the line at which the pointer is currently
positioned. If the INPUT request is given at the top of the
file~ the lines appear before the first line of the file.
If no lines were entered while in the Input environment and
return is made to the Edit environment, the pointer is
positioned to the
line pointed to before
the Input
environment was entered. The line after the pointer is the
same line before and after the Input environment was
entered.
To insert a blank line w type at least one space and hit
carriage return. If a null line is entered, a return to the
Edit environment occurs.
Responses:
INPUT:
The Input environment is entered.

EDIT - INPUT

81

INSERT Request
Format:
INSERT

line

I

is the exact input line to be inserted into the
file.
It can contain blanks and tabs (logical tab
character and/or tab key).

line

Usage:
This request inserts the "line" into the file without
The line is inserted
entering the Input environment.
following the line at which the pointer is currently
positioned, and the pointer is advanced to point to this
The line is separated from the request by
inserted line.
only one blank: all other blanks are considered part of
"line".
The conventions of the Input
the INSERT request.

environroent hold

true during

A blank line can be inserted in the file by using one or
roore spaces for "line". If "line" is omitted from the INSERT
request, it is interpreted as the INPUT request and the
Input environment is entered.
Responses:
The keyboard is unlocked. Examples:

a.

IbABLEbbbbbSbbbbbSUN,X
request:
line after request:

Column
1
10
i able
ABLE
S

12
s

16

18
sum,x
SUM,X

The input line AELEbbbbbSbbbbbSUM.X lis inserted in the file.
The letter b is used here to indicate a single space.
b.

I $DO 10 1=1,25
Column
1
7
request:
i $do 10 i=1,25
(assuming $ is the logical tab)
line after request:
DO 10 1=1,25

Assuming that the logical tab settings are in 1, 7, 10, and
15, this request inserts the FORTRAN statement DO 10 1=1,25
in columns 7-18.

82

EDIT - INSERT

c.

INSERT
request:
response:

insert
INPUT:

The Input environment is entered,
specified with the INSERT request.

EDIT - INSERT

as

wline w was

not

83

LOCATE Request
Format:
LOCATE
L

/string/ I

I

/

is any unique delimiting character
contained in the string

string

is any group of characters to be
the file

that is

not

searched for in

Usage:
LOCATE scans the characters of each record (as defined by
the ZONE request) for the string specified between the two
delimiters. The scan begins on the next line from which the
pointer is currently positioned and continues until the
string is found or until the end-of-file is reached. If an
end of file condition immediately preceded the LOCATE, an
automatic TOP request is performed before LOCATE begins. If
string is located, the pointer is positioned at the line
that contains it. If string is not located, the pointer is
positioned after the last line of the file.
The request is not column-dependent, because all characters
are scanned, as specified by the ZONE request. The logical
tab character and the logical backspace character can be
used as normal input characters in string.
LOCATE can be used to scan
73-80.

for a line identifier in columns

Responses:
Verify Mode:
Brief Mode:

The located line is typed and the
keyboard is unlocked.
The keyboard is unlocked.

~ny Mode:
EOF
The end of file was reached by the request. To position the
pointer at the top of the file, a TOP request must be
issued. When a FIND or LOCATE request is issued after the
occurrence of an end-of-file condition. a TOP request is
automatically issued before the request begins.

84

EDIT - LOCATE

Examples:
a.

L

/FORMAT/
Column
1

request:
line located:

1

1 /format/
55
FORMAT (-DAILY AUDIT')

LOCATE searches all characters of each line for FORMAT.
the verify mode the first line found is typed out.
h.

In

L $61$

Column
request:
line located:

1
1

5

9

$61$
12316XXX61981654321

LOCATE searches for 61 in all columns of each line.
verify mode the first line found is typed out.

EDIT - LOCATE

In the

85

NEXT Request
Format:
-------------~---~----

NEXT
N

n

<

n

>

1

is an integer indicating the number of lines by which
the pointer should be advanced. The default is 1.

Usage:
This request advances the pointer in the file by n lines. If
n is 0 or unspecified, a value of 1 is assumed and the
pointer is advanced to the next line in the file.
If the
end of file is reached before the pointer is advanced n
lines, the pointer is positioned after the last line.
Specifying a value of n that is greater than the number of
lines to the end of file is one method of reaching the
bottom of the file.
Responses:
Verify Mode:

Line typed and keyboard unlocked.

Brief Mode:

Keyboard unlocked.

Any Mode:
EOF
The end of file was reached by the request. To pOSition the
pointer at the top of the file, a TOP request must be
issued.
Examples:

a.
N 5
This request advances the pointer five lines.
b.

N

This request advances the pointer one line.

86

EDIT -

NEXT

OVERLAY Request
Format:
OVERLAY

o

line

I

1

line is an input line
line.

that replaces

parts of

the current

Usage:
This request takes the nonblank characters from "line" and
places them in the corresponding position of the current
line.
Blank characters
in
"line"
do not
re~lace
corresponding positions in the current line. If there is
more than one space after the request, these spaces are
considered as part of "line".
The logical tab character,
the tab key, and the logical backspace character can be used
in specifying "line".
Note. The line typed as a result of this command does not
print directly below the corresponding characters resulting
from commands NEXT, PRINT, etc., as the characters 0 or
OVERLAY precede the line entered.
Thus, the characters
appear in the column which is n+l characters to the right of
the character being overlaid, where n is the number of
characters typed in the request's name.
(See examples
below. )
Responses:
Verify Mode:

The changed line is
keyboard is unlocked.

Brief Mode:

The keyboard is unlocked.

typed

out

and

the

Any Mode:
EOF
The end of file was reached by the request. For OVERLAY to
reach the end of file, the REPEAT request had to be~issued
before the OVERLAY.
Examples:
a.

ObbbbbbbbbING
line before request:
request:
line after request:

Column
1
9
PROGRAMMER
o
ing
PROGRAMMING

Columns 9-11 in the current line are replaced by the
nonblank characters in "line". The letter b is used here to
indicate a single space.

EDIT - OVERLAY

87

b.

Column
136
ABCDMNOP
o 5 33 9
5B33M90P

Ob5b33b9
line before request:
request:
line after request:

Columns 1,3,4, and 6 in the cu~rent line are replaced by the
nonblank characters in the "line". The letter b is used
here to indicate a single space.
c.

Column

Ob#~c

13
FlO. 5,110)

7

1

line before request:
request:
line after request:

0

#%C
CF10.5,II0)

Assuming that a logical tab setting is set to column 7, the
logical tab character (#) followed by the logical backspace
character (~) places the next character from the input line
into column 6. The C overlays the blank in column 6 of the
current line. The letter b is used here to indicate a
single space.

88

EDIT - OVERLAY

PRINT Request
Format:

< n < LlNENO

PRINT

1

P

L

» I

I

n

is an integer specifying the
typed out. The default is 1.

L

signifies
out.

that the

number of

line identifiers

lines to

should be

be

typed

Usage:
PRINT types out n lines from the file. starting with the
current line. Upon completion of this request, the pointer
is positioned at the last line printed unless an end-of-file
condition occurred, in which case the pointer is positioned
after the last line printed. If n is 0 or unspecified, it
is assumed to be 1 and the current line is typed.
If L or LINENO is specified, the line identifier in columns
73-80 is typed out with each line.
If L or LINENO is not
specified, only the nonblank characters in column 1-72 of
each line are typed.
The n is required if L or LINENO is to be specified.
Responses:
The line(s)
unlocked.

is

(are)

printed out

and

the

keyboard

is

EOF:
The end of file was reached by the request. To position the
pointer at the top of the file, a TOP request must be
issued.
Example:

P 5
request:
lines printed:

p 5

30
10

WRITE (6,30)
FORMAT C' HERE I AM')
CALL SUBl
WRITE (6,10)
FORMAT C' BACK AGAIN')

This request types five lines. The line identifier is not
included. The pointer is positioned at the last line ~yped.

EDIT - PRINT

89

QUIT Request
Format:
QUIT
Q

Usage:
QUIT terminates the EDIT command and returns to the
environment without causing a file to be written on
disk, or making permanent updates to an existing file.

eMS
the

Respense:
The EDIT command is terminated and the file
out or perroanently updated.

is not written

Example:
Q

request:
response:

q

R: xx.xx/xx.xx

hh.mm.ss

EDIT is terminated and the file is not written on the disk.

90

EDIT - QUIT

REPEAT Request
Format:
REPEAT

n

I < n > I
!
I
I

is an integer specifying the number of times to repeat
the following BLANR or OVERLAY request. The default is

1.
Usage:
This request executes the following BLANK or OVERLAY request
n times. If n is 0 or unspecified. it is assumed to be 1.
If n is greater than the number of lines between the current
line and the end of file. REPEAT is in effect until the end
of the file. Thus. the REPEAT request can provide global
BLANK and OVERLAY requests.
Response:
The keyboard is unlocked.
Example:
REPEAT 25
The following BLANK or OVERLAY request is executed 25 times.

EDIT - REPEAT

91

RETYPE Request
Format:
RETYPE
R



line is an input line that replaces the current line.
Usage:
This request replaces the current line with "line".
The
logical tab character, the tab
key, and the logical
backspace character can be used in ·line".
"line" is
separated from the request by only one blank; any other
blanks are considered part of "line".
If no line is
specified,
the current line is deleted and the--INPUT
environment is entered.
The pointer is not advanced by this request unless the INPUT
environment is entered.
Responses:
The keyboard is unlocked.
INPUT:
No line was specified, The current line is deleted, and the
INPUT environment is entered with the keyboard unlocked.
Example:
Rb#IREG

=

J

+ R**2
Colu~ns

1
line before request:
request:
line after request:

7
lq
IRE555 = 1 - K
r #ireg = j + k**2
IREG = J + K**2

The "line" specified with the request replaces the current
line. Assuming that the logical tabs are set for a FORTRAN
filetype. the statement IREG = J + K**2 begins in column 7.

92

EDIT - RETYPE

SAVE Request
Format:
 ,

SAVE
filename

is the name to be given to the file, as
latest copy is permanently written on disk.

the

Usage:
The SAVE request writes the latest copy of the file onto the
appropriate disk and returns to the Input environment with
the pointer positioned at the same current line as before
the SAVE was issued.
If the file already exists on the
disk/ it is written onto the same disk in the same mode as
it previously existed.
This latest copy replaces any
existing copy of the file on the disk.
The file directory
is updated.
If "filename- is specified, it is used as the filename of
the file. If wfilename w is not specified. the filename used
at the time of the invocation of the EDIT command is used.
If "filename" is not specified at any time, a message is
typed out.
Responses:
INPUT:
The latest copy of the file has been saved on
has been entered.
The
Input environment
positioned at the same current line as before
issued.

disk and the
pointer is
the SAVE was

FILE EMPTY - EXIT ~AREN
The SAVE request was issued for an empty file.
The file is
not written on disk and the Input environment is entered,.
NO PRIMARY FILE NAME SPECIFIED - RETRY
When EDIT was issued, only a filetype was given. To save the
file, a filename must be specified with SAVE.
Example:
SAVE MY
request:
response:

save my
INPUT:

SAVE MY was issued to write the latest copy of the file on
disk and to give i t the filename of MY.
The Input
environment of EDIT is then entered. The current line
pointer is repositioned as in the INPUT request. If a null
line is entered, EDIT environment is entered and the pointer
is positioned as i t was when the SAVE request was issued.
EDIT - SAVE

93

SERIAL Request
Format:
SERIAL
SER
id

id
(NO)

<

n

>

10

specifies the three-character identification to be used
in columns 13-75.

(NO) specifies no serialization
placed in columns 13-80.
n

or identifier

is

to

be

specifies the increment for the line number in columns
16-80.
This number also becomes the first lin~
number. The default value is 10.

Usage:
This request
allows the user
to specify
the three
identification characters and the increment of line numbers
to be used as the identifier in columns 13-80 of each card
image. If the SERIAL request is not issued, the standard
identifier is used. The standard identifier is formed from
the first three characters of the filename: the increment
and beginning sequence number is 00010.
If columns 13-80 are to be used for data or if no identifier
is desired, the SERIAL (NO) request should be issued. If a
file is being created, the SERIAL (NO) request should be
issued before any input lines are typed. When the EDIT
command for a new file is issued, the Input environment is
entered. Before any lines are typed in, the user should
immediately enter the Edit environment by typing a null
line, issue the SERIAL (NO) request, and then return to the
Input environment by issuing the INPUT request to enter
lines of input. Eighty character input lines can then be
entered.
If a file already exists with no identifiers, the SERIAL
(NO) request must be given each time the EDIT command is
issued to maintain the data that currently exists in columns
13-80 of the file.
If a file already exists with no
identifiers and the SERIAL (NO) request is not issued, the
standard identifier is placed in columns 13-80.
If a file already exists and the SERIAL request is issued
with an id and/or increment, the new identifier replaces the
contents of columns 13-80: the replacement does not occur
until a FILE or SAVE request is issued. The entire file is
then resequenced with the new identifier.
If a file already exists with identifiers. or if input lines
have been entered which were serialized, the SERIAL (NO)
94

EDIT - SERIAL

request has no effect and the identifiers are not changed.
Once serialization has begun. it cannot be nullified.
Note:
For a filetype of ~EMO. SCRIPT, LISTING, or EXEC. the
default option for serialization is SERIAL (NO).
That is,
if serialization is wanted" it must be explicitly stated.
(See ·Serialization
of Records· under
ftFile (Record)
Formats·. )
Response:
The keyboard is unlocked.
Examples:
a.
SERIAL REP 20
The request causes REP to be placed in columns 13-15 of each
card image, the first input line to be numbered 00020, and
the line numbers to be incremented by 20.
h.
SERIAL (NO)
If the file is being created, this request allows the user
to create SO-character card images from each input line, as
no identifier is placed in colUl'lns 73-80. If the 'Iile
already exists without identifiers. the data in columns
13-80 is maintained.
If a
file already exists with
identifiers, or if input lines have been entered which were
serialized. the SERIAL (NO) request has no effect until the
current pointer is positioned at the top of the file, after
which no new serialization takes place.

EDIT - SERIAL

95

TABDEF Request

Format:
------~-------~--------------

TABDEF
TABD

character

< character > I
I

is any valid character to be used as the logical
tab character.
The default character is the #
or the character specified in the eMS CHARDEF
command.

Usage:
TABDEF respecifies the character to be recognized as the
logical tab character. If TABDEF is not issued, the default
character is assumed. Note that the n is also defined as
To use the n as the tab
the logical line-end character.
character, the CMS LINEND command must be issued.

If the # character is to be used as a valid input character,
the logical tab character and the line-end character must be
redefined.
IF TABDEF is issued without specifying any
character, the
logical tab character is reset to the # character or the
character specified by the CHARDEF command.
If the logical tab character is redefined in EDIT, the
TABDEF request must be issued each tiroe the EDIT command is
issued, if the user desires to use the same redefined
logical tab character. If the logical tab character is
redefined by the CMS CHARDEF command, that character is
remembered from EDIT to EDIT.
Response:
The keyboard is unlocked.
Examples:
a.
TABD $
This frees the # as a valid input character and defines the
$ as the logical tab character.

b.
An example of the use of the logical tab character in a
FORTRAN filetype is shown below
Column
1
7
input line:
#x = a + b
record in file:
X = A + B
If the logical tab setting is set in column
expression X=A+B begins in column 7 of the record.
96

EDIT - TABDEF

7,

the

TABSET Request
Format:
TABSET
TABS



n1

is the column
to begin.

in the record at which

the line is

n2 ••• nN

are column positions for logical tab settings.
omitted, the default tab settings are used.

If

Usage:
This request enables the user to establish his own internal
or logical tab settings for a record,. The tab settings
determine the number of spaces to be inserted in the line
when either the 10gical tab character or the tab key is
used.
The TAB SET request is
that do not exceed
indicates the column
following ten numbers

followed by from one to eleven numbers
the value of 80.
The first number
in which the record begins"
and the
specify the logical tab settings.

If more than eleven numbers are specified, only the first
eleven are used.. Input lines are truncated to 71 or 12
characters, when tabbing indicates a column position above
71. and when serialization is in effect.
Otherwise input
lines are truncated to 80 characters, even if a number
greater than 80 is specified.
If the first number, specifying the column in which the
record begins, is not equal to 1, all input to the file will
start at the specified column in the record and all previous
columns are set to blanks. The EDIT requests BLANK, FIND,
and OVERLAY consider each record to begin in column 1,
regardless of the first specified tab value.
The EDIT
requests INSERT and RETYPE interpret the beginning column
position and process the specified line in the same manner
as input to the Input environment.
The TABSET request overrides
the assumed logical tab
settings, such as for FORTRAN, PLI, and SYSIN filetypes.
The user-defined tab settings apply on1y to the file during
the current EDIT command. If EDIT is issued again for the
same file ,• the assumed logical tab settings are in effect
until TABSET is reissued.
If TAB SET is issued without specifying any values, the
logical tab settings are reset to the default settings for
the filetype of the file being edited,.
EDIT - TABSET

97

Logical tab settings. which are redefined by the user for a
file. must be redefined each time the EDIT command is
issued. if the same logical tab settings are desired.
Response:
The keyboard is unlocked.
Examples:

a.
TABS 1 1 13 19 25 60
This request sets the logical tab settings in columns 7. 13.
19, 25. and 60. and input starts in column 1.
h.
TABS 2 5 10
This request would be used to prevent entry of data into
column 1. and to set the tabs at columns 5 and 10.

98

EDIT -

TABSET

TOP Request
Format:

TOP
T

Usage:
~his

request repositions the pointer to the top of the file
(that is, to the null line in front of the user's first line
in the file). An aptomatic TOP is performed by the FIND,
LOCATE, and CHANGE requests if an end-of-file file condition
immediately preceded the FIND, LOCATE, or CHANGE request.
Response:
The keyboard is unlocked.
Example:
T

The pointer is positioned at the top of the file,.

EDIT - TOP

99

UP Request
Format:

n

UP

< n >

U

1

is an integer indicating the number of lines by which
the pointer should be moved back. The default is 1.

Usage:
The UP request repositions the pointer n lines before the
current line. If n is 0 or unspecified, a value of 1 is
assumed, and the pointer is moved up to the previous line in
the file. If n is greater than the number of lines between
the top of the file and the current line, the request
functions as a TOP request,.
Responses:
Verify mode:

The line at which the pointer is repositioned
is printed, and the keyboard is unlocked.

Brief mode:

The keyboard is unlocked.

Example:
U 9
This request repositions
current line.

100

the pointer nine lines

EDIT -

UP

before the

VERIFY Request
Format:
VERIFY
VER
nn

t

nn

I <
>
I
12

specifies the number of columns· to verify in each card
image. The default is all columns for MEMO and SCRIPT,
12 columns for all others.

Usage:
This request terminates the brief Bode (see the BRIEF
request) fI and selects the verify model' causing the automatic
typeout of lines changed or searched for by other EDIT
requests. If nn is specified, nn columns are verified_ If
nn is not specified,. 12 columns are verified; this is the
normal mode of operation in the Edit environment. If a MEMO
or
SCRIPT file
is being
edited,
all columns
are
automatically verified.
The requests which are affected by VERIFY are BLANK, CHANGE,
FIND/. LOCATE, NEXT. OVERLAY f and UP.
Response:
The keyboard is unlocked.
Example:
VERIFY 50
The first 50 columns are verified in each card image.

EDIT - VERIFY

101

X and Y Request
Format:

I
I
I

x



y

n

!

I
,

1

request

is any edit request

n

is the number of times the
executed. Default is 1.

saved request is to be

Usage:

X and Y allow the user to save a request for later execution
and temporarily name it X or Y.
(Thus two requests may be
in a saved status at one time.) This is done with the X
request form.
The X n form allows the user to direct that the request
currently named X be executed n times:. or until end of file.
If the form X with nQ parameter is used, the command
currently named X is executed ~.
Examp1es:

a.
Y
CHANGE
/ABCDE FG//
The change request is saved as Y, allowing the user to
delete the string ABCDE FG each time he types the request,

Y.
b.
Y 3
The saved request
executes 3 times.

102

(as in the above.

EDIT - X and Y

saved, CHANGE request)

ZONE Request
Format:
ZONE

I
I

Z

n1

!

n2
truncol

n1

specifies the initial column of the zone of each record
which is to be scanned. The default value is column 1.

n2

specifies the terminal column of the zone of each
record which is to be scanned. If serialization is in
effect!, the default value is 71 for SYSIN,. ASP360,
COpy I' and UPDATE files and 72 for FORTRAN, PLI, SNOBOL,
AED,
FLOW, MAD"
AS1130,
and
REPS files.
If
serialization is suppressed, the default value is 132
for all SCRIPT and LISTING files, and 80 for all
others, including MEMO, DATA, and EXEC.

Usaqe:
This request causes subsequent LOCATE and CHANGE requests to
apply only to the zone of the records specified by the
integer values for starting and ending columns.
The initial zone column, nl, must be strictly less than the
final zone column, n2" and n2 must be less than or equal to
the truncation column.
If serialization is requested by use of SERIAL and the
current zone overlaps columns 73-80, the ending zone column
is res'et to 72.
Notes.
a.
If serialization is in effect for SYSIN, ASP360, COPY,
or UPDATE files, the default value of truncol (n2) is 71,
but the ZONE ending column can be set to column 72 to insert
a continuation character in a record.
b.
In addition to its obvious uses in searching and
modifying fixed-format card files"
the ZONE request has
utility in source program editing for adding comment fields,
adding continuation
characters, and searching
on the
serialization field, columns 73-80.
c.
To change the limits for fixed-column requests, such as
FIND., BLANK!, and OVERLAY,. the TABSET request should be used.
For ,.!xample l• to overlay starting in column 52 of each card,
the request TABSET 1 52 should be used.

EDIT -

ZONE

103

Response:
END ZONE RESET TO 12 FOR SERIALIZATION
If serialization is in effect,
and the ZONE request
specifies a terminal column (n2) of 13 or greater, the
terminal column is set to 12.
Example:
ZONE 1 12
The initial ZONE column is set to 1 and the terminal ZONE
column is set to 12, independent of whether serialization is
in effect.

104

EDIT - ZONE

ERASE
Purpose:
The ERASE command deletes a file or a related group of files
from a user·s read-write disks.
Format:

-----------------------------------------_._-/
filename filetype < filemode >
ERASE
*
filename filetype
erased.

*

*

p*

filemode specify the

specifies all filenames,
filemodes.

all

file that is

filetypes

to be

and/or

all

Usage:
Filename and filetype must be specified in the ERASE
command, either by name or with an asterisk.
If the
fileroode is omitted, the P-disk is assumed. If the filemode
is specified with an asterisk, all read-write disks are
searched.
Those parts of the file
identifier not specified by
asterisks are used to search the file directories. Entries
for all files matching the specified identifiers are deleted
from the appropriate directory(s), and disk space occupied
by these files is made available for new files.

ERASE deletes read-only files.
Response:
ERASE gives no response except the Ready message or an error
code ..
Examples:
a. ERASE DLFAC MODULE P5
The file specified is deleted from the
its space on the P-disk is freed.

file directory, and

b. ERASE * LISTING
All files with the type LISTING are deleted from the P-disk.
c. ERASE * * *
All user files on read-write
directory is cleared.
ERASE

disks are

deleted, and

the

105

Error Messaqes:
E(00001) INVALID PARAMETER-LIST
The filename or type was omitted,
incorrect. Correct the command.

or the

E(00002) FILE SPECIFIED DOES NOT EXIST
The file specified was not found in
directory.

was

user's

file

E(00003)
An I/O error occurred.
Processing may not have
completed.
It may be necessary to initialize the
again. See FORMAT.

been
disk

106

ERASE

the

filemode

FILEDEF
Purpose:
The FILEDEF command
allows the user to
specify the
Input/Output devices as well as certain file characteristics
which will be used by a program at execution time: FILEDEF
is also used to modify,. delete
and list current file
definitions. FILEDEF is not currently used by any of the
languages in CMS.
l•

Format:
~---~----------~------------------~~-----~--~~~---~-~

1

I

DDNAME

IFILEDEF 1< DSRN

I

I

*

device
CLEAR
DUMMY

 I

*

•

*

I

'filename is the name of the file to be closed.
*
means all filenames.
filetype is the type of file to be closed.
*
means all filetypes.
filemode is the mode of the file to be closed.
*
means all filemodes P,T" and S.
Usage:
FINIS closes one or more specified files that are open.
Closing a file consists of writing out the last record of
that file on the disk"
updating the appropriate file
directory, and removing the entry for that file from the
user's active file table. If the filemode number is 3 or 4
(delete upon reading>, the file is erased. An asterisk may
be used for the filename, filetype, and/or filemode to
denote the closing of all opened files with the appropriate
filenames, filetypes u and/or filemodes.
If the filemode is
not given, the first file found with the specified name and
type is closed.
The order of search for the specified
file(s) is (are) the standard order of search.
The specified file must already be open in order to be
closed. If it is not, an error code is returned by the
FINIS command.
Note.
FINIS should be issued by the user when his program does not
close the files used during the execution of that program.
Files accessed by OMS commands are closed automatically.
Responses:
None.
Examples:
a. FINIS DATAOUT CARDS P5
The file whose identifier is DATAOUT CARDS PS is closed.

112

FINIS

b. FINIS DATAOUT CARDS
The first file found with a filename filetype of DATAOUT
CARDS is closed. The permanent disk. the temporary disk. and
the system disk are searched in that order for the file.

c. FINIS. FILEt •
All files that are open
closed.

and have

a filetype of

FILE1 are

d. FINIS • * •
All files that are open are closed.
Error Messages:
E(OOOOl)
The specified filename is invalid.
zeros. The file is not closed.
E(00003)
error occurred while reading
command has terminated.

~n

It contains

or writing the

leading

disk.

The

E(00004)
The first character of the mode is illegal.
E(00006)
The specified file is not open and
closed. The command has terminated.

FINIS

therefore cannot

be

113

LISTF
Purpose:
LISTF has two purposes:
(1) to type at the terminal the
and
name,
type,
model'
size,
date-Iast-updated,
time-Iast-updated of specified files or (2) to create a file
on the permanent disk containing information similar to that
typed at the terminal.
Format:

1

LISTF

I

I
I

1

*

I

name is the name of the files to be listed.
*
denotes all filenames and is the default value.
type is the type of file to be listed.
*
denotes all filetypes and is the default value.
mode is the mode of the files to be listed. If omitted, all
read-write disks are searched.
*
means all disks.
Note.
An asterisk,
(*),
preceded by any
number of
characters for name or type searches for the specified
characters as the leading characters for that identifier.
For example, LISTF ABC* FORTRAN prints the identifiers for
all FORTRAN files with filenames beginning ABC.
Options:
EXEC

(E) creates
a file on the permanent
list of the specified files.

disk containing a

SORT (S) sorts, or groups together, all similar filetypes.
ITEM (I) types the number of logical items instead
number of BOO-byte physical records.
NAME

(N)

TYPE

(TY) causes
filetype.

MODE

(M)

produces a list of filenames only.
the

list to

contain

only filename

and

truncates the typed line after filemode.

REC (R) prints
records.

filename, filetype. filemode, and

DATE (D) causes the list to
and date the file was
the default line.
114

of the

number of

contain name, type, mode. size,
last written (mm/dd).
This is

LISTF

YEAR (Y) causes the date to include the year (mm/dd/yy).
TIME (Tl causes the time that the file was last
(hh/mm) to be added to the defaulted line.

updated

Usage:
LISTF either types out the specified files or creates a file
containing the information. All operands are optional. If
no operand is specified, a complete list of all the files
that exist on the user's read-write disks is typed out. The
list consists of the name, type, mode" number of records,
and date each specified file was last written. The number of
records is the number of SOO-byte records occupied by the
file,. The date is typed as month--date (mm/dd). See Figure
6.
listf
FILENAME
FORTCLG

w

UCC1
TRY
LOAD
W

FILETYPE
EXEC
LISrrING
MODULE
TXTLIB
MAP
TEXT
MODULE
FORTRAN
FORTRAN

UPDATE
TEST1
SUBS
SUBS
TEXT
R: T=0.05/0.14 15.15.04
Figure 6.

MODE
Pi
Pi
P1
P1
Pi
P1
P1
Pi
P1
Pi

NO.REC
1
2
17
3

11
5
3

10
5
6

DATE
S/29
1/16
9/08
8/30
8/13
1/11
8/30
9/03
9/02
9/02

output from the LISTF command

filename, filetype, and/or filemode other than * is
only the file with that identifier is typed out
along with its size.
If a

specified~

If the filemode is not specified, only the read-write disk
directories are examined by LISTF. If a filemode of * is
specified~ all disks
are used. Therefore, in order to have
LISTF search read-only disks, a filemode must be specified.
If the (EXEC) parameter is specified, a card-image file is
created on the user's permanent disk and assigned the
identifier CMS EXEC Pl.
If a file with the identifier CMS
EXEC Pl already exists, it is erased, and a new file is
created. This file contains a card image for each of the
specified files and the format of each card image is as
follows:

LISTF

115

Columns

Contents

2-3
5-6
8-15
17-24
27-28
31-34
36-40
42-48

&1
&2
filenaroe
filetype
fileroode
number of records
date
time

All other columns are blank. For an example of a CMS EXEC
file, see Figure 7, in which the PRINTF command has been
used to typeout the contents of the EXEC file.
listf • fortran (exec)
R; T=0.20/0.31 15.15.15
printf cms exec
&1 &2 W
FORTRAN
&1 &2 SUB2
FORTRAN
&1 &2 EXAMPLE
FORTRAN
&1 &2 DRGB
FORTRAN
&1 &2 GBB
FORTRAN
&1 &2 SSNSS
FORTRAN
R; T=O.23/0.34 15.18.42

P1
PI
PI
P1
P1
P1

Figure 1. Creation and printing of a

3

12
5

11
10
1
C~S

8/12
8/111
7/29
8/30
8/30
8/31

EXEC file

The CMS EXEC file is like any other user file.
It can be
printed offline, edited, added to, changed, and so on, but
its main purpose is to be used with the EXEC or $ commands.
Refer to the EXEC writeup for a description of the usage of
a CMS EXEC file.
Responses:
If the (EXEC) option is specified, the file CMS EXEC is
generated on the user's permanent disk, and no response is
typed at the terminal.
If the (EXEC) option is not given,
files is typed at the terminal.

the list

of specified

As can be seen in the description of the options.
only
certain quantities of each specified file can be typed by
LISTF. Each option has a truncating effect on all options
of lower priority.

Examples:
a.
LISTF
The name,. type, mode, size and date of each file
read-write disks are typed. See Figure 6.

116

LISTF

on the

b.
LISTF ABC* FORTRAN (N)
The name of each file that has a filename beginning with the
characters ABC, has a filetype of FORTRAN, and exists on the
read-write disks is typed.

c.
LISTF FILE * * (T)
The name. type, mode o size, date, and time of each file that
has a filename of FILE and exists on any disk is typed.
d.
LISTF (EXEC)
The file with the identifier CMS EXEC P1 is created on the
permanent disk. This file contains the same list of files
that was typed in the first example above, hut each entry in
the list has &1 an~ &2 placed in front of it.
e.
LISTF * FORTRAN (EXEC)
The file with the identifier eMS EXEC P1
file contains the same list of files that
terminal in the second example above, but
list has t1 &2 placed in front of it. See

is created. This
was typed on the
each entry in the
Figure 7.

Error Messages:
E(OOOOl)
ERROR IN PARAMETER LIST.
An incorrect form of the command was issued.
if all parameters are valid.

Check to see

E(00002)
NO FILE FOUND.
The specified file does not exist on the disk.
E(00003)
* Z (CCU) NOT LOGGED IN **
LISTF was issued with Z as the specified mode, but there is
no Z-disk logged in. Either the wrong mode was specified,
or LOGIN Z should be issued.
E(00003)
NO R/W DISR LOGGED IN
LISTF was issued with no mode specified. The default is all
read-write disks. and none are logged in.

LISTF

117

OFFLINE
Purpose:
The OFFLINE command controls the unit record input/output
devices. Input files may be entered through the card reader.
Output files may be printed. with or without automatic
carriage control. or punched.
Format:

I OFFLINE I command
I
I

filename

<*,

filetype



where command is as follows:
READ

specifies a
reader.

deck is

to

be read

from the

PRINT

causes the specified file to be printed on the
system printer with automatic single spacing.

PRINTCC

causes the specified file to be printed with the
first character of each record interpreted as a
carriage control character.

PRINTUPC

translates to uppercase, and
records of the named file.

then

prints

card

the

PRINTVLR causes the specified, variable-length file produced
by an OS/360 language processor to be printed.
PUNCH

causes the specified file to be
system card punch.

PONCHCC

causes an OFFLINE READ filename filetype control
card to be inserted as the first card before
punching the specified file.

PUNCHDT

causes an OFFLINE READ filename filetyped filemode
data-last-written time--last-written control card
to be inserted as the first card before punching
the specified file.

filename

filetype  identify
the file to be
transferred. If filemode is omitted for a READ, Pl
is assumed.

*

specifies that filename,
filetype, and filemode
are found in OFFLINE READ control cards in the
input card stream.
(Valid only when coromand =
READ)

118

OFFLINE

punched onto the

Usage:
Input
If filename and filetype are specified with the OFFLINE READ
command, only one file is read in. Input records of up to
132 characters are accepted. A file that was transferred
with the XFER E TO userid command should be read in with the
filetype PRINTER. A previously existing file with the same
identifiers is erased.
If filemode is omitted, P1 is
assumed.
If the file designations are to be entered in the card
stream. a single asterisk must be specified with the OFFLINE
READ command instead of filename and filetype. The deck
entered through the card reader may contain any number of
files, each immediately preceded by a card containing an
OFFLINE READ control card specifying the filename. filetype,
and optionally. filemode. The command must start in the
first card column. These control cards are typed out at the
terminal as they are encountered, and are interpreted by the
system just as if they had been entered from the terminal.
Any existing file with the same identifiers as those
specified on one of the OFFLINE READ cards is erased. Each
command card ends the file preceding it, and the last file
is ended by the end of the card deck.
If an OFFLINE READ * command is issued. and the first card
of the input stream is not of the form OFFLINE READ filename
filetype, a file identified as •• NAME,.. •• TYPE,.. P1 is
created containing all cards read in until another OFFLINE
READ control card or an end of file is encountered. This
temporary file may now be altered to the desired filename
and filetype.
When operation is on a virtual machine, user card decks must
be read in by CP before an OFFLINE READ command can be
issued. The user need not be logged in at the time the
decks are read in,. Each deck must be entered separately,
and each must be preceded by an identification card with
CP67USERID punched in the first ten columns, and the user·s
identification starting
in the
13th column,
or the
characters ID punched in columns 1 and 2 and the userid
starting in column 10,.
CP saves the deck until the user
logs in and requests it with an OFFLINE READ command. If
more than one deck has been read by CP, they are processed
by successive OFFLINE READ commands in the order in which
they were entered.
Output
For the OFFLINE PRINT,. PRIN'rCC, PRINTUPC. PRINTVLR, PUNCH,
PUNCHDT, and PUNCHCC commands, filename and filetype must be
specified. If the filemode field is blank, the P disk is
assumed. Asterisks are not permitted in the filename or
filetype fields.
OFFLINE

119

The OFFLINE PRINT command prints the specified file with
single spacing and CMS page headings containing the file
identifiers and a page number. Up to 55 lines are printed on
a page.
If the file being printed has a filetype of
LISTING, it is printed as if PRINTCC were issued.
The OFFLINE PRINTCC command uses the first character of each
line in the file as a carriage control code.
The maximum
line size,
including the
control character,
is 133
characters.
A blank (hex'qO-) in the control position
causes the line to be followed by a single space. A zero
(hex -FO-) causes a single space before, and after, the
printed line. A one (hex -Fl') causes a skip to the top of
the next page before the line is printed, and a single space
after the line. Another value in the control byte is
assumed to be a valid channel command code, and is filled
into a CCW. No headings or page numbers are supplied and no
automatic skip is performed at the end of the page.
OFFLINE PRINTUPC performs uppercase translation on all
records of the specified file.
For example, if a file of
type SCRIPT or MEMO is to be printed, and the correct
printer character chain is not available g PRINTUPC prints
the file in uppercase, eliminating all print checks and
garbled characters.
OFFLINE PRINTVLR prints variable-length records produced by
an OS access method. The printable data of the record is
preceded by a four-byte control field which contains the
length of the record. This field is discarded, and the
record printed under the PRINTCC format.
The OFFLINE PUNCH
command accepts records up
to
characters in length.
Shorter records are padded to
characters with blanks at the right.

80
80

OFFLINE PUNCHCC inserts as the first card of the specified
file to be punched, an OFFLINE READ ••• control card. The
punched deck can now be read by means of an OFFLINE READ *
command.
OFFLINE PUNCHDT inserts a card with the same information as
OFFLINE PUNCHC, but also includes the filemode and date and
time last written.
Notes:
a.
Files handled
by the OFFLINE command
must have
fixed-length records, except for OFFLINE PRINTVLR, which
handles variable-length records.
b. Only the first card of any input deck is checked for
CP67USERID or ID. CP processes as a single file all cards
following it until a physical end of file is reached.

120

OFFLINE

c. Under CP, printer output is preceded by a single line
containing a USERID. PUNCH output is preceded by a card
containing a USERID.
d. OFFLINE READ accepts input records up to 132 characters
in length, such that LISTING files may be XFER·'ed from os to
CMS. The file should be read in with a filetype of FRINTER.
e. If OFFLINE READ was issued, and the file being read in
is 132-byte records, CMS types at the finish of the read,
RECORD LENGTH = 132 BYTES.

Responses:
a.

OFFLINE READ filename filetype filemode
the command OFFLINE READ * control cards encountered
in the input card stream are typed at the terminal.

~fter

b.
READER EMPTY OR NOT READY.
This response and the Ready message follow
command if no card deck has been entered
USERID.

an OFFLINE READ
for the user's

c.
RiT=xX.XX/xx.xx
xx.xx.xx
The Ready message indicates the command has completed
without error.
It does not mean that physical output has
completed. The output file is held by CP until other users
free the output device.
"OFFLINE READ.~.w CONTROL CARD IS MISSING.
FOLLOWING ASSUMED:
This response and the assumed control card are typed
whenever an OFFLINE READ * command is issued, and whenever
the first card of the input stream is not an OFFLINE READ
filename filetype  control card.
d.

THE

e.
(NULL FILE)
Attempt to read a file containing no records was made.
f.

SYSTEM I/O ERROR
CP ENTERED, REQUEST PLEASE
This roessage indicates that an unrecoverable I/O error has
occurred on a spooled direct-access device. ReIPL CMS, and
issue the OFFLINE coromand again.
Examples:
a.
OFFLINE READ SEC23 SYSIN
Any previous file with the filename and filetype SEC23 SYSIN
is erased. All cards following the CP67 identification card
are placed in a file on the permanent disk identified as
SEC23 SYSIN Pl ..
b.
OFFLINE READ *
Assume the following deck has been entered by the operator:

OFFLINE

121

/

/1

/

/

/d-a-t-a--c-a-r-d~s-----------------------,

___ 1____________________________
/OFFLINE READ FILE DA02 P5
/

--1-----------------------------/

/

/

----------~--------------------~
/source
cards
1

--1------------------------------i

/OFFLINE READ SORTJ FORTRAN

--I~----------------------------~
/CP67USERID
JAYBEE
I
Any previous files with the identifiers SORTJ FORTRAN or
FILE DA02 are erased. The card records are placed in files
on the permanent disk under the identifications SORTJ
FORTRAN Pi and FILE DA02 P5. The following response is
typed:

OFFLINE READ SORTJ FORTRAN
OFFLINE READ FILE DA02 P5
c.

OFFLINE PRINT FILE DA02
search is made for FILE DA02, on all three disks,
if
necessary.
When it is located, it is printed out with
single spacing and ~S-supplied page headings.
The first
page of the printout contains only the USERID. The second
page starts with the following heading:

A

FILE:FILE DA02 P5

CAMBRIDGE MONITOR SYSTEM PAGEOOl

The heading is followed by a blank line and 55 lines of the
file. The heading of the second and subsequent pages is the
same" except for the page number.
Error Messages:
E(OOOOl)
INVALID OFFLINE FUNCTION OR PARAMETER LIST
There are three possible causes of this message:
a.
The .operation specified with the command was
invalid r it must be one of these: READ, PRINT, PRINTCC.
PRINTUPC, PRINTVLR. PUNCH, or PUNCHCC.
h. A filename (or * under the special READ mode) was
not specified.
c.
Filetype was specified as an *. which is not
permitted.
EC00002)
FILE NOT FOUND.
The file specified for output does
spelling of the filename and filetype.

not

exist.

Check

ECOOOOS)
An attempt has been made to read a variable length file. See
122

OFFLINE

the DISK command
length files.

to be

able

to read

and punch

variable

E(00006)

PRINT (max=133) or PUNCH (rnax=SO) RECORD
EXCEEDS MAXIMUM LENGTH
The record length of an output file is greater than 132
characters for PRINT. or 133 characters for PRINTCC. This
is longer than a printer line. The OFFLINE PUNCH command
accepts records of 80 characters or less.
E(OOOO?)
PRINT or PUNCH ERROR
System hardware failure has occurred.
on the specific unit record device.

Retry

the operation

E(OOOOS)
READ or WRITE DISK ERROR
A disk I/O error has occurred.
If reading disk, an illegal
mode may have been specified. an attempt may have been made
to output an empty file. or there may not be enough core
space for the output buffers.
If writing disk, the
specified mode on the READ command roight be illegal, or no
more disk space is available.

OFFLINE

123

PRINTF
Purpose:
The PRINTF command
at the terminal.

types all, or part, of

a specified file

Format:
~--------------~-------~----~---------------filena~e filetype
n1
n2
n3

IPRINTFI

I

<

<

*

I

»

*

filenawe filetype specify the file to be typed.
nl is the line number of the first line to be typed.
n2 is the line number of the last line to be typed.
n3 is the maximum number of characters to
line, if the records are to be truncated.

be typed

on a

Usage:
The filenaIre and filetype must be specified.
If the first
line number and last line number are omitted, or specified
with asterisks, ,the entire file is typed. An asterisk in
the first line or end line fields specifies the beginning or
the end of the file, respectively.
Typed lines are truncated to the specified limit, if any, or
to 113 characters for LISTING files, 120 for SCRIPT files,
80 for MEMO fi1es,
or to 72 for all other filetypes.
If a
limit is specified, the first line number and last line
number fields must be filled, either explicitly, or with
asterisks.
The standard order of search is used to find the file. In
the case of files with duplicate filename and filetype, only
the first file found is typed.
Notes:
a. The first line number and last line number must be less
than 9999, and may not contain imbedded commas.

h. The first character of each line in a LISTING file is
not typed. This is a printer carriage-control character.
c. The KT coromand overrides
or line length.

any specified last line number

Examples:
These are given in Figures 8, 9, and
124

PRINTF

10~

printf go exec
LOAD il
START

R: T=O.27/0.S3
printf go exec

10.40.16

* *

so
GO 00010
GO 00020

LOAD &1
START

R: T=0.27/0.55
Figure 8.

10.46.32

Two examples of PRINTF commands that type out an entire file

printf syslib maclib 157 171 72
&LABEL

MACRO
MADDPL

&LABEL
DS
&LABEL.COMM DC
&LABEL.NAME DC
&LABEL.TYPE DC
&LABEL.MODE DC
&LABEL.ITNO DC
&LABEL.BUFF DC
&LABEL.SIZE DC
&LABEL.FV DC
&LABEL.NOIT DC
&LABEL.NORD DC
MEND

R: T=O.SO/0.72
Figure 9.

iCOMM=*.&NAME=*.&TYPE=*,&MODE=Pl,&ITNO=O.
&BUFF=*.&SIX ZE=80,&FV=F,&NOIT=1
00
CLS'&COMM'
COM~..AND
CLS'&NAME'
FILE-NAME
CLS'iTYPE'
FILE-TYPE
CL2'&MODE.
FILE-MODE
H'&ITNO'
ITEM NUMBER
A (&BUFF)
BUFFER AREA
A(&SIZE)
BUFFER SIZE
CL2'&FV'
FIXED/VARIABLE FLAG
H'&NOIT'
NUMBER OF ITEMS
F'O'
NUMBER OF BYTES ACTUALLY READ

10.56.18

A PRINTF command that types out a macro definition

PRINTF

125

printf fortj listing 33 • 72
SYMBOL
5

LOCATION
38C

TOTAL MEMORY

R; T=O.33/0.47

SYMBOL
20

FORMAT STATEMENT MAP
LOCATION SYMBOL LOCATION
392
8
398

REQUIR~ENTS

00057E BYTES

10.59.42

Figure 10. A PRINTF command that types out the bottom
of a FORTRAN LISTING file
Error

~essages:

E(OOOOl)

CORRECT FOF~ IS: ·PRINTF' FILENAME
FILETYPE STARTLINE ENDLINE LINE-LIMIT,
WHERE 'STARTLINE', -ENDLINE', AND
'LINE-LIMIT- ARE OPTIONAL.
The filename or filetype was omitted, or one of the optional
fields was not valid.

E(00002) DISK ERROR.
An I/O error occurred.
It may be necessary
the disk again (see FOR~AT).

to initialize

E(00003)
FILE NOT FOUND.
No file with the specified filename and filetype exists.

126

PRINTF

SCRIPT
Purpose:
The SCRIPT command outputs to a printer." file, or terminal a
file of variable-length records in a format specified by
included control words.
Format:
SCRIPT

filename

(optionl •.•• optionN)

1

filename specifies a file with a filetype of SCRIPT.
Options:
CENTER

(CE) causes offline output
printer paper.

to be

centered on

the

FILE (FI) prints the edited and formatted output of SCRIPT
into a file named -.filenaroe", instead of at the
terminal or offline printer.
NOWAIT (NO) starts SCRIPT output immediately without waiting
for the first page to be adjusted.
NUMBER

OFFLINE

prints in the
and line number
printed output.

(NU)

left margin the SCRIPT filename
corresponding to each line of

(OF) prints the edited and formatted output of
SCRIPT on the offline printer, instead of at the
terminal.

PAGE xxx causes printout to start at page xxx.
SINGLE (SI) terminates printing after one page, usually used
in conjunction with the PAGExxx option.
STOP (ST) causes
SCRIPT.

a pause at the botto« of

TRANSLATE (TR) translates lowercase
printout.

each page during

letters to uppercase in

UNFORMATTED (UN) prints the inputted SCRIPT file along with
the control words: the control words being ignored
with no formatting of the output.
Usage:
Filename must be specified with
filetype SCRIPT is assumed.
SCRIPT

the

SCRIPT command.

The

127

When the SCRIPT command is issued, the specified SCRIPT file
is typed either at the user's terminal, on the offline
printer, or into a file.
Execution is controlled hy format
control words included in the specified SCRIPT file. When
the file is located, and typing is ready to hegin, a
response is typed, and execution pauses until a carriage
return is entered at the terminal, unless the NOWAIT,
OFFLINE, or FILE option has been specified. This pause
allows the user to position the output paper at the top of a
page. If STOP is specified with the command, the pause is
repeated at the bottom of each page, allowing the user to
change paper if noncontinuous forms are being used.
If STOP
is used. the paper should be positioned to the first line to
be printed (the heading) rather than to the physical top of
the page. Typing resumes when a carriage return is typed.
The TRANSLATE option is needed if output is to be directed
to an offline printer that is not equipped with the
uppercase and lowercase letters (TN-chain). In conjunction
with the UNFORMATTED option, TRANSLATE provides a means of
printing the original SCRIPT file on a printer that does not
have the TN-chain (this can also be done by the CMS command
OFFLINE PRINTUPC).
The PAGExxx option, in conjunction with the SINGLE option,
provides a means for selectively formatting and printing
portions of a manuscript. The xxx represents a three-digit
page number and must include leading zeros (for example,
page 12 only should be requested by SINGLE PAGE0121. Another
means of selectively manipulating a formatted manuscript is
to use the FILE option to generate the entire or relevant
portion of a manuscript into a file and then use the CMS
facilities of EDIT and/or PRINTF to process it.
The FILE option produces an output file in either typewriter
format (backspace characters and carriage return characters
are used) or printer format (printer control codes are
used). The default format is typewriter. The printer format
can be specified by the combination of both the FILE and
OFFLINE options. A printer format file may be later printed
by the CMS command OFFLINE PRINTCC.
Each line read from the disk file by SCRIPT is inspected for
a first character of f t . f t . which identifies a format control
word.
Format control
words are not typed,
but are
interpreted to specify changes
in the output format.
Control words may be entered in uppercase or lowercase and
should be separated from their operands (if any) by one or
more blanks.
Control words may appear at the beginning of any line in the
file, with changes effective below the points at which they
occur. No input data should be included on lines containing
control words, since this data could, in some cases, be lost
or interpreted as an operand of the control word.
128

SCRIPT

Note.
The TAB key generates an acceptable character in a SCRIPT
file. and is transmitted by SCRIPT. The number of spaces
actually skipped on print output is dependent on the logical
tab setting specified by the .TB command. For indentations,
the .IN or .OF control words should be used instead of the
TAB key.
References:
For
more detailed
SCRIPT User's Manual.

information

on

SCRIPT,

see

CMS

Response:
LOAD PAPER: HIT RETURN
This response is given whenever the SCRIPT
command is
issued without specifying the NOWAIT option.
The carriage
return must be hit in order for SCRIPT
processing to
continue. The paper should be adjusted first.
Example:
An example of SCRIPT input and output is given in Figures 11
and 12, which follow the descriptions of SCRIPT control
words.
Error Messages:
EC00004)
INCORRECT PARAMETER LIST
An invalid parameter has been specified for a SCRIPT
control word, or a required parameter has been omitted. The
SCRIPT command has been terminated.
ECOOOOS)
FILE xxxxxxxx NOT FOUND.
No SCRIPT version of filename xxxxxxxx was
SCRIPT command has been terminated.

found.

The

£(00012)
DISR ERROR WHILE READING
A disk error was incurred by SCRIPT. The SCRIPT command
has been terminated, and the disk file being printed remains
unchanged.
EC00016)
ILLEGAL CONTROL CARD ENCOUNTERED.
An unrecognizable
control word was
encountered while
printing a SCRIPT file.
The SCRIPT command has been
terminated.
For all of the error messages from SCRIPT, the following
message is printed:
ERROR OCCURRED AFTER READING XXXX LINES.
This usually assists in finding the error in the SCRIPT
file.

SCRIPT

129

E(OOOOO)

***

A TERMINAL ERROR HAS OCCURRED WHILE
PROCESSING ON OR AROUND LINE xxxxxxxx
*** , ETC.
This message indicates a system error. The appropriate
personnel should be informed of the circumstances. Usually
this condition can be bypassed by diagnosing the cause of
the error and changing the SCRIPT file.

130

SCRIPT

SCRIPT Control Words
SCRIPT control words are interpreted by the SCRIPT command
to govern format control as the file is being printed out.
The SCRIPT control words are listed below.
Control Word
.AP
.BM
.BR
.CE
.CM

.CO
.CP
.DS
.FI
.FO
.HE
.HM

.IM
.IN
.JU
.LL
.NC
.NJ

.OF
.PA
.PL
.PN
.RD
.SP
.SS
.TB
.TM

.UN

Meaning
Append
Bottom margin
Break
Center
comment
Concatenate mode
Conditional page
Double space mode
Format (old form)
Format mode
Heading
Heading margin
Imbed
Indent
Justification mode
Line length
No concatenate mode
No justification mode
Offset
Page eject
Page length
Page numbering mode
Read from terminal
Space lines
Single space mode
Tab settings
Top margin
Undent

SCRIPT

131

APPEND Control
Purpose:
The APPEND control word allows an additional SCRIPT file to
be appended to the file just printed.
Format:
.AP
filename

filename

specifies the name of the SCRIPT file to be
appended to the file which has just been printed.

Usage:
When the .AP control word is encountered, the current file
is closed, and the specified SCRIPT file is printed as a
continuation of the SCRIPT output from the previous file.
Note.
The .AP control word only allows files to be appended to the
end of the current file. 1£ it is desired to insert file
contents into the printout of the current file, use the .1M
control word.
Example:

.AP ABC
The contents of SCRIPT file ABC are typed immediately
following the last line of the current file which precedes
the ,.AP request.

132

SCRIPT -.AP

BOTTOM MARGIN Control
Purpose:
The BOTTOM MARGIN control word specifies the number of lines
to be skipped at the bottom of output pages, overriding the
standard value of three.
Format:
.BM

I

n

-----~~--------

n

specifies the number of lines to be skipped at
bottom of output pages. If omitted. 3 is assumed.

the

Usage:
This control overrides the standard bottom margin size of
three lines. and need not be included in the file if that
value is satisfactory.
It may be included anywhere in the
file, and the most recent value set applies on any page.
Note.
The BOTTOM MARGIN control word also acts as a BREAK.
Example:
.BM 10
Ten lines are left blank at the bottom of the current page
Cif possible), and on all subsequent pages.

SCRIPT -

.BM

133

BREAK Control
Purpose:
When CONCATENATE is in effect, BREAR causes the previous
line to be typed without filling in words from the next
line.
Format:
.ER
Usage:
BREAK is used to prevent concatenation of lines, such as
paragraph beadings or the last line·of a paragraph.
It
causes the preceding line to be typed as a short line, if it
is shorter than the current line length.
Notes:
a. Many of the other control words have the effect of a
BREAK. No BREAK is necessary when one of these is present.
h. A leading blank or
BREAK.

tab on a line

has the effect

of a

Example:
Heading:
.br
First line of paragraph • • •
This part of a file is printed by SCRIPT as
Heading:
First line of the paragraph
If the
typed

BREAK control

Heading:

134

word were not

included, it

First line of the paragraph • • •

SCRIPT - .BR

would be

CENTER Control.
Purpose:
The line following the
between the margins.

CENTER

control word

is

centered

Format:
.ce
Usage:
The line to be centered is entered on the line following the
CENTER control word.
It starts at the left margin, and
leading or trailing blanks are considered part of its
length.
Notes:
a.

The CENTER control acts as a BREAK.

h. If the line to be centered exceeds
length value. it is truncated.

the current

line

Example:
.CE
Other Methods
When this line of the file is typed. the characters "Other
Methods· are centered between the margins.

SCRIPT - .CE

135

COMMENT Control
Purpose:
The COMMENT control word causes the rewainder of the line to
be ignored, allowing comments to be stored within the SCRIPT
file.
Format:
.CM

comments

Usage:
The .eM control word allows comments to be stored in the
SCRIPT file for future reference. These comments can be
seen when editing the file, or printing the file under
UNFORMAT mode.
The
comments
may
also be
used
to
store
unique
identifications that can be useful when attempting to locate
a specific region of the file during editing.
Example:
.CM
Remember to change the date.
The line above is seen when examining an unformatted listing
of the SCRIPT file, and it reminds the user to update the
date used in the text.

136

SCRIPI' - .CM

CONCATENATE Control
Purpose:
CONCATENATE cancels a previous NO CONCATENATE control word,
causing output lines to be formed by concatenating input
lines and truncating at the nearest word to the specified
line length.
Format:
.CO
Usage:
The CONCATENATE control specifies that output lines are to
be formed by shifting words to or from the next input line.
The resulting line is as close to the specified line length
as possible without exceeding it or splitting a word; this
resembles normal typist output or the MT/ST. This is the
normal mode of operation for the SCRIPT command, CONCATENATE
is only included to cancel a previous NO CONCATENATE control
word.
Note:
This control acts as a BREAK.
Example:
.CO
output from this point on in the file is formed to approach
the right margin without exceeding it.

SCRIPT -

.co

131

CONDITIONAL PAGE Control
Purpose:
The CONDITIONAL PAGE control word causes a page eject to
occur, if less than the specified number of lines remain on
the current page.
Format:
.CP
n

n

specifies the number of lines that must remain on the
current page for additional lines to be printed on it.

Usage:
The .CP control word causes a page eject to occur if n lines
do not remain on the current page.
This request is
especially meaningful (1) before an .SP control word to
guarantee that sufficient space remains on the current page
for the number of spaces requested along with any titles,
and (2) preceding a section heading to eliminate the
possibility of a heading occurring as the last line of a
page.
Note:
If no operand is specified with the .CP request, the request
is ignored.
Example:
.CP 10
If less than ten lines remain on the current page, an eject
is issued before printout continues. If ten or more lines
remain, printout continues on the current page.

138

SCRIPT - .CP

---

--------------

DOUBLE SPACE Control
Purpose:
The DOUBLE SPACE control word causes
between each line of typed output.

a line to

be skipped

Format:

.DS
Usage:
DOUBLE SPACE may be included anywhere in the
double spaced output.

file to force

Note:
This control word has the effect of a BREAK.
Example:

.DS
Blank lines are inserted
point in the file.

between output

SCRI PI' -

• OS

lines below

this

139

FORMAT Control
Purpose:
The FORMAT control word cancels a previous NO FORMAT control
word (or NO CONCATENATE and/or NO JUSTIFY control word),
causing concatenation and right justification of output
lines to resume.
Format:
.FI

or

.FO

Usage:
The FORMAT control word is a shorthand way to specify the
two control words: CONCATENATE and JUSTIFY.
This control
specifies that lines are to be formed by shifting words to
or froID the next line (concatenate) and padded with extra
blanks to produce an even right margin (justify).
Since
this is the normal mode of operation for the SCRIPT command,
FORMAT is only included to cancel a previous NO FORMAT
control word.
Notes:
a.

This control acts as a BREAK.

b. If a line without any
length, it is truncated.

blanks exceeds the

current line

c.
The .FI form of the control word is provided for
compatibility with old SCRIPT file and should not be used in
new files.
Example:
.FO
Output from this point on in the file is
an even right margin on the output page.

140

SCRIPT - .FI/.FO

padded to produce

HEADING Control
Purpose:
The HEADING control word specifies a heading
typed at the top of subsequent output pages.

line to

be

the top

of

Format:
.BE
line

line

specifies the heading to
subsequent pages~

be

printed at

Usage:
All of the line following the first blank after the HEADING
control word is printed at the top of pages starting after
the control word is encountered. No heading is typed on the
first page of an output file. The heading is typed at the
left margin. Its length must be at least ten less than the
output line length, to allow for a page number at the right
margin. Leading blanks may be used to center the heading.
The heading is typed in the 1ine specified by the heading
margin and top margin control words. Additional.HE control
words may be included at any point in the file to change the
heading on subsequent pages.
Note:
If a new heading is to be placed on a page forced with the
PAGE control word. the HEADING control must precede the PAGE
control .•
Examples:

a.
• HE CAMBRIDGE MONITOR SYSTEM
The characters CAMBRIDGE MONITOR SYSTEM are typed at the
left in the second-last line of the top margin on all pages
started after this point in the file:
PAGE 7

CAMBRIDGE MONITOR SYSTEM

b.
.he
CMS
The leading blanks are considered. part of the heading:. so
the characters CMS are centered in the heading line
CMS

PAGE 8

SCRIPT -

.HE

141

HEADING MARGIN Control
Purpose:
The HEADING MARGIN control word specifies the number of
lines to be ski~ped between the heading and the first line
of text excluding forced space (TOP MARGIN), overriding the
standard value of 1.
Format:
.HM

n

n

specifies the number
heading line.

of lines to

be skipped

after the

Usage:
The heading line is placed a specified number of lines above
the top margin. If no HEADING MARGIN control word is
included in the file. the default value is 1.
The HEADING MARGIN specified must
current TOP MARGIN.

always be less

than the

Note:
This control word acts as a BREAK.
Examples:

a.
.HM 3
Three lines are left between the beading line and the first
line of text. If default top margin of 5 is in effect. the
heading occurs one line from the top of paper, followed by
three more blank lines (the heading margin), and then the
text.
b.

..HM 1

The standard heading margin of 1 is set.

142

SCRIPT - .HM

IMBED Control
Purpose:
The IMBED control word is used to insert the contents of a
specified file into the printout of another SCRIPT file.
Format:
---~-~---------~---------

.IM

filename

filename specifies the
the printout.

file to be currently formatted into
A filetype of SCRIPT is assumed.

Usage:
The .IM and .AP control words perform similar functions, but
.IM allows the contents of a second file to be inserted into
the printout of an existing file" rather than appended to
the end of it_ Imbedding may be us,.!d to insert standard sets
of control words at desired spots in a file, as well as for
many other purposes.
Example:
.IM CBAP4
The contents
inserted in
the end of
current file

of the SCRIPT file whose filename is CHAP4 are
the printout of the current SCRIPT file: when
the CHAP4 file is reached, printout of the
resumes.

SCRIPI' - .IM

143

INDENT Control
Purpose:
The INDENT control word allows the left side
printout to be indented.

of the SCRIPT

Format:
.IN
n

n

specifies the number of spaces to be indented.
omitted, indentation reverts to the original margin.

If

Usage:
The .IN control word causes SCRIPT printout to be indented n
spaces from
the current
left margin
setting.
This
indentation remains in effect for all following lines
(including new paragraph and pages), until another .IN
control
word is
encountered.
·.IN
O· cancels
the
indentation, and printout continues at the original left
margin setting.
Notes:
a.

The .IN request acts as a BREAK.

h.
The .IN request resets the effective left margin,
causing any .OF setting to be cleared. The .OF request may
be used alone, or in conjunction with .IN. When the latter
is the case, .IN settings take precedence.
Examples:
a. .IN 5
All lines printed after this request are indented five
spaces from
the current
left margin
setting,.
This
control
word
is
indentation continues until another '. IN
encountered.
h.
.IN 0
The effect of any current indentation is canceled.
printout continues at the original left margin setting.

144

SCRIPT - .IN

and

JUSTIFY Control
Purpose:
The JUS~IFY control word cancels a previous NO JUSTIFY
control word (or part of a NO FORMAT control word), causing
right justification of output lines to resume.
Format:
,.JU
Usage:
This control word specifies that lines are to be justified
by padding with extra blanks. If concatenate mode is in
effect,
the
concatenation
process
occurs
before
justification. Since this is the normal mode of operation
for the SCRIPT command, JUSTIFY is only included to cancel a
previous NO JUSTIFY control word, or the NO JUSTIFY part of
a NO FORMAT control word.
Notes:
a.

This control acts as a BREAK.

h.
If a line
CONCATENATE mode
is.

exceeds
the current line length, and
is not in effect, the line is printed as

c. This control word is seldom
mode, therefore r, FORMAT should be
CONCATENATE mode.

used without CONCATENATE
used to enter JUSTIFY and

Example:
.JU
output from this point on in the file is padded to produce
an even right margin on the output page, as long as the
input lines do not exceed the line length.

SCRIPT - .JU

145

LINE LENGTH Control
Purpose:
The LINE LENGTH control word specifies a line length that is
to override the standard line length of 60 characters.
Format:
.LL
n

n

specifies output
characters.

line

length

not

greater

than

120

Usage:
The LINE LENGTH control sets the length for output lines
until the next LINE LENGTH control word is encountered. If
no LINE LENGTH control is included in a file, the standard
line length of 60 characters is used.
In the JUSTIFY/NO CONCATENATE mode,
lines shorter than line
length are justified to length by blank padding.
In the CONCATENA~E mode, lines longer than line length are
spilled into the following line; lines shorter get words
from previous, or following lines, to approach line length.
Note:
This control acts as a BREAK.
Example:
.LL 50
Succeeding lines are no more than 50 characters in length.

146

SCRIPT -

.LL

NO CONCATENATE Control
Purpose:
The NO CONCATENATE control stops words from
from the next line.

shifting to or

Format:
.NC
Usage:
The NO CONCATENATE control word stops words from shifting to
and
from the
next
line.
There is
a
one-to-one
correspondence between the words on the input and output
lines. This control word is useful for sections of files
containing tabular information, or other special formats.
Note:
This control acts as a BREAK.
Example:
.NC
Concatenation is completed for the preceding line or lines,
but following lines are typed without moving words to and
from lines.

SCRIPT - .NC

147

NO FORMAT Control
purpose:
The NO FORMAT control stops the CONCATENATE and JUSTIFY
mode, causing lines to be typed iust as they appear in the
file~

Format:

I .NF
Usage:
The NO FORMAT control is a shorthand way to specify the two
control words:
NO CONCATENATE and NO JUSTIFY. This stops
line justification
and concatenation until
a FORMAT,
JUSTIFY, or CONCATENATE control word is encountered. This
control is useful for sections of files containing tabular
information or other special formats.
Note:
This control acts as a

~REAK.

Example:
.NF
Justification and concatenation are
completed for the
preceding line or lines, but following lines typed exactly
as they appear in the file.

148 ,

SCRIPT - .NF

NO JUSTIFY Control
Purpose:
The NO JUSTIFY control stops padding lines to
justification of output lines.

cause right

Format:
.NJ I
Osage:
The NO JUSTIFY control word stops the padding of lines with
additional blanks. rf CONCATENATE mode is in effect, lines
are formed that approach the current line length but are not
forced to the exact length.
The resulting lines resemble
the output usually produced by a typist or an MT/ST
(Magnetic Tape/selectric Typewriter).
Note:
This control acts as a BREAK.
Example:
.NJ
Justification is completed for the preceding line or lines,
but following lines are typed without inserting additional
blanks to pad the line.

SCRIPT -

.NJ

149

OFFSET Control
Purpose:
The OFFSET control word provides a technique
all but the first line of a section.

for indenting

Format:
.OF
n

n

specifies the number of spaces to be indented after the
next line is printed. If omitted. indentation reverts to
the original margin setting.

Usage:
The .OF control word may be used to
the printout.
Its effect does not
the next line is printed. and the
effect until an indent or another
encountered.

indent the left side of
take place until after
indentation remains in
offset control word is

The .OF control may be used within a section which is also
indented with the .IN control.
Note that .IN settings take
precedence over .OF. however. and any .IN request causes a
previous offset to be cleared.
If it is desired to start a new section with the same offset
as the previous section. it is necessary to repeat the .OF n
request.
Notes:
a.

This control acts as a BREAR.

h. Two OFFSET control words without
line constitute an error condition.

an intervening

text

Examples:

a.
.OF 10
The line immediately following the .OF control word is
printed at the current left margin. All lines thereafter
(until the next indent or offset request) are indented ten
spaces from the current margin setting.

h.
.OF
The effect of any previous .OF request is canceled, and all
printout after the next line continues at the current left
margin setting.

150

SCRIPT - .. OF

PAGE Control
Purpose:
PAGE causes the output form to be advanced to the next page.
Format:
.PA
n

n

specifies the page number of the next page. If n is not.
specified, sequential page numbering is assumed.

Usage:
Whenever a PAGE control word is encountered, the rest of the
current page is skipped. The paper is advanced to the next
page. the heading and page number are typed, and output
resumes with the line following the PAGE control word. If
STOP was specified with the SCRIPT command, a carriage
return must be entered when the bottom of the page is
reached .•
Notes:
a.

This control acts as a BREAK.

b. If the heading, line length, or other format parameters
are to be different on the new page, the appropriate control
words must appear before the PAGE control word.
Examples:

a. .PA
The rest of the current page
page number are typed in the
and output resumes.

is skipped. The heading and
top margin of the next page,

b. .PA 5
Regardless of the number of the current page, the rest of
that page is skipped, the heading and page number 5 are
typed in the top margin of the next page, and output
resumes.

SCRIPT -

.PA

151

PAGE LENGTH Control
Purpose:
The PAGE LENGTH control word specifies the length of output
pages in lines. The value specified overrides the standard
page length of 66 lines.
Format:
.PL
n

n

specifies the length of output pages in lines.

Usage:
The PAGE LENGTH control word allows varying paper sizes to
be used for output. If no PAGE LENGTH control word is
included in a file, 66 is the default value. This is the
correct size of standard typewriter· paper for terminals
typing eight lines per inch. Page length may be changed
anywhere in a file, with the change effective on the first
page started after the control word is encountered.
Note:
This control word acts as a BREAK.
Example:

.PL 51
Page length is set to 51 lines. This is the
for a terminal typing six lines per inch.

152

SCRIPT - .PL

correct size

PAGE NUMBER Control
Purpose:
The PAGE NUMBER control word allows the user to control both
external and internal page numbering of the file being
printed.
Format:

I

I

I

I

I • PN 1

OFF
OFFNO
ON

OFF suppresses external page
page numbering continues.

numbering, although

internal

OFFNO suppresses both external and internal page numbering.
ON causes external page numbering to be resumed.
Usage:

.PN is used to control the page-numbering feature of the
system. If the OFF operand is specified, page numbering is
discontinued on the printout, although the page numbers
continue to be incremented internally. The OFFNO operand
discontinues page nurr'bering on the printout and stops the
internal incrementation of page numbers. When the ON operand
is specified, page numbering resumes from the last internal
page number.
Examples:

a.
.pn off
No further page numbers will appear on SCRIPT output,
although the internal page count continues to be incremented
for each page printed.
b.

.PN OFFNO
No page numbers will appear on SCRIPT output, and the
internal page count remains at its current setting without
further incrementation.

c.

.PN ON
Page numbering on SCRIPT output resuroes using the current
internal page count; this count is incremented for each page
printed.

SCRIPT -

.PN

153

READ Control
Purpose:
The READ Control word allows the user to enter
the terminal during SCRIPT output.

a line from

Format:
.RD
n

n

specifies the number of lines to be read at the terminal.
If omitted, 1 is assumed.

Usage:
When the .RD control word is encountered during SCRIPT
output to the terminal, it acts as a BREAK, spins the type
head several times, and unlocks the keyboard for a line of
input. The line entered is ignored by the program, and no
formatting occurs on it. This facility is useful for adding
headings to form letters, etc.
As many .RD·S may be used as wanted; each
separate line accepted at the terminal.

results in

a

Note:
This control word acts as a BREAK.
Example:
.RD
When this control word is encountered during SCRIPT output,
the type head rotates and the keyboard is unlocked to allow
one line to be typed at the terminal.

154

SCRIPT -

.RD

SPACE Control
Purpose:
The SPACE control word generates a specified number of blank
lines before the next typed line.
Format:
.SP
n

n

specifies the number of blank lines to be inserted in the
output. If omitted. 1 is assumed.

Usage:
The SPACE control word may be used anywhere in the file to
generate blank lines. If page end is reached during a SPACE
operation, remaining blank lines are inserted after the
heading on the following page.
If DOUBLE SPACE is in
effect. twice as
many blank lines are
generated as
specified.
Note:
This control acts as a BREAK.
Examples:
a. .SP 3
Three blank lines are inserted in the output before the next
typed line.
h. .sp
A single blank line is inserted in the output.

SCRIPI' - • SP

155

SINGLE SPACE Control
Purpose:
The SINGLE SPACE control word cancels a previous DOUBLE
SPACE control word, and causes output to be singlespaced.
Format:
.SS
Usage:
Output
following the
SINGLE SPACE
control word
is
singlespaced. Since this is the normal output format, SINGLE
SPACE is included in a file only to cancel a previous DOUBLE
SPACE control word.
Note:
This control word acts as a BREAK.
Example:

.ss
Singlespacing resumes below this point in the file.

156

SCRIPT - .SS

TAB SETTING Control
Purpose:
The TAB SETTING control word specifies the tab stops to be
assumed for the following lines when converting the TAB
character generated by the TAB key into the appropriate
number of spaces.
Format:
.TB
neil

nCl) n(2) n(3) n(4) neS)

I

specifies the column location of the (i)th tab stop:
the sequence must consist of increasing positive
values separated by one or more spaces.

Usage:
TAB characters generated by the TAB key entered into the
file during EDIT file creation are expanded by SCRIPT into
one or more blanks to simulate the effect of a logical tab
stop. The TAB SETTING control word specifies the locations
of the logical tab stops, this overrides the default tab
stops of 5, 10, 15, 20, 2S 30. 35, 40, 45, 50, 55" 60, 65,
i,

10, 75.

A TAB SETTING control word without any tab stops specified,
results in reversion to the default tab settings.
This
control word is useful for indenting the beginning of a
paragraph (remember a TAB causes a paragraph BREAK), or for
tabular information and diagrams.
Notes:
a.

This control word acts as a BREAR.

The tab settings must be monotonically increasing,. Tab
settings that are not so ordered result in unpredictable
behavior.

b.

Examples:
a. .TB 10 20 30 40
Tab stops are interpreted as columns 10, 20"

and 30.

b.
.TB
Tab stops revert to default values of 5, 10, 15, etc.

SCRIPT - .TB

157

TOP

MARGIN (

Purpose:
The TOP MAR(

be skipped
standard va]
Format:
.TM

n

specifief
output pc

Usage:
The specifj
succeeding (
page number
margin. If
file, the dE
always be gl
Note:
This control
Example:
.TM 3
Three lines
current pagE
second line

.trn 10
.ce
SCRIPT Example
.sp 2
.ds
This example will demonstrate some of the capabilitie
of the SCRIPT command. This file was created by
issuing:
.br
EDIT EXAMPLE SCRIPT
.br
Since the file did not previously exist, the terminal
was placed directly into the input environment. This
paragraph was double-spaced with the .OS control.
.5S

.sp
No BREAK was needed here, since the .SS (SINGLESPACE) control acts as a break. Although this is
in FORMAT mode, tabular information can be included:
.sp
SPACE
.sp
.SP
.ss
SINGLE SPACE
.S5
.ds
DOUBLE SPACE
,.DS
.sp
The leading blanks caused each line to be handled
separately.
.sp
Use of the LINE LENGTH control allows space
to be left within a page for figures or drawings.
Naturally, i t may take some experimentation for
finding how n;any paragraphs will fit next to a
figure •
• 11 30
.sp
The new line length must take affect
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 FORMAT mode •
• 11 60
.nf
By switching out of FORMAT mode
CAPTION
and doing some justification
by eye" fancier effects can be obtained.
This also
takes some practice and experimentation •

• fi
.cp 5
Figure 11.

158

160

Contents of a SCRIPT file

SCRIPT

PARAGRAPHS:

.br
If no space follows a paragraph heading., and if the
paragraphs are not indented, a BREAK is necessary in
FORMAT mode, to keep 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
included in the text. A .CE in front of each line of
the figure is necessary" and note that leading or trailing
blanks count for figuring the length to be centered:
.sp
.ce
.ce
FORMAT

EXAMPLE

n

.ce
E

.ce
.ce
Figure EX.A
.sp
To offset the caption it would be necessary to leave
trailing or leading blanks, which are counted as part
of its length:
.sp
.ce
.ce
Figure EX.A
.sp
The above caption has 14 trailing blanks, which move
it to the left. Leading blanks would move it to the right.

Figure 11 (cont.) Contents of a SCRIPT file ...

SCRIPT

161

SCRIPT Example
This example

will demonstrate some

the SCRIPT command.

of the

capabilities of

This file was created by issuing:

EDIT EXAMPLE SCRIPT
Since the

file did not

placed directly into the

previously exist, the
input environment.

terminal was

This paragraph

was'double-spaced with the .DS control.
No BREAK was needed here, since the .S5 (SINGLE- SPACE)
control acts as a break. Although this is in FORMAT mode,
tabular information can be included:

SPACE
SINGLE SPACE
DOUBLE SPACE
The leading
separately.

blanks

.sp
.ss
.ds

.SP
.SS
.DS
caused

each

line

to

be

handled

Use of the LINE LENGTH control allows space to be left
within a page for figures or drawings. Naturally, it may
take some experimentation for finding how many paragraphs
will fit next to a figure.
The new line length must take
affect 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
FORMAT mode.
By switching out of FORMAT mode
and doing some justification
by eye, fancier effects can be obtained.
takes some practice and experimentation.

Figure 12.

162

SCRIPT output

SCRIPT

CAPTION
This also

PARAGRAPHS:
If no space follows a paragraph heading, and if the
paragraphs are not indented. a BREAK is necessary in FORMAT
mode, to keep 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
included in the text. A .CE in front of each line of the
figure is necessary~ and note that leading or trailing
blanks count for figuring the length to be centered:
FORMAT

EXAMPLE

n

E

Figure EX.A
To offset the caption it would be necessary to leave
trailing or leading blanks, which are counted as part Of its
length:
Figure EX.A
The above caption has 14 trailing blanks, which move it to
the left. Leading blanks would move i t to the right.
Figure 12 (cont.) SCRIPT output

SCRIPT

163

SPLIT
Purpose:
The SPLIT command copies a specified portion of a given file
and appends it to a second file or creates a new file.
Format:
labell label2
n1
<
n2 >
eof

I
I
I SPLIT I fnamel ftypel fname2 ftype2
1
I
fnamel ftype1

specifies the
copied

file from

fname2 ftype2 specifies the name of
is added

which a

,,
1

portion is

the file to which file1

label1

an eight-byte alphameric label with the first
character nonnumeric, specifying the first
record to be copied

label2

an eight-byte alphameric label with the first
character nonnumeric. specifying the item
after the last item to be copied

n1

a decimal number specifying the item number of
the first item to be copied

n2

a decimal number specifying
items to be copied

the number

of

Usage:
The SPLIT command enables the user to copy a portion of
filel and to append it to file2. Filel and file2 cannot be
the same file. If file2 does not exist. it is created. The
files may have fixed-length
or variable-length length
records. If file2 exists. and is a fixed-length record file.
file1 must also be a fixed-length record file.
Copying begins at either the first record containing the
alphameric string (labell), in the first eight bytes of a
record (label field) ,. or at the specified item number if the
parameter consists o~ all numeric characters.

If the last parameter is not provided, copying continues to
the end of file. If the last parameter is specified as an
alphameric label,.
copying, once
initiated, terminates
immediately before the first item having the alphameric
string, labe12, in the label field of a record. The extent
of copying may alternatively be specified by an integer
count of the number of items to be copied.
164

SPLIT

No copying is done if (1) labels are used for both starting
and stopping the copying and these two labels are identical,
(2) the initial label or item number cannot be found, or
(3) the number of items is specified as zero.
SPLIT searches all disks for the file.
The
placed on the same disk as the original file.

new file

is

Responses:
NUMBER OF PARAMETERS
The specified number of parameters given is not five or six.

~RONG

INVALID LIMIT
One of the limit
character numeric,
nonnumeric,.

fields is
and one

EOF REACHED
The end of filel has been
being initiated.

specified with
other
of the

reached with or

the first
characters

without copying

FILE NOT CHANGED
The command has been completed without any writing of files.
FILE MODIFIED
The command has been successfully
one item has been copied.

completed, and

at least

Any error encountered in the reading of filel terminates the
command after printing one of the following responses:
TYPE NOT FOUND
DISK ERROR
ILLEGAL MODE
NONSTANDARD FILE
OPEN FOR WRITING
OPEN FILE LIMIT
Any error encountered in the writing of file2 terminates the
command after printing one of the following responses:
BAD OUTPUT TYPE
ERROR ON DISK
OPEN FOR READ
TOO MANY FILES
DISK FULL
READ ONLY
FILE TYPES INCOMPATIBLE.••• FILES NOT CHANGED
Examples:
a. SPLIT FILE DATA Fl DATA q5 12
The twelve items beginning with the 45th item are extracted
from the FILE DATA file. If the Fl DATA file eXists, they
are appended to it..
If the Fl DATA file does not exist, i t
is created and they become its contents.

SPLIT

165

b~
SPLIT ABLE SYSIN ABLEl SYSIN BEG 20
The 20 items beginning with the item which has a label field
containing BEG are extracted from the file ABLE SYSIN and
appended to the file ABLEl SYSIN if it exists, or become the
contents of the file ABLE1 SYSIN if it doesn't exist and
must be created.

c. SPLIT PROG SYSIN PROGEND SYSIN END
If PROGEND SYSIN does not exist, items beginning with the
item with END in the label until the end of file PROG SYSIN
are used to create a new file called PROGEND SYSIN: if
PROGEND SYSIN does exist. those items are appended to it.
Error Messages:
The SPLIT command
prints a response
error. A11 returns
equal 0, indicating

166

diagnoses all errors which occur and
message indicating the nature of the
from SPLIT are with general register 15
no error.

SPLIT

STATE

Purpose:
The STATE command tests whether a file exists.
Format:
STATE I filename

filetype

I

Usage:
When STATE is issued for a file which exists, the command
returns with a code of zero. If the file does not exist, a
nonzero error code is returned.
Error Codes:
E(OOOOl)
File specified does not exist.
E(00004)
First character of filemode illegal.

STATE

167

UPDATE

Purpose:
The UPDATE command makes changes in a snecified
according to control cards in a second file.

file

Format:
---~------------------~-------------------------------.-------~----~

,UPDATEI filenamel  «

options »1

filenamel

is the name of the file to be changed.

filetypel

is the type of the file
omitted, SYSIN is assumed.

filename2

is the filename of the file containing the UPDATE
control cards. If omitted, filename1 is assumed.

filetype2

is the filetype of the file containing the UPDATE
control cards. If omitted, UPDATE is assumed.

to

be changed.

If

Options:
P

SEQ8

INC

specifies that the file incorporating the changes
is to replace the original file. If omitted, the
old file is retained unchanged, and the new file
receives a filename consisting of a period (.l,
followed by the first seven characters of the
original filename.
specifies that sequencing is to be done
eight characters in columns 73 to 80.

on all

specifies that the sequence numbers in columns 73
to 80 of the UPDATE deck are to be placed in the
new SYSIN deck.

Control Cards:
Changes are made in the original file according to the
UPDATE control cards in the UPDATE file.
The format of
these cards is shown below:

1./ S

segnol

increment

label I

S

specifies that the new file is to be sequenced in
columns 76-80. If this card is included in the
UPDATE file" it must be the first card.

segnol

specifies the starting sequence number.

168

UPDATE

increment

specifies the increment to be
sequence number for each item.

added

label

is a three-character label
columns 13-15.

be

I ./ D segno1

cards are to be

placed

in

deleted from the

is the (original) sequence number
card to be deleted.

segno1

the

I

specifies that
original file,.

D

of the

first

is the sequence number of the last card to be
deleted. If omitted, only one card is deleted.

segno2

I ./

segno2

to

to

I

segno1 I

I

specifies that cards are to be inserted in the
original file.
The inserted cards must follow
this./ I card immediately in the UPDATE file.
All cards, until the next control card, are
inserted.

segnol

specifies the sequence number of the
which the cards are to be inserted.

I ./

R

item after

segnol segno2

----------~-------~------

R

specifies that cards are to be inserted in the
original file in place of cards now there.

segnol

specifies the first card to be replaced.

segno2

specifies the last card to be replaced. The cards
to be inserted in place of those deleted
(not
necessarily the same number) must follow the ./ R
card immediately in the UPDATE file.

Usage:
UPDATE modifies the specified file according to control
cards in a second file. The filetype SYSIN is assumed for
the file to be modified, if no other is specified,.
The
control-card file normally has the same name as the file to
be modified, and has the filetype UPDATE. It is referred to
as the UPDATE file, with the understanding that both a
different filename and filetype may be specified with the
UPDATE command. Note that if different identifiers are
UPDATE

169

specified, the filetype of the file to be modified must also
be included. The options must always be the last arguments
specified if they are to be included.
UPDATE generates two files during execution: "filename
UPDLOG PS" and "filename INTER PS" where filename is that of
the original file in both cases. The UPDLOG file contains a
record of the control cards in the UPDATE file, items added
to and deleted from the original file, and error messages.
A new UPDLOG file is generated on each execution, replacing
any existing UPDLOG file with the same filename.
The INTER file receives the records of the original file as
changes are made. At the end of execution, the identifiers
of the INTER file are changed to one of two formats. If (P)
is specified, the original file is erased, and the INTER
file receives its filename and filetype. If (P) is not
specified, the original file remains unchanged on the
permanent disk. new file receives the same filetype and
filemode, and a filename composed of a period (.) plus the
first seven characters of the original filename.
The control cards of the UPDATE file always refer to the
items of the original file by the sequence numbers existing
before any changes in columns 16-80.
If no sequence numbers
exist, issue a pr~liminary UPDATE command with only the ./ S
control card in the UPDATE file.
If the SEQ8 option is
specified, the sequence numbers referred to are in columns
13 to 80. Sequence numbers will be assigned.
The control
cards must always be identified by a
./ in columns 1 and 2,
but any number of blanks may separate the other fields.
Sequence numbers may
be expressed with up to five digits,
unless SEQ8 is specified. Leading zeros are not necessary.
Any sequence numbers in cards to be inserted in the file are
ignored unless INC is specified" in which case this number
is placed in the new SYSIN. If the . / S control card is
omitted from the UPDATE file, and INC is not specified,
asterisks are placed in columns 13-80 of all cards in the
new file which were added or replaced, to indicate where
changes were wade.
Changes are made in order in a single pass through the file.
If control cards specify changes that are not in order., an
error is recorded, and no changes are made.
Responses:
INTERMEDIATE FILE EXISTS.
The file "filename INTER PS" already exists for the filename
specified. ERASE or ALTER this file, and issue the UPDATE
command again.
FATAL ERROR 1
A control card was detected in the UPDATE file whose second
field was not the character R, II' D, or S.

170

UPDATE

FATAL ERROR 2
The file to be changed is not on-the permanent disk.
READ ERROR or WRITE ERROR
An error occurrerl while reading
disk.

or writing to the permanent

PARAMETER ERROR
No parameters were entered with the command.

filename filetype NOT FOUND
The file identified in the response was
user's file directory.

not found

in the

ERRORS ENCOUNTERED. SYSIN REMAINS UNCHANGED.
all of the above error
This response is issued for
conditions. It indicates control is about to return to the
CMS command environment, and that no changes have been made
to the files.

Example:
UPDATE RET
Assume that the file RET SYSIN P5 contains these items:
CSECT
BALR
USING
SR
END

RET

RETOOO10
RETOOO20
RETOOO30
RETOOO40
RETOOO50

12,0
*,12
15(,15

Assume that the file RET UPDATE P5 contains
./
./

S
I

100
10

./

R

40

25

RTN

ENTRY RETCODE
L

RE'l'CODE

BR
DS

15,RETCODE
14
F

As the command is executed, the file RET INTER P5 is
created. As items are placed into it, RTN is placed in
columns 73-75, and sequence numbers, beginning with 00100
and incrementing by 25, are placed in columns 16-80.. On
completion, the file becomes .RET SYSIN P5, and contains

RET

CSECT
ENTRY RETCODE

BALR 12,0
USING *1,12
L
15,RETCODE
BR
14
RE'l'CODE DS·
F
END

UPDATE

RTN00100
RTN00125
RTN00150
RTN00175
RTN00200
RTN00225
RTN00250
RTN00275

171

RET UPDLOG P5 is also created, containing the control cards.
and all items added or deleted.
Error Messages:
E(00002)
FATAL ERROR 3
error occurred
while
attempting
to change
An
identification of the INTER file. Enter the command

ALTER fn1 INTER

*

fn1 filetype

the

*

where fn1 is the filename of the file changed, and filetype
is the desired filetype. If another error occurs" reenter
the UPDATE command.

172

UPDATE

EXECUTION CONTROL
Several commands are available to the user for execution
control (that is
the loading and running of programs).
Files (or programs) which are to be loaded and run under CMS
must reside on disk and must be either in relocatable object
code form or in core-image form. A program in relocatable
object code form is one whose address references can be
modified to compensate for the relocation occurring when the
program is loaded into core. A program in core-image form is
one which represents a copy of the contents of core which
would be executable. All of its address references have
been resolved and it can no longer be relocated.
j,

output from the assembler and all compilers supported under
CMS is relocatable object code. Unless an option to the
contrary is specified by the user this output is created as
a file on the user's permanent disk and assigned a filetype
of TEXT. All files, whose filetype is TEXT, are assumed to
consist of relocatable object
code and are processed
accordingly. To load such files into core, either the LOAD,
USE., or REUSE commands may be used. The LOAD command reads
the specified file(s) from disk and loads them into core,
relocating the programs and establishing the proper linkages
between program segments. Several options may be specified
in the LOAD command r, which allow the user to specify text
libraries to be searched for missing subroutines, to request
that execution of the loaded program(s) begin, etc. USE
and/or REUSE should be issued only after a LOAD command has
been issued. The purpose of the USE command is to load the
specified TEXT file(s) into core, and to establish linkages
between these programs and previously loaded programs. The
REUSE command performs the same function as the USE command,
but has the additional effect of changing the default entry
point of these programs to that of the first filename
specified in the REUSE command.
i

,

A core-image copy of any information currently residing in
core may be created by issuing the GENMOD command,. This
command creates a file on the user's permanent disk that is
a copy of the contents of core between the specified
locations, and assigns a filetype of MODULE to this file.
All files whose filetype is MODULE are assumed to be in
core-image form, and are processed accordingly. To load
such files into core, the LOADMOD command is used. Since
address references do not have to be resolved, the LOADMOD
process is faster than the LOAD process for a given program.
After files have been loaded into core by the LOAD,. USE,
REUSE, or LOADMOD commands, execution may be begun by
issuing the START command. Execution may also be initiated
by specifying the XEQ option with LOAD.
The $ command is used to load and start a specified file,
depending on its filetype, as follows:
(1) if a filetype of
EXEC is found, the file is assumed to consist of one or more
Execution Control

113

CMS commands, and the EXEC command is called to execute
these commands;
(2) if a filetype of MODULE is found, the
LOADMOD command is called to load the file into corel' and
then the START command is called to begin execution; or (3)
if a TEXT filetype is found, the file is loaded into core by
a LOAD command, and START is called to begin execution.
The function of the GLOBAL command is to specify two types
of libraries: libraries containing TEXT files which are to
be searched by the LOAD, USE., or REUSE commands for missing
subroutines and undefined names; and libraries containing
macro definitions, which are to be searched by the assembler
for resolving undefined macros. If the GLOBAL command is
used" it should be issued before the LOAD, USE, REUSE, or
ASSEMBLE commands to which it refers.

114

Execution Control

EXEC
Purpose:
EXEC executes one or more CMS commands contained in a
specified file. allowing a sequence of commands to be
executed by issuing a single command.
Format:
EXEC

filename 1

filename specifies the filename of a file containing one or
more CMS command to be executed. The filetype must
be EXEC.
argI,•• '. argN are the arguments
to replace the
variables in the file wfilename EXEC ft •

numeric

Usage:
EXEC executes the sequence of commands that are specified in
the file ftfilename EXEC w• This file must be in card-image
form, and must consist of one CMS command per card image in
the same format as the command is entered at the terminal.
The filetype for the specified file must be EXEC.
EXEC
files can be created by the EDIT or LISTF commands, or by a
user·s program.
Each CMS command in the EXEC file can have from one to
thirty numeric variables. A numeric variable is made up of
an ampersand (&) followed by an integer ranging from one to
thirty.
(that is, &1&2 ••• &30).
Before the command is
executed"
each variable is temporarily replaced by an
argument specified when the EXEC comroand was issued. For
example, each time an &1 appears as a variable in an EXEC
line. t:le first argument specified with the EXEC command
temporarily replaces the &1, the second argument specified
with the EXEC command replaces &2. and so on, to argument N
of the EXEC command.
If the double quotation mark (ft) is used in place of an
argument,. the corresponding variable (&N) is ignored in all
the commands
which reference that variable.
If the
specified EXEC file contains more variables than arguments
given with the EXEC command, the higher numbered variables
are assumed to be missing, and are ignored when the commands
are executed.
Arguments can be concatenated to the right side of any word
in an EXEC line.
For example, the EXEC line LISTF ABC&1
FORTRAN&2 would result in LISTF ABCXYZ FORTRAN, if arg1 is
XYZ and arg2 is unspecified. Use of the double quote (W)
for arg1 would cause the variable to be ignored leaving
EXEC

175

LISTF ABC FORTRAN. If the single quotation mark (t) is used
in place of an argument, the entire concatenated form is
deleted. For example, in the above EXEC line if arg1 is
specified with a double quote ("), and arg2 is specified
with a single quote (.), the line would be just LISTF ABC.
The EXEC command is completely recursive (that is, an EXEC
file can contain other EXEC commands in its sequence of
commands). The recursiveness is limited by core size--each
level of recursion requiring about 1200 bytes of free
storage for data. This limits the depth of recursion to
approximately 16.
Notes:
a. Errors resulting from issued commands are not fatal and
do not cause the sequence of commands to be terminated.
This behavior may be modified by the EXEC control word
&ERROR (see "Special Features of EXEC" below).
b.

Each EXEC file may contain a maximum of 4095 EXEC lines.

c.
This version
compatible with EXEC
version of the EXEC
only one command is
may be removed in a
nucleus.

of the EXEC command
is completely
files created for use with the previous
command, except that in this version
allowed per line.
This compatibility
later version to save space in the CMS

d. If the EXEC command is issued from an EXEC file, EXEC
must be ~pecified explicitly, as the search for commands
does not include the EXEC filetype.
Response:
As each CMS command in the EXEC file is processed,. it is
typed at the terminal along with the time"
unless the
&TYPEOUT OFF control word has been specified (see "Special
Features of EXEC" below).
Examples:
a. In Figure 13, the command EXEC FORTCLG LLHS is issued.
LLHS is a file whose filetype is FORTRAN, and LLHS replaces
the &1 in all CMS commands in the EXEC file·. The file LLHS
FORTRAN is compiled, and the file LLHS TEXT is loaded and
executed. Note that each CMS command is typed before it is
executed.

116

EXEC

printf fortclg exec
FORTRAN &1 &2
LOAD &1 &2 (XEQ)

Ri T=O.45/1.23 01.24.45
fortclg llhs
01.29.50 FORTRAN LLHS
01.29.55 LOAD LLHS (XEQ)
EXECUTION BEGINS.
APRIL 1968 DATA 5.320
Ri T=O.55/1.44 01.30.45

5.600

1.920

Figure 13.
Example of an EXEC
execute a FORTRAN program

file to compile,

load, and

b. In Figure 14, the FORT EXEC is created by EDIT. The
only command placj~d in the file is FORTRAN &1 (PRINT). The
file CMS EXEC was created earlier with the LISTF command
(see LISTF), and contains the sequence of FORTRAN files to
be compiled.
The file CMS EXEC is typed by issuing the
PRINTF command. The EXEC command is issued specifying the
filename CMS and the two arguments EXEC and FORT. Each file
identifier in eMS
EXEC is preceded by
two symbolic
arguments,
&1 and &2. The ~1 is replaced by the first
argument specified with the EXEC command. which is EXEC" and
the &2 is replaced by the second argument specified, which
is FORT. The sequence of CMS commands generated in core by
EXEC from the file CMS EXEC are then executed, the first of
which is
EXEC

FORT

w

FORTRAN

P5

001.

This command executes the sequence of commands in the file
FORT EXEC, and temporarily replaces the numeric variable &1
from FORT EXEC with the argument W. The arguments FORTRAN,
PS, and 001 are ignored because there are no variables &2,
&3, and &4 for them to replace.
As soon as the sequence of
commands in FORT EXEC are completed. the next command in the
file CMS EXEC is executed.
This sequence continues until
all commands are executed in the CMS EXEC file.

EXEC

177

edit fort exec
INPUT:
fortran &1 (print)

EDIT:
file
R; T=0.55/1.43 01.30.50
listf * fortran (exec)
R; T=0.40/0.50 01.31.00
printf cms exec
&1
&1
&1
&1

&2
&2
&2
&2

W
SUB2
A
SUBB

FORTRAN
FORTRAN
FORTRAN
FORTRAN

P5
P5
P5

001
001
001
001

P5

R; T=O.55/3.21 01.32.15
ems exec fort
01.32.58 EXEC
FORT
W
01.33.00 FORTRAN
W
01.33.10 EXEC
FORT
SUB2
01.33.12 FORTRAN
SUB2
01.33.15 EXEC
FORT
A
01.33.17 FORTRAN
A
01.33.19 EXEC
SUBB
FORT
01.33.23 FORTRAN
SUBB
Ri T=1.50/1.80 01.33.27

P5

001

P5

001

FORTRAN

P5

001

(PRINT)
FORTRAN
(PRINT)

P5

001

FORTRAN
(PRINT)
FORTRAN
(PRINT)

Figure 14. The file FORT EXEC is created, the file c~s E¥~C
is typed out_ and then an implied EXEC is issued to nest EXECs

178

EXEC

Error Messages:
E(OOOOl) FILE DOES NOT EXIST
The EXEC file does not exist.
The EXEC command has
terminated. Check to see if the filename specified has a
filetype of EXEC.
E(00003) FILE HAS WRONG RECORD SIZE
The specified EXEC file does not
records. The command is terminated.

contain

80-character

E(00006) WAITRD OR RDBUF ERR
This error would result if an EXEC file was erased after the
EXEC command had been successfully begun. For Example, with
the procedure shown below the file ABCD EXEC would be
erased, and the attempt to read the EXEC line containing
PRINTF would result in the error.
The EXEC command is
terminated.
printf abcd exec
ERASE ABCD EXEC
PRINTF XYZ&2
R=0.02/0.13 03.45.14
exec abcd
ERASE ABCD EXEC
~AITRD OR RDBUF ERR
E(00006) T=O.05/0 .• 08 03.46.10

I I I E ( xxxxx ) I"
The error code xxxxx was generated by the CMS command issued
from the EXEC file. If E(-0003) occurs, the issued command
was invalid.
SPECIAL FEATURES OF EXEC
A line of an EXEC file is either a CMS command or an EXEC
control line. EXEC control lines control the sequence of
commands to be executed, specify what is to be typed on the
console during the execution of the EXEC command, or provide
input to other command programs, or to the EXEC command
itself.
LABELS
EXEC lines, containing either a CMS command or an EXEC
control, may be identified with a label,. All EXEC labels
have a dash as the first character. If the first word of an
EXEC line begins with a dash (-) that word is assumed to be
a label.. Labels are used to control the sequence of EXEC
lines executed (see "EXEC Control Words", &GOTO and &LOOP).
EXEC WORDS (&WORDS)
EXEC lines may

contain words which begin
EXEC

with an ampersand
119

(&). A word beginning with an ampersand may be a numeric
variable, a keyword (that is, a symbolic variable), or a
control word. A numeric variable consists of an ampersand
followed by an integer or an asterisk C*).
A keyword word
consists of an ampersand followed by a string of not more
than seven characters, at least one of which is not an
integer. Control words have the same form as keywords and
are defined under wEXEC Control Words w•
Numeric variables
and keywords are substituted before the EXEC line is
interpreted.
Numeric Variab1es
Numeric variables are substituted for any arguments which
are to be specified when the EXEC command is issued,. The
numeric variable &0 is replaced by the filename of the
current EXEC file. The numeric variable &n is ignored when
n is negative or greater thatn 30. or when n is greater than
the number of arguments supplied when the EXEC command. is
issued..
The variable &* is
interpreted to mean all
arguments specified~ When i t is included in a CMS command,
the command is executed once for each argument specified.
For example. the command line ERASE &* * would cause the
erasing of all files whose filename is the same as one of
the specified arguments.
The variable &* may also be used
in an &IF or &LooP condition (see WEXEC Control Words W).
Keyword

Var~ables

The value substituted for a keyword may be one of two types:
specified in an EXEC line by the user;, or implied if the
keyword is a special keyword,.
EXEC-Set Keywords

A number of keywords have been defined to have special
meaning and have their values set in a special way,. These
words and their values are described below.•
&LINENUM has the value of the
one.

current EXEC line number plus

&INDEX1 ••• &INDEX9 are used as indices and initially have the
value +1. Indices 1-9 may be reset or incremented
by an EXEC line. These indices may be set to an
integer value in the same way as the value of any
keyword is set. An index may be incremented or
decremented by
specifying the index
and the
increment in an EXEC line. For example:
&INDEX5 = 30915 sets &INDEX5 to 30915.
&INDEX1 -50 adds -50 to the value of &INDEX1 .•
Indices are
recursion.

180

local

to

EXEC

the

current

level

of

&INDEXO has as its value the return code number in register
15 from the previous CMS command,.
&INDEX has as its value the number of
the EXEC command was issued,.

arguments given when

&GLOBALO ••• &GLOBAL9 are used
for communication between
levels
of EXEC
recursion and
are set
and
incremented in the same way as &INDEX1 ••• &rNDEX9.
&GLOBAL has as its value the level of recursion.
user-Specified Keywords
The value of a
the form

keyword may be specified by an

EXEC line of

&KEYWORD = VALUE
&ABLE = 12345
which defines the keyword &KEYWORD to have
and &ABLE to have the value 12345,.

the value VALUE

Keywords can be redefined as often as desired.
EXEC Control Words
The EXEC contro1 words described below can be used to
provide a versatile and flexible facility for controlling
the execution of commands and for defining a user-oriented
command environment. EXEC control words appear in EXEC
lines. which can be interspersed with CMS commands.

I &ERROR t
I
I

action
I
&CON-rINUE ,

where action is any EXEC line without a statement label.
Action is executed immediately upon an error return from a
subsequent C~S command.
If action is not given, &CONTINUE
(see below) is asswned. An error in execution of action,. if
action is a CMS command. results in an exit from this level
of EXEC with error code of 11.

EXEC

181

I &IF I

condition

action

where -condition consists of the three parameters shown below

&*

EO

S$
anything

NE

GT
LT
GE
LE

S*
&$
anything

and where action is any EXEC line without a label.
If the
condition is satisfied!, the
action is executed..
The
comparison specified by the second argument of condition is
made between
the first and
third arguments.
&$ is
interpreted as wany of the symbolic arguments·.
Thus, the
EXEC line
SIF

&$ EO XYZ &PRINT HI

would cause -HI- to be typed if at least one of the
arguments specified when the EXEC command was issued was
XYZ. Similarly, &* is interpreted as Wall of the supplied
arguments w • (See below for a description of &PRINT,.)
A numerical comparison is made only if both the operands are
numeric. For example. the EXEC line
SIF 017 EQ 17 'PRINT HI
would cause the typing of wHIw. Otherwise,
in a condition is a logical comparison.
An &IF can have another &IF
nested to level 3.

as its

the comparison

action; these

may be

I &EXIT I n '
&EXIT causes an EXI~ to the next lower level of recursion
with an error code of n.. If n is not given, a normal exit
with a code of 0 results. If n is negative and if EXEC was
called from the CMS command level, the absolute value of n
is returned.
If this EXEC command was called from a
previous EXEC command, a negative value of n is returned as
the error code in register 15.

182

EXEC

'QUIT I n
I ON

I OFF

I
I
I

'QUIT n is similar to &EXIT n. except that &QUIT n returns
to level O. the CMS command level. regardless of the level
of recursion of EXEC commands.
&QUIT ON sets the return level for a subsequent &QUIT
control to a level of recursion one higher. Thus" if &QUIT
ON is issued twice and if the current level of recursion is
5, an &QUIT n would cause a return to level 2 with an error
code of n.
'QUIT OFF resets
command level.

I &SKIP ~
I
I

:he

return level

to

level

0, the

CMS

1
n

&SKIP causes n lines in the file to be skipped. If nO. the next EXEC line to be executed
will be n+l lines after the current line.

I
I
I &GOTO f
I
I

TOP I
label I
EXIT I

&GOTO controls the point from which execution will continue.
&GOTOTOP causes sequential execution of EXEC lines to be
continued at the beginning of the EXEC file.
&GOTO EXIT is identical to &EXI-r
the current leve.l of EXEC.

0 and causes a return from

&GOTO label searches the EXEC file, starting from the
present EXEC line to the end of the file" then going to the
beginning of the file. and finally going back to the present
line lo~ation, looking for the first EXEC line beginning
with the specified label. (See label description under
·Special Features of EXEC·.)

I &LooP I
I
,
&LOOP causes

label
nl

condition
n2

looping either

to and

EXEC

,,
including the

labeled
183

line,. or through the number
beginning with the next line.

of

lines specified

by

nl.

Looping continues either until the condition is satisfied
or for n2 times..
Condition is specified the same way as
wi th the &IF control word and is tested before looping .•
Loops may be nested to a depth of 4. The
must be less than 4096.

numbers nl and n2

I &COm'INUE I
&CONTINUE as an EXEC line is ignored. It may be useful with
'GOTO or &LOOP and is the default action for &ERROR..
&TYPEOUT

I
I
I
I
I

ALL
ON

PACK
NOPACl{

TIME
NOTlME

ERROR
OFF
NOEXEC

I
I
I
I

1

where:
ALL types all eMS command lines and EXEC control lines.
ON types all CMS command lines
EXEC control lines.

but suppresses the typing of

ERROR types only CMS command lines which result in an error;
EXEC control lines are not typed .•
OFF suppresses the typing of all EXEC lines.
NOEXEC is the same as OFF and is included for compatibility
with EXEC files created with the previous version of
the EXEC command.
TIME causes time of
typed.

day to precede

NOTIME suppresses the typing of the
CMS command line.

each CMS

command line

time of day

with each

PACK removes excess blanks from typed lines,.
NOPACK suppresses
lines.

184

the removal of

EXEC

excess blanks

from typed

TYPE
ON
OFF

&TIME

&TIME TYPE types the time since the previously typed time.
&TIME ON
command.

types the

time

1

n

after typing

the typing of the time

&TIME OFF suppresses
command.

I 'SPACE I
I
I

message

each

CMS

after each CMS

I
t

&SPACE types n carriage returns at the console.

I &PRINT I line I
&PRINT prints line on the typewriter console. All keywords,
symbolic arguments, etc., are substituted into the line,•. Any
word or words that exceed eight (8) characters are left
justified and truncated on the right.

I &COMMENT , line I
&COMMENT is used to annotate the EXEC file.
during execution.

It is ignored

I &ARGS I
&ARGS is used to redefine the numeric variables &1 ..
&n with
the values specified by argl.,•• argN.
&INDEX is redefined
with. the value of the current number of arguments.
I• •

&READ

&READ causes

I 1 I
I n I
I argsl
a read to the typewriter console.

If n is specified, the next n EXEC lines are read from the
console and executed immediately. These lines must be
entered as commandsas if they were included in the EXEC
EXEC

185

file,. since they are executed in the same way.
Reading
stops and the next EXEC line is obtained from the EXEC file
either when n lines have been read, or when &GOTO. &SKIP.
&LOOP. &EXIT, or &QUIT are typed. Reading may be reset by
entering &READ.
If ARGS is specified, one line is read from the console.
This line will be scanned and used to redefine the numeric
variables. iINDEX is redefined to the number of arguments
read.
This is the only way to read without entering a
command.
Only the first 72 characters on a line are read.
, iSTACR I

I

I

.Ell:Q

line

,
I

LIFO

&STACK stacks line in the input buffer" substituting for
keywords and variables. Subsequent &READ obtains lines which
were stacked in this way.
&STACK can be used to specify input or EDIT requests to
EDIT, or DEBUG requests to the Debug environment when it is
entered on purpose (that is. by a breakpoint or the DEBUG
command). iSTACK with a blank line is executed as a null
line.
are
stacked
in
FIFO
specifies
that
the
lines
First-In-First-Out order. LIFO specifies that the lines are
stacked in a Last-In-First-Out order.

I

&BEGSTACI<

I

I
I

~IFO

LIFO

1
I

line 1
line 2

. ... .

line N
&END STACK
&BEGSTACK stacks line 1 through line N, literally without
truncation and without substituting for numeric variables or
keywords,.
This sequence may also be used to specify input or EDIT
requests to the EXEC command" where a line of "#file" causes
the Edit environment of EDIT to be entered from the Input
environment and writes the file on disk. THis sequence may
also be used to specify DEBUG requests to the DEBUG
environment when that environment has been entered on
purpose (that is, via a breakpoint or the DEBUG command).

186

EXEC

FIFO and LIFO are as explained under &STACK.

I &SET I action I
&SET has been included for compatibility with old EXEC files
that used the control words ERR and TYPEOUT or actions .•
&SET may later be removed as an EXEC control word.
Notes on EXEC Control Words
a. All numeric variables,. keywords. EXEC control settings.
and limitations (for example. maximum depth of loop nesting)
are local to the current level of EXEC, unless otherwise
noted.
b. Any EXEC control word may be abbreviated by a sufficient
number of characters to distinguish it from other control
words. The following precedence order is observed: ERROR;.
EXIT. SKIP,. SPACE;, STACK I' SET, TYPEOUT, TIME, other control
words, oth~r keywords. Keywords cannot be abbreviated .•
c. An error from a eMS command
the level of EXEC.

does not cause an exit from

d. When EXEC is entered~ the assumed state of the controls
are &ERROR, &CONTINUE,. &TIME OFF, and &TYPEOUT ON TIME PACK.
e. If an EXEC line specifies an invalid CMS command,; an
error code of E(-0003) is returned. The EXEC command is not
terminated.
Errors from EXEC Control Words
E(OOOOl)

File does not exist.•

E(00002)

&SKIP or &GOTO error.

E(00003)

File has wrong record size.

E(OOOOIl)

Keyword or argument error.

E(00005)

Exceeded maximum depth of loop nesting.

E(00006)

Wai trd or Rdbuf error .•

E(OOOOS)

Illegal form of condition.

E(OOOlO)

Error in &GLOBAL or &INDEX usage.

E(00011)

Error occurred
action ..

in attempt

EXEC

to execute

&ERROR's

187

PROFILE EXEC
The PROFILE EXEC feature allows a user to set up his own
operating environment within CMS.. When eMS is IPL' ed and
the first CMS command is entered,. an automatic search is
made for a file with a filename and filetype of PROFILE
EXEC. If such a file exists, i t is automatically executed
before the first CMS command entered is executed--thereby
saving the user from entering any repetitious commands he
may be entering each time he uses CMS.
PROFILE EXEC is a standard EXEC file as described in the
preceding sections and,. as such.. may contain any valid
EXEC-type statements. Its only difference is in its name,
which has a special meaning that causes this automatic
execution.
Examples
a.
A PL/I
user would have to use the GLOBAL T PLILIB
statement each time he was on the system so that the PL/I
library would be used rather than the FORTRAN libraries.
This PROFILE might be created as follows:
edit profile exec
NEW FILE.

INPUT:
global t plilib
EDIT:
file
b.
A user who wanted to redefine his LINEND and BLIP
characters' each time might set up the following PROFILE
EXEC:
edit profile exec
NEW FILE.
INPUT:
&typeout off
linend !
blip *
EDIT:file
Note. This automatic execution may be avoided by issuing
LOGIN NOPROFas the very first CMS command (see LOGIN under
wControl Commands·).

188

EXEC

GENMOD
Purpose:
The GENMOD command
core-image files.

is used

to

generate

non-relocatable

Format:
GENMOD

I entry1



(optionl .••• optionN)

1

entry1 specifies an entry point or a control section name
indicating the starting core location from which the
core-image copy is to be generated. It is also the
filename assigned to the newly generated file.
entry2 specifies an entry point or a control section name
indicating the ending core location from which the
core-image copy is to be generated.
Options:
NOMAP specifies that a load map
the core-image file,.

is not to be

contained in

P2 specifies that the MODULE file is to have a mode of P2.
Usage:
The GENMOD command causes a file to be created which is a
copy of the contents of a specified portion of core.. The
LOAD, USE, or REUSE commands will have been issued prior to
the GEMMOD command to load into core the file or files of
which a non-relocatable core-image copy is to be created.
The newly created file is placed on the user's permanent
disk and is assigned a filename of the first operand
specified in the GENMOD command, a filetype of MODULE, and a
filemode of Pl unless the option P2 was specified, in which
case the filemode is P2~
This file is in core-image form and is a copy of the
contents of core from the first entry point to the second
entry point specified in the GENMOD command. If only one
entry point is specified, the core-image file consists of a
copy of the contents of core from the first entry point
specified to the next available load location.
(The next
available load location is indicated by a pointer which is
updated after each LOAD, LOADMOD, USE, or REUSE command is
issued. )
Before the core-image file is written, undefined symbols'are
defined to location zero and common is initialized. The
undefined symbols are not retained in the MODULE file as
being unresolved; therefore, once the MODULE is generated,
GENMOD

189

those references can not be resolved.
Notes:
a.
Any f.iles existing on the permanent disk with a
filetype of MODULE and the same filename as that specified
in the GENMOD command will be erased before the new file is
created.
h.
To load into core any files which have been created by
the GENMOD command, the LOADMOD command should be used. If
the MODULE file is to be loaded into core and executed and
that MODULE file was generated with the (NOMAP) option,
LOADMOD can not be used; instead, the MODULE's filename must
be issued as a command.
c.
The MODULE file contains a load reap
unless (NOMAP) is specified.

d.
A MODULE
space.

file without

a load

of the core-image

map requires

less disk

Responses:
None.
Examples:
a.
GENMOD FIRS~
Assuming that a file which containing an entry point FIRST
has been loaded into core prior to issuing this command, the
above example causes a core-image file to be created on the
user's permanent disk. This file consists of the contents of
core from entry point FIRST to the next available load
lQcation and a load map. It has an identifier of FIRST
MODULE Pl.
b.
GENMOD ABC DEF (NOMAP)
This example creates a file on the user's permanent disk
with a filename of ABC~ a filetype of MODULE, and a filemode
of Pl. The file is a copy of the contents of core from entry
point ABC to entry point DEF. A load map is not included in
the MODULE file.

Error Messages:

E(OOOOl)
NO -entryl- ~ODULE
This message indicates that the entry point(s) specified
cannot be located in core. Check to see that these entry
points exist and reis~ue the command.
E(00002)
DISK ERROR
An address has been generated outside the bounds
storage assigned to the user. Reissue the command.

190

GENMOn

of core

E(00003)
DISK ERROR
A disk malfunction has
occurred.
Reissue the GENMOD
command. If the message persists, there is probably a disk
hardware problem.
E(00004)

DISK ERROR
An attempt to close the file after writing it out has not
been successful.
Issue FINIS and then reissue the GENMOD
command.

DISK ERROR
An illegal second character
has been
filemode. Reissue the GENMOD command.•
E(OOOOS)

E(00006)
DISK ERROR
The system has attempted to close
it. Reissue the GENMOD command.

encountered

for

the file prior to opening

E(00013)
DISK ERROR
The user's disk is full" and the core-image file cannot be
created.
Erase one or more of the unneeded files and
reissue the GENMOD command.

GENMOD

191

GLOBAL
purpose:
GLOBAL specifies either macro definition libraries to 'be
searched during the ASSEMBLE command. or text libraries to
be searched when loading files containing relocatable object
code.
Format:

I
I
1 GLOBAL
I
I
I
ASSEMBLER MACLIB
M

LOADER TXTLIB
T

ASSEMBLER MACLIB
M

I
I

1
LOADER TXTLIB
T

PRINT

I
I

1

specifies the library files that
are to be searched for macro
definitions during subsequent
assemblies.
specifies the library files that
are to be searched for missing subroutines during subsequent LOAD,.
USEt, or REUSE operations.

libname1 ••• 1ibnameN specifies the library files whose
filetype is either ~ACLIB or
TXTLIB.
PRINT

specifies that a list of libraries
currently in use is to be typed at
the terminal.

usage:
GLOBAL has three forms--the ASSEMBLER form, the LOADER form,
and the PRINT form.
ASSEMBLER Forro. The ASSEMBLER form of the GLOBAL command
allows the user to specify the macro libraries that are to
be used during the execution of the ASSEMBLE command. One
to five macro libraries may be specified. These macro
libraries are sea.rched for macro definitions in the order in
which they are named.
If the CMS macro library ~YSLIB
MACLIB and the OS macro library OS MACRO MACLIB are to be
searched along with the use,:- s macro libraries;, SYSLIB and
OSMACRO must be specified as two of the five libraries.
Each macro library specified must have a filetype of MACLIB.
For a description of MACLIB files and how to generate them,
see the MACLIB command under "Libraries".

192

GLOBAL

If no previous GLOBAL command has been issued, the ASSEMBLE
command searches the two macro libraries SYSLIB MACLIB and
OSMACRO MACLIB in that order. Both files reside on the CMS
system disk; SYSLIB MACLIB contains all of the CMS macros,
and OSMACRO MACLIB contains the OS macros. If the user has
created a file named SYSLIB MACLIB or OSMACRO MACLIB that
resides on a disk which precedes the system disk in the
standard order of search, it is used in place of the system
file. To terminate the searching of all macro libraries,
including SYSLIB MACLIB and OSMACRO ~ACLIB, the GLOBAL
ASSEMBLER command can be issued with no libnames specified.
~

Once the ASSEMBLER form of the GLOBAL command has been
issued" the specified macro libraries are searched for macro
definitions during each assembly until either a GLOBAL
ASSEMBLER
command is
reissued, the
CMS nucleus
is
reinitialized, or the user logs out from CP.
For a further discussion of macro libraries,
Library Usage under ·Operating Considerations·.

refer

to

PRINT Form.
The PRINT form of the GLOBAL command types at
the terminal a list of the current macro and text libraries
that are being searched for that user.
LOADER Form. The LOADER form of the GLOBAL command allows
the user to specify text libraries to be searched for
missing subroutines and filenames whenev~r the LOAD, USE,. or
REUSE commands are issued. One to eight text libraries may
be specified. These text libraries are searched in the
order in which they are named. If the system text libraries
SYSLIB TXTLIB and CMSLIB TXTLIB are to be searched along
with the user·s text libraries, SYSLIB and CMSLIB must be
specified as two of the eight libraries.
Each text library specified must have a filetypeof TXTLIB.
For a description of TXTLIB files and how to generate them,
see the TXTLIB command under "Libraries".
If no GLOBAL has been issued. the LOADf. USE, and REUSE
commands search the text library SYSLIB TXTLIB. This file
resides on the CMS system disk; SYSLIB TXTLIB contains the
Fortran library. If the user has created a file with the
identifier SYSLIB TXTLIB that resides on a disk that
precedes the system disk in the standard order of search, it
is used in place of the system file.
If the GLOBAL LOADER command has been issued and the user
wishes to
eliminate the searching of
the previously
specified text libraries;. GLOBAL LOADER TXTLIB can be issued
specifying no
libnames.This
terminates all
library
searching for missing ·subroutines when files are loaded by
LOAD,. USE" or REUSE.
Once the LOADER form of the

GLOBAL command has been issued.

GLOBAL

193

the specified TXTLIB files are automatically searched for
missing subroutines or filenames not found during each LOAD.
USE;, or REUSE until either a GLOBAL LOADER command is
reissued:. the option LIBE or SLIBE is specified with LOAD
which overrides the GLOBAL LOADER command for the duration
of that LOAD and any USE or REUSE commands which follow that
LOAD;~' the CMS nucleus is reinitialized. or the user logs out
of CP.
For further discussion on text libraries,. refer
Usage under ·operating Considerations·.

to Library

Notes:
a.
If the GLOBAL ASSEMBLER command is issued, one to five
macro libraries ~ay be specified and each must have a
filetype of MACLIB.
h.
If the GLOBAL LOADER command is issued, one to eight
text libraries may be specified and each must have a
filetype of TXTLIB,.
c.
GLOBAL will verify the existence of the libraries.
a library does not exist,. an error message is generated.
d.
ASSEMBLER MACLIB and LOADER TXTLIB may
by M and T,. respectivelYte

If

be abbreviated

Responses:
THE CURRENT MACRO LIBRARIES (MACLIB) ARE:
xxxxxxxx xxxxxxxx
THE 'CURRENT TEXT LIBRARIES (TXTLIB) ARE:
yyyyyyyy yyyyyyyy
This is typed in response to the GLOBAL PRINT command where
xxxxxxxx and yyyyyyyy are the names of the libraries,.
Examples:
a.
GLOBAL ASSEMBLER MACLIB NEWLIB MYMAC
The libraries NEwLIB MACLIB and MYMAC MACLIB are searched
for macro definitions during the ASSEMBLE command.
The
order of search for macro definitions is NEWLIB MACLIB" then
MYMAC MACLIB. The OMS macro librarySYSLIB MACLIB and the
OS macro library OSMACRO MACLIB are not searched.
h.
GLOBAL ASSEMBLER MACLIB
This example cancels the effect of any previously issued
ASSEMBLER form of the GLOBAL command and causes no libraries
to be searched for macro definitions during execution of the
ASSEMBLE command.
c.
GLOBAL LOADER TXTLIB SCOOP OPS SYSLIB
The libraries SCOOP TXTLIB. OPS TXTLIB are searched for
missing subroutines
during the LOADI•
USE.
and REUSE
commands. The order of search for missing subroutines is
194

GLOBAL

SCOOP TXTLIB

1,

OPS TXTLIB

i,

and SYSLIB TXTLIB.

d.
GLOBAL LOADER TXTLIB
This example cancels the effect of any previously issued
GLOBAL LOADER command and causes no libraries to be searched
for missing subroutines or undefined filenames by subsequent
LOAD" USE, or REUSE commands.
Error Messages:
00001)
An invalid form of the GLOBAL command has been
Reissue the command in its correct format .•

E(

issued.

E(00002)

TOO MANY TXTLIBS (MAX=8) OR MACLIBS (MAX=S)
SPECIFIED
Reissue the GLOBAL command reducing the number of libraries
specified.
E(00003)
-libname w LIBRARY DOES NOT EXIST
Existence of -libname w MACLIB or -libname w TXTLIB has not
been verified: wlibname- has been omitted from the active
l,ist of libraries ..

GLOBAL

195

LOAD
Purpose:
LOAD reads from disk one or more TEXT· files containing
relocatable
object code
and loads
them into
core,
establishing the proper linkages between the files,.
If thespecified TEXT files are not found.. the appropriate TXTLIB-files are searched. Corrections or additions can ~e made at
load tilll~ and the user can specify libraries to be searched
for missing subroutines. The user can also specify that
execution should
begin upon successful
completion of
loading.
Format:
,LOAD I fnamel ••• fnameN

< (optl ••• optN) ,

filename

is the name of the file to be loaded
The filetype must be MODULE.

into core.

filemode

is the mode of the MODULE file to be loaded,.

Usage:
LOADMOD is used to load a file which has been created by the
GENMOD command.
The filename of the file to be loaded is
specified as the operand of the LOADMOD command"
and its
filetype must be MODULE. If the MODULE file was generated
without a load map and the MODULE file is to be read into
core and executed"
LOAD MOD can not be issued; instead, the
MODULE's filename must be issued as if it were a command.
When LOAD MOD is issued without specifying a filemode, the
standard order of search is used to locate a file with the
specified filename and a filetype of MODULE. If a filemode
is given, only that disk is searched for the MODULE file.
If such a
file is found, it is assumed
to be in
non-relocatable core-image form, and is loaded into core.
Responses:
N'one.
Example:
LOADMOD FILE1
The file FILEl MODULE is loaded into core. If no such file
exists. an error message is returned!, and the loading
process does not take place.
Error Messages:

E(OOOOl)

FILE DOES NOT EXIST
DISK ERROR
Either of the above messages indicates that a file with the
specified filename and a filetype of MODULE cannot be
located. Check to see that such a file exists and that the
filename specified in the LOADMOD command is identical to
the filename of the file to be loaded,.

202

LOADMOD

E(00002)
DISI{ ERROR
An address has been generated outside the bounds
storage assigned to the user. Reissue the command.

of core

E(00003)
DISI{ ERROR
A disk malfunction has occurred.
Reissue the LOADMOD
command. If the message persists a disk hardware problem
has probably been encountered.
l,

E(00004)

FILE DOES NOT EXIST
DISI{ ERROR
Either of the above messages indicates that the filemode of
the specified file is invalid. Change the filemode to a
valid one and reissue the command.
E(00006)
DISI{ ERROR
Core space assigned to the user is not large enough for
loading the specified file or the system has attempted to
close the file prior to opening it. Reissue the LOADMOD
command.
E(00007)
DISK ERROR
The specified fi1e cannot be read from disk.
Reissue the
LOADMOD command. If this message persists, the file should
be recreated using the GENMOD command.
E(00009)
DISK ERROR
The specified file is open for writing and
Reissue the LOADMOD command.

LOADMOD

cannot be read;.

203

REUSE
Purpose:
REUSE reads from disk one or more TEXT files containing
relocatable
object code
and loads
them into
core,
establishing linkages with previously loaded files, and
changing the default entry point of these files to that of
the first file specified in the REUSE command. If the TEXT
files do not exist. the appropriate TXTLIB files are
searched,.
Format:

I REUSE I fname1.

,w ,.

fnameN (opt1.

w •

optN)  I

fnamel ••• fnameN

specify the names of
loaded into core.

TEXT files to be

optl ••• optN

specify the options to
during loading •

.libname1,.... 1ibnameN

specify the names of up to 8 TXTLIB
files to be
searched for missing
routines during loading.

be in

effect

Options:
The options that may be specified with REUSE are the same as
those with LOAD.
Usage:
REUSE does not overlay any file that has been previously
loaded by a LOAD, USE"
or REUSE command..
It loads the
specified files into higher core from the point at which the
previous LOAD, USE, or REUSE command terminated loading.
REUSE performs the same fUnction as USE except that REUSE
changes the default entry point to that of the first file
specified with the REUSE command.
The specified files must have
relocatable object code.

filetypes of TEXT and contain

If options have been specified with the previous LOAD. USE,
or
REUSE command,
these options
rema1n set
unless
respecified. The LOAD MAP file is automatically updated to
reflect the files loaded by REUSE.
Refer to LOAD for a
description of the LOAD options; the LOAD MAP file, and how
LOAD operates.

204

REUSE

Responses:
INVALID CARD - xxx ••• xxx
PINV has been specified and an invalid card has been found.
The message and the contents of 'the invalid card (xxx... ,.xxx)
are listed in the file LOAD MAP. The invalid card is ignored
and loading continues.
CONTROL CARD
loader or
library-search
control
encountered. Normal loading resumes.

A

card

has

been

If TYPE has been specified with REUSE or bas not been reset
from the previous LOAD~ USE, or REUSE command, the updated
portion of the LOAD MAP file is typed prior to the
completion of the REUSE command.
Example:
REUSE READIT GAMMA
The TEXT files READ IT and GAMMA are loaded into core,
linkages resolved with-the files previously loaded, and the
default entry point is changed to the first entry point in
READIT.
Error Messages:
E(00001)
DEFINED ~ORE THAN ONCE - xxxxxxxx
The name xxxxxxxx has been defined more than once. Check
the files that have been loaded for duplicate entry point
names or duplicate control section names. Loading has been
completed. Duplicate names are not loaded.
E(00002)
OVERLAY ERROR
The files being loaded have run out of core. Specify fewer
files or reduce the size of the files.. Loading has- been
completed.
E(00003)
REFERENCE TABLE OVERLAY
There are too many entries for entry points or control
section names in the reference table built during loading.
Loading has been completed. Reduce the number of entry
points or control sections in the files.
E(00004)
THE FOLLO~ING NAMES ARE UNDEFINED - xxxxxxxx
The names xxxxxxxx are referenced in a file and are never
d-efined. If the names are defined in another file" issue
the USE command for that file. Loading has been completed.
EC00005)
NAME IS UNDEFINED - xxxxxxxx
The name xxxxxxxx specified as an entry point does not
exist. Loadinq has been completed.
Check the name and see
if an entry point or a control section exists by that name
in the loaded files.

REOSE

205

START
Purpose:
begins ·execution of programs previously loaded and
passes the address of a string of user arguments to that
program.
S~ART

Format:
START

I

filename

is the name of a file whose
I'JODULE, or TEXT.

filetype is EXEC,

arg1 .••• argN

are one or more user arguments.

Usage:
-rhe $ command is used to load and start a program.. The
program exists as a file on one of the user's disks, and its
filename must be specified as the first operand of the $
command. The standard order of search is used to locate a
file with the specified filename and a filetype of EXEC,
MODULE, or TEXT, in that order.
If an EXEC filetype is found for the filename. the file is
assumedto contain one or more CMS commands .. and EXEC is
called to execute this file.
If no EXEC filetype exists,
but a filetype of MODULE is found" LOADMOD is called by $ to
load the program into cor~ and START is called to begin
execution of the program. When only a TEXT filetype exists
LOAD is called followed by START.
The user may specify ·as many arguments in the $ command as
he wishes,. provided they all fit on the same input line.
The arguments are set up as a string of double words" one
argument per double word.
The address of this string is
passed
to
the
specified file.
Each
argument
is
left-justified, and any argument more than eight characters
in length is truncated on the right. ~ith an EXEC file~ any
arguments
specified in
the
$
command repla.ce
the
corresponding &n operands in the individual commands of the
EXEC f.ile (see EXEC under -Execution Control" for a full
explanation of this operand-substitution technique),.
with a file whose filetype is MODULE or TEXT, the arguments
are placed in a string as described above..
The address of
the string may be obtained by adding 8 to the address
contained in
general-purpose register 1 at
the time
execution of the specified program begins..
Additional
arguments may be referenced by displacements of 16" 24/, 32.
etc." from the address thus obtained.

210

$

Note:
When a file with a filetype of MODULE or TEXT is used/I there
must be an entry point in the file that is identical to the
filename specified in the $ command.
After the file has
been loaded,. execution begins at this entry point.. such an
entry point is created by the Fortran compiler using the
filename specified in the FORTRAN cOFmand. With Assembler
language files, the user should create as an entry point or
assign as the name of a control section,. the filename by
which he wishes to reference the TEXT or MODULE version of
that file.
Responses:
For files with filetype EXEC, each command in the EXEC file
is typed at the user's terminal prior to its execution
unless the &TYPE option is used to suppress the printout.
EXECUTION BEGINS,. '••
This message is typed when a file of filetype MODULE or TEXT
has been loaded into core and is about to be started. Output
appearing after this message is from the user's program or
from a part of eMS called by that program.
DEFINED MORE THAN ONCE - xxxxxxxx
This message is generated by LOAD and indicates that
duplicate entry points or control section names (xxxxxxxxl
have been found in the TEXT file being loaded.
$ is
terminated with an error code of 3.
OVERLAY ERROR
Th'ere is not enough room in core to hold the TEXT file for
which a LOAD has been issued. $ is terminated with an error
code of 3.
REFERENCE TABLE OVERFLOW
There are too many entry points or control section names in
the TEXT file being loaded. $ is terminated with an error
code of 3.
THE FOLLOWING NA~ES ARE UNDEFINED - xxxxxxxx
The specified names referenced in the TEXT file being loaded
are never defined. $ is terminated with an errQr code of ,3.
DISK ERROR
An error has .occurred while reading or closing a file with
filetype MODULE. This message is generated by LOADMOD, and
terminates with an error code of 3.
Examples:
a~
$ MYFILE
The standard order of search is used to locate a file with a
filename of MYFILE and a filetype of EXEC, MODULE or TEXT.
If a file exists with filename MYFILE and filetype EXEC, the
t•

$

211

commands contained in it are executed.
Each command is
typed at the user·s terminal before it is executed. If
filetypes MODULE and TEXT or of MODULE only exist for
filename MYFlLE, the file with filetype MODULE is loaded
into core by LOADMOD and started by START at entry point
MYFILE. If only a TEXT filetype exists for filename MYFILE,
LOAD is issued to bring MYFILE into core. and START is
issued using entry point MYFILE.

b . $ OTHER SAME 1.436 5 A
If filetype EXEC is found for filename OTHER execution of
the EXEC file begins with the argument SAME replacing &1
wherever it appears in the EXEC file, 1,.436 replacing &2, 5
replacing '3. and A replacing
If no EXEC filetype exists
for filename OTHER but a filetype of MODULE or TEXT is found
the file is loaded into core and started at entry point
OTHER.
The four
user arguments can be
accessed by
displacements of 8, 16 1• 24, and 32, respectively!, from the
address contained in general-purpose register 1 at the time
program OTHER is started~
t•

'4..

212

$

DEBUGGING

FACILI~IES

A debugging tool is provided with eMS in the form of the
DEBUG command. This command allows the user. while at his
terminal!. to examine and change the contents of core
locations program status words, general-purpose registers,
the chann~l status word and the channel address word; to
dump portions of core on the offline printer; and to. stop
and restart programs at any specified point or points.
Methods for using these DEBUG facilities are described in
this section.
i•

l•

In addition to DEBUG. there are two commands that allow the
user to trace supervisor calls (SVC instructions) and
therefore. .the internal branches which are issued to the
various
CMS
commands
and
functions.
These
two
commands--SETOVER and SETERR--set certain overrides, or
flags, which are checked whenever an SVC instruction is
executed and a return is issued from an SVC-called program.
Two types of overrides .may be set: normal and error.
Normal overrides are those which cause trace information to
be recorded
for SVC-called programs
executed without
encountering any error conditions.
Error overrides are
those which record information for SVC-called programs which
return with an error code in general-purpose register 15.
The S-ETOVER command sets both types of overrides. The SETERR
command sets error overrides only.
To clear overrides which have been set by the SETOVER and/or
SETERR commands. the CLROVER command may be issued.
In
addition to terminating the recording of trace information,
CLROVER causes all information recorded up to that pOint to
be printed on the offline printer.
If the user wishes to terminate the recording of trace
information during the execution of one of his own programs
or of a CMS command (that is, -at a point when the CLROVER
command cannot be issued) he may do so by hitting ATTN twice
(pausing each time for the keyboard to unlock) and typing
the letters KO followed by a carriage return. Processing
continues as before, but no further information is recorded
for SVC's executed. KO terminates overrides and causes
recorded trace information to be printed on the offlin~
printer.
If the user bas set overrides by issuing either or both the
SETOVER and SETERR commands and has. failed to clear these
overrides they are cleared automatically and the recorded
information is printed on the offline printer when the user
logs out from the Control Program or when he issues a
RESTART request in the Debug environment.
l,

Debugging Facilities

213

CLROVER
Purpose:
CLROVER clears overrides set by either or both the.SETOVER
and SETERR commands,.
It also cause~ all trace information
recorded up to that point to be printed on the offline
printer.
Format:
CLROVER
Usage:
This command terminates the recording of trace information
set by the SETOVER and/or SETERR commands and causes that
information to be printed on the offline printer..
If
CLROVER is not issued. the user may clear all currently
active overrides by issuing a KO command. Any overrides
which have been set but not cleared at the time the user
issues a REST~ request in the Debug environment or ends
his terminal session by logging out from the Control Program
are cleared automatically and the trace information is
printed o,ffline.
CLROVER cancels the effect of all SETOVER and SETERR
commands issued since the last'KO or CLROVER command was
issued, or since the user's last CMS login if neither a KO
nor a CLROVER has been issued durin9 the terminal session.
Once CLROVER is issued" no further trace information is
recorded until the user issues another SETOVER or SETERR
command.
A sample of the format in which trace information is printed
offline is given in Figure 15. A fixed amount of trace
information is printed for all error overrides; the amount
for normal overrides varies
depending on the options
specified with the SETOVER command. An explanation of all
possible fields which can appear in the printout is given
under ·Output- in this section.
Notes:
a.

If a CLROVER command is issued when no overrides are
currently activel, it has no effect other than printing
the following 1ine on the offline printer:

****NOTE--NORMAL- AND ERROR-OVERRIDES HAVE NOW BEEN CLEARED****
b.

214

Any operands given with CLROVER are ignored.

CLROVER

Responses:
None.
output:
An explanation of each field appearing in the
trace information is given below.

printout of

SETTING ERROR-OVERRIDE TO PROVIDE A DYNAMIC TRACE OF
(AND aS) SVC-CALLS.,••
This message appears whenever SETERR is issued.
SETTING NORMAL- AND ERROR-OVERRIDES TO PROVIDE A
TRACE OF CMS (AND OS) SVC-CALLS,•••
This message appears whenever SETOVER is issued.

CMS

DYNAMIC

• •••• ERROR-OVERRIDE.
This message identifies the first line for each SVC-called
program which returns with an error code in general-purpose
register 15.
NORMAL-OVERRIDE:,
This message identifies the first line for
program which issues a normal return.

each SVC-called

CALLER = xxxxxxxx
This information appears in the
first .line for each
SVC-calle~
program.
It indicates the hexadecimal core
location (xxxxxxxx) of the SVC instruction whose execution
caused that program to be called.
CALLEE = 'xxxxxxxx
This information appears in the
first line for each
SVC-called program. xxxxxxxx is the name of the called
program (if a CMS SVc is issued) or the number of the SVC
(if an 0$ svc is issued).
SVC~OLD-PSW = xxxxxxxxxxxxxxxx
This information, given
in the first line
for each
SVC-called program, gives the contents of the SVC old
program status word. For an explanation of the SVC old
program status words and its use, see the IBM manual. ~
System/360 Principles of Operation.

=

NRMRET
xxxxxxxx
This information, given
in the first line
for each
SVC-ca~led
program, gives the hexadecimal core location
(xxxxxxxx) to which the
program returns under normal
conditions (that is, when no error code is generated)

I.

ERRET = xxxxxxxx
This information, appearing at the rignt margin of the first
line for each SVC-called program, gives the hexadecimal core
location (xxxxxxxx) to which the program returns if an error
code is generated during its execution.
CLROVER

215

GPRS BEFORE = xxxxxxxx,••• xxxxxxxx
Two lines of information appear with this message.
The
first line consists of the contents of general-purpose
registers 0-7: the second line gives the contents of
registers 8-15 as they existed when control was passed to
the SVC-called program,.
FPRS BEFORE = xxxxxxxx~_.xxxxxxxx
This line of information gives the contents of the four
floating-point registers as they existed at the time control
was transferred to the SVC-called program.
GPRS AFTER = xxxxxxxx ••• xxxxxxxx
Two lines of information appear with this message.
The
first line gives the contents of general-purpose registers
0-1; tbe second line gives the contents of registers 8-15 as
they existed when a return was issued by the SVC-called
program.
FPRS AF-rER = xxxxxxxx .• _ • xxxxxxxx
This line of information gives the contents of the four
floating-point registers as they existed when a return was
issued by the SVC-called program.
PARM.-LIST = xxxxxxxx •.•• xxxxxxxx
This message is followed by one or two lines of the
parameter list which existed at the time the SVC was
executed. See SETOVER under ·Debugging Facilities· for a
discussion of parameter lists and their use.
****NOTE--NORMALAND
ERROR-OVERRIDES HAVE
NOW
BEEN
CLEARED****
This message appears whenever a CLROVER command is issued.
Example:
CLROVER
This clears all currently active overrides and cause any
trace information recorded up to that point to be printed on
the offline printer. See Figure 15 for a sample of the type
of information printed.
Error Messages:
None.

216

CLROVER

SETTING HORIIlL- UID ERIIOR-OYEIIRIDES TO PROYIDE A DYJABIC TRACE OF CIIS (AID OS) SYC-C.lLI.S •••
NOBBAL-OVERRIDE,
CALLEB=00009514
PAS.-LIST = --SETO---YEB -FFFFFPFF
FFFFFFFF

CALLEE=SETOYE8 SVC-OLD-PSII=000400CA60009516
FFFFFFFF
fFFFFFFF
FF"FFFFF!
FlFFFFFP
FF'FPFFPF
PFF'FFFFF
FPFFFFFP
FlFFPFFF

BaBaBT=0000951A
EBRET=0000951A
PFFFFlFF
'PPFFFFF
FFFPPFlP
FlFFlPlP

*****ERBOR-OYERRIDE.
CALLER=000057F2
GPRS BEfORE = E2C5E3D6
0000139C
00009386
00012000
'PBS BEfOBE
00000000
00000000
GPJiS AFTER
E2C5E3D6
0000139C
00000004
00000100
FPRS AFTEB
00000000
00000000
PAliB. -LIST =
--FIIII---S
FFFFOOOO
00000000

CALLEE=FU IS
SVC-OLD- PSII=000400cA400057P4
00000000
00005816
00009B10
E2C5E3D6
00009508
00000001
400057E8
00001180
00000000
00000000
00000000
00000000
0000139C
00000000
00000718
000C29DC
C6C9D5C9
E2404040
000040A8
ooooouO
00000000
00000000
00000000
00000000
--OYEJr--

NB!BBT=000057P8
EBBBT=0000S1p8
00005018
0003E8B8
40009540
000011BO
00000000
00000000
00000120
00000048
000026C£
00000006
00000000
00000000
5C40FlFP
F.FEPIFD
--BIDE---!ODO--

HOBaAL-OVERRIDE,
CALLER=0000955A
PAB8.-LIST = --TIPL---IN---0.50-4BP1F315

CALLEE=TYPLIB
SYC-OLD-PSI/=000400CA6000955C
0100960C
C200001A
D95E40B3
7EFOQBFO
17174040
40401517
17C54DD5

HRBBET=00009560
EiRET=0000954A
P461F04B
--14 2 --08BR-5D5£40£3

NORBAL-OVERRIDE,
CALLER=00009608
PARa.-LIST = --iAIT---RD---TIPL---IN--

CALLEE=iAITRD
SYC-OLD-PSII=000400CA400096DA
01009774
E4000010
--T!PL---IN-0100960C
C2000011
D95E40E3
1EF04El'O

HRBIIET=000096DE
ERBET=000096DE
01009386
D2000020
F461F04Jl
--14 2 -

*****EBROR-OVERRIDE.
CALLER=00009514
GPBS BEFCH
E2E3C1E3
00009B10
00009386
00012000
FPBS BEFORE
00000000
00000000
GPBS AFTER
E2E3C1E3
00009B10
00000004
00000100
PPIiS AFTEB
00000000
00000000
FARI!.-LIST =
--STAT---E
FFFFFPFF
FFFFFFFF

CALLEE=ST1TE
SVC-OLD-PSi=000400CA60009516
00000000
00000000
00009B10
E2E3C1E3
00009508
00000001
40009318
800094CO
00000000
00000000
00000000
00000000
00009B 1 0
00000000
00000778
00002A84
E2E3C1E3
C5404040
00002BDO
OOooono
00000000
00000000
00000000
00000000
--TEST---SISI---I
FFFFFFFF
FFlFFFFF
FPFFFFl!
P"FPFPP

NB8RBT=00009511
EBRET=00e09S1A
000050A8
0003E8B8
60009580
00000001
OOOOOOOC
00000000
00000120
00000048
000026CE
00000001
00000000
00000000
FFFIIFFP
'FlIPI!1
PFFFPFFF
FFPFFFFP

**** *E IiRCR-OV BRRItE,
CALL );8=00005712
GPRS BEFORI! = E2E3C1E3
0000139C
00009386
00012000
FPBS BEFOBE = 00000000
00000000
GPRS AFTER
E2E3C 1E3
0000139C
00000004
00000100
FPES AFTEB = 00000000
00000000
PARB.-LIST = --FIHI---S
FFFPOOOO
00000000

CALLEE=FIBIS
SYC-OLD-PSI=000400CA400C57F4
00000000
00005816
00009Bl0
E2!3C1E3
00009508
00000001
4000571:8
000(11BO
00000000
00000000
00000000
OCOOOOOO
00001390
00000000
00000778
000029DC
c6C9D5C9
E2404040
00004018
000COA10
00000000
00000000
00000000
00000000
--OVEB-

NB8RE'l:000057F8
EBlIET=000057 pa
000050A8
0003E8E8
40009540
000011BO
00000000
00000000
00000120
00000048
000026CE
00000006
00000000
00000000
5C40PFFF
FPFEPFPD
-llIDE---80Do--

lIOli/IAL-OVERRIDE,
CALLER=0000972E
PARI!.-LIST = --TIPL---IN---YSIII--

CALLEE=TYPLIN
5 VC-OLD- PSII=OOO 400CA 600(; 9730
01009631
C2C00021
00000010
--STlT--

NR!BET=00009734
ERBET=0000972E
--E T £---ST 5 -

!'OlfIlAL-CVEBRItE,
CALLER=00009608
PARB.- LIST =
--WAIT---RD---TIPL---IN

CALLEE=IIAITRD
SVC-OLD-PSI =000 400C14000 .,I:DA
01009174
E4000014
--TYl'L---li-0100960C
C2000011
D95E40E3
7EFC4EFO

NB!RET=000096DE
ERBET=000096DE
01009386
02000020
F461F04B
--11 2--

*****E6ROR-OVEBRIDE,
CALLER=00009514
GPRS BEFOBE
E2E3C1E3
00009B10
00009386
00012000
FPRS BEFCRE
00000000
00000000
GPRS AFTER
E2E3C1E3
00009Bl0
00000004
00000100
FPRS AFTER
00000000
00000000
FAR!!.-LIST
--STAT---E
FFFFF1FF
HFFFFFF

CALLEE=STATE
SVC-OLD- PSI=000400CA60CC 9516
00000000
00000000
00009810
E2E3Cl!3
00009508
00000001
4000937E
SOOC94C0
00000000
00000000
00000000
00000000
00009Bl0
00000000
00000778
00002184
E2E3C1E3
C5404040
00002BDO
COOC01AO
00000000
00000000
00000000
00000000
--SAI!E---LE ---FORT---R.lN -FFFFFFFF
FFFFFFFP
FFFFFFFF
FFFFFFFF

NB!BET=0000951A
ERRET=0000951A
00005018
0003E8E8
60C09580
00000001
00000000
00000000
00000A20
00000048
000026C1
00000001
00000000
00000000
FFFFFPFF
FFPFFFIF
FFFlPFF.
Fl'FUPFF

*****ERROR-OVERRIOE,
CALLER=000057F 2
GPBS BEFCRE = E2E301E3
0000139C
00009386
00012000
FPRS BEfORE
00000000
00000000
GP6S AFTER
E2E3C1E3
0000139C
C0000004
00000100
FPBS AFTER
00000000
00000000
PAR~.-LIST =
--FIN1---5
FPFFOOOO
00000000

CALLEE=PIIiIS
SVC-OLD-PSII=000400CA400057F4
00000000
00005816
00009Bl0
E2E1C1E3
000095C8
OCOOOOOl
400057E8
000011BO
00000000
00000000
OOOOOOOC
OOCOOOOO
0000139C
00000000
00000778
000029DC
C6c9D5C9
E2404040
00004018
OOOOOno
00000000
00000000
00000000
OOOCOOOO
--OYEJr--

NB8BET=000057F8
EaRET=000057F8
000050A8
0003E8B8
40009540
000011£0
00000000
00000000
00000120
00000048
000026CE
000000C6
00000000
00000000
5C40FFFF
FFF£FPfD
--BIDE---80DO--

"OF I'JAl-CVEBIiI n,
CALL fR=0000972 E
PARlI.-LIST = --TYPL---IN
-- FOR---TR1N--

CALLEE=TIPLIH
SYC-OLD-PSV=000400CA60CC9130
01009631
C2000021
00000014
--STAT-

HB!BET=00009734
EiBET=0000972E
--E 51---8PLi--

bOF!!Al-CVERlnr:f,
CALLfR=00009608
FARI'l.-LIST = --WAIT---RD---TIPL---IN--

CALLEE=V AIT BD
SYC-OLD-PSV=OOO 400C140CC 91i0A
01009714
E4000013
--T!PL---11-0100960C
C2000011
D95E40£3
7EPC4BFO

IIB!RE'l=0000960E
EiRE'l=000096DE
01009386
D2000020
F561F04B
--11 2--

NORKAL-OVERRIDE.
CALLER=00009514
PARlI.-LIST = --STAT---E
FFFFFFFF
FFFFFFFF

CALLEE=STAT E
SVC-OLD-PSII=00040OC160CC9!:16
--FIGo---RE ---SCRI---(7-EFFEFFFF
l'FFFFPFF
fFFFFPFF
HUFFPF

HB!RBT=0000951A
BBBET=0000951A
FFUFIFF
000013IiO
FFFPPFFF
FFFFPlFF

**** $EBROR-OVERRIDE.
CALLER=000057F 2
GPliS BEl'1JRI! = E2E3C1E3
0000139C
00009386
00012000
FPFS BEPORE
COOOOOOO
00000000
GPliS AFTER
E2E3C1E3
0000139C
00000004
00000100
FPliS AFTER
00000000
00000000
PARrI.-LIST =
--FINI---5
FFFFOOOO
00000000

CALLEE=FI US
SVC-OLD-PSII=OOO 400C14CCC57F4
00000000
00005816
00009810
E2E~C1E3
C0009508CC000001
400057E8
000011BO
00000000
00000000
00000000
OOCCOOOO
0000139C
00000000
00000778
000029D<:
c6C9D5C9
E2404040
00004018
OOOOOUO
00000000
00000000
OOOOOOOC
oeccoooo

-*
00000000

--*

00000000.

00000000

00000000

00000000

00000000

--*

00000000

--*

00000000

00000000

--F lGU--

IIRBBET=000057F8
EBBET=000057F8
000050A8
0003E8B8
40009540
000011JlO
00000000
00000000
00000 A20
00000048
000026CE
00000006
00000000
00000000
5C40FPlF
'!PIPfFD
--BE - --SCBI--

hOF Hl-CVEEEHE,
CALL ER=0000955 A
FAFlI.-LIST = --TIPL---IN---0.50-4BF4F815

CALLEE=TIPLI~

SYC-OLD-PSII=000400CA60CC9!:5c
C200001A
D95E40E3
7EPC4BFO
40401517
17054 tPO

HR!8E'l=00009560
E8BBT=00009541
F 361F 04B
--08 2---0001-5D5E40!3

IiOli8AL-OVEBRI DE,
CALL ER=OOO 096D8
PAS8.-LIST = --IIAIT---RO
--TIPL---IN

CALLEE=VAITRD
SYC-0LD-PSII=000400C1400096DA
01009774
E4000007
--TlPL---IK010091:0C
c200001l
D95E40E3
71!FCUFO

BBBRET=000096DE
£BBET=000096DE
01009386
02000020
F361F04E
--08 2 -

00000000
0100960C
17174040

00000000

--*
00000000

****liOTE--NORrlAL- AIiO ERROR-OVERRIDES HAVE HOW BEEII CLE1RED**.*

Figure 15.

Sample offline printout of trace information
recorded by the SETOVER command
CLROVER

217

DEBUG
Purpose:
The purpose of the DEBUG command is to provide the user with
online facilities for debugging programs and to provide an
entry in CMS for handling external and program interrupts
and unrecoverable errors.
Format:

I DEBUG ,
Usage:
The facilites of DEBUG are made available to the user when
the DEBUG command is issued,. an external interrupt occurs, a
program interrupt occurs a breakpoint is encountered during
program execution, or an unrecoverable e~ror occurs. Once
DEBUG
has been
entered due
to any
of the
above
circumstances, tne user is said
to be in the Debug
environment. The only valid input in this environment is
the group of DEBUG requests discussed in this sectio~. Five
of the requests--GO, IPL/, 1{X, RETURN. and RESTART--cause the
user to leave the Debu-:J environment. Which of these five
requests should be issued depends on the circumstances under
which DEBUG is entered. Refer to the section dealing with
each request for a further discussion of its use.
l,

When the Debug environment is entered. the -contents of all
general-purpose registers:, the channel status word and the
channel address word are saved so they may be examined and
changed prior to being restored when leaving the Debug
environment. If DEBUG is entered via an interrupt" the old
program status word for that interrupt is also saved. The
reque~ts which may be issued
in the Debug environment allow
the user to examine and change the contents of these control
words and registers as well as portions of the user's
virtual core.
Each of
these requests
is described
individually in the following sections.
i

•

Notes:
a.

KT

and KO are not

recogniz~d

in the Debug environment.

b.
The floating-point registers may not currently be
examined or changed in the Debug environment. To access the
floating-point registers!, the CP console functions DISPLAY
Yreg and STORE Yreg may be used.
Responses:
DEBUG ENTERED •••
This message indicates
218

that DEBUG
DEBUG

bas

been

entered

in

-------

--------

response to the DEBUG command or due to an unrecoverable
error encountered during execution. Any DEBUG request may
be issued as soon as the keyboard is unlocked.
DEBUG ENTERED, EXTERNAL INT.
This message indicates that an external interrupt has caused
DEBUG to be entered and that the external old program status
word is saved.
Any DEBUG request may be issued as soon as
the keyboard is unlocked.
DEBUG ENTERED PROGRAM INT. PSW = xxxxxxxxxxxxxxxx
This message indicates that a program interrupt bas .caused
DEBUG to be entered. The program old PSW is save~, and its
contents typed in hexadecimal representation as indicated by
xxxxxxxxxxxxxxxx above. Any DEBUG request may be issued as
soon as the keyboard is unlocked.
DEBUG ENTERED BREAKPOINT xx AT xxxxxx
This message is typed when
DEBUG is entered due· to
encountering a breakpoint during the execution of a program.
The breakpoint is identified by the number assigned to it
(xx) and by the hexadecimal core location (xxxxxx) at which
it is encountered. Any DEBUG request may be issued as soon
as the keyboard is unlocked.
INVALID DEBUG REQUEST
The user has' specified a request which is not valid in the
Debug environment or which includes the wrong number of
operands. On.ly the requests discussed in this section are
valid.
Requests:
inienever the keyboard is unlocked in the Debug environment,
any DEBUG- request may be issued. The following rules apply
when issuing DEBUG requests;
(1)
The parameters,. or operands
separated by one or more blanks.

i•

of

each request

must be

(2)
The character-delete symbol"
all
may be used to delete
individual
characters
in
an
input
line
and
n
character-delete symbols delete the preceding n characters
in the line.
(3)
The line-delete symbol;, ~,' may be used to delete itself
and all
preceding characters in
an input
line.
A
line-delete symbol cannot be deleted by a character-delete
symbol.

(4)
All
operands longer
than
eight
left-justified and truncated on the right.
(5)
All entries
the DEF request .•

in the DEBUG

DEBUG

characters

symbol table are

are

created by

219

(6) The DEBUG requests can be abbreviated by
minimum of two characters, except for X,
-:{ ~RESTART •
Below is a list of all
minimum abbreviation.
REQUESTS

valid

BR
CA

CS
DE

CS~

DEF
DUMP
GO
GPR
IPL
KX
ORIGIN

220

requests and

Minimum Abbreviation

BREAK
CAW

~:~

DEBUG

specifying a
and

RETURN"

DU
GO

GP
IP
KX

OR

PS~

PS

RESTART
RETURN

REST
RET

SET

SE
ST

STORE
TIN

TI

X

X

DEBUG

their

BREAK
Format:

I
I
I BREAK I
I
I

symbol
id
hexloc

id is any decimal number between 0 and 15 inclusive
symbol is a name which has been assigned (using the DEF
request) to the core address at which a breakpoint
is to be set
hexloc is the hexadecimal core location (relative to the
current origin) at which a breakpoint is to be set
Usage:
This request enables the user to stop execution of a program
at
specific instruction
location called
breakpoints.
Issuing the BREAK request causes only one breakpoint to be
set.
separate BREAK requests must be issued for each
breakpoint desired. A maximum of sixteen breakpoints may be
in effect at any given time, and any attempt to set more
than sixteen is rejected .•
The first operand of the BREAK request specifies the
identification number assigned to the breakpoint being set.
It must be a decimal number between 0 and 15 inclusive. If
an identification number is specified which is the same as a
currently set breakpoint the previous breakpoint is cleared
and the new one is set.
l•

The second operand of the BREAK request indicates the core
address at which the breakpoint is to be set. If this
operand contains any non-numeric characters, the DEBUG
symbol table is searched for a matching symbol entry. If a
match is found, the breakpoint is set at the core address to
which the symbol name is assigned provided that address is
on an even (halfword) boundary. If no match 1S found in the
DEBUG symbol table"
or if the second operand contains only',
numeric characters, the current origin as established by
the ORIGIN request is added to the specified operand and the
breakpoint is set at the resulting core address provided
that address is on a halfword boundary.
The DEBUG program sets a breakpoint by saving the contents
of the byte located at the core address specified by the
second operand of the BREAK request,. This byte is replaced
by the byte EX where x is the hexadecimal equivalent of the
breakpoint identifier specified in the first operand. For
the breakpoint setting to have meaning, the core address
indicated by the second operand must be the location of an
DEBUG - BREAK

221'"

operation code. Thus;, when the location is encountered
during proqram execution/I a program interrupt occurs because
all.values EO through -EF are invalid operation codes and
control is transferred to the Debug environment. In DEBUG
the invalid operation cQde is recognized as a breakpoint,
the original operation code is replaced, and a message is
typed ident'ifying the breakpoint encountered.
Figure 16 gives the procedure normally used for setting
breakpoints. The program is loaded into core and DEBUG is
issued to transfer control to the Debug environment so
breakpoints may be set prior to execution.
After the
desired breakpoint have been set" RETURN should be issued to
return control to the CMS Command environment. Issuing the
START command causes program execution to·begin. Whenever a
breakpoint is encountered, a message to that effect is
typed, control, is returned to the Debug environment, and the
keyboard is unlocked to accept any DEBUG request except
RE~URN.
Issuing the GO request causes program execution to
continue from a specified location or the location at which
the _breakpoint had been set.•
Notes:
a. A breakpoint is cleared
program execution~

when it is

encountered during

b. To obtain the core addresses of instructions at which
breakpoints are to be set"a listing of the program(s) in
assembler language mnemonics should be used together with a
load map. Assembler language mnemonics ar.e obtained in
Fortran listings by specifying the LIST option when the
FORTRAN command is issued; see Figure 17,. To obtain a load
map. the TYPE option is specified in the LOAD command as
shown in Figure 15.
c. If the address specified for a breakpoint setting is on
a halfword boundary" the byte at that address may not
contain an operation code. It is up to the user to make
sure that breakpoints are set only at .operation code
locations.
Otherwise{, the breakpoint is not recognized
during execution and may generate other errors by overlaying
data or some part of an instruction other than the operation
code.
d.
No breakpoints should be set below hexadecimal core
location 100 since this area is reserved for hardware'
control words, and does not contain executable code.•
e. If BREAK specifies a core address at which a breakpoint
is currently active,. the second breakpoint is set at that
same location.
When encountered during execution., the
identification number of the most recently set breakpoint is
typed. The second time this core location is reached during
program execution,
the identifier of
the second-most
recently set breakpoint is typed" and so on,. When DEBUG' has
222

DEBUG - BREAK

been entered due to a breakpointi,
issuing the GO request
without an operand causes execution to begin at the location
at which the breakpoint was encountered. If more than one
breakpoint has been set at this location;, the addi tional
breakpoint (s·) causes DEBUG to be re-entered,.
Responses:
If the BREAK request is correctly issued, the keyboard is
unlocked following a carriage return, and the system is
ready to accept another DEBUG request.
INVALID DEBUG REQUES~
This response indicates that some
operands have been specified.

number

other than

two

INVALID ARGUMENT
This message indicates that the breakpoint identification
number specified in the first operand is not a decimal
number between 0 and 15 inclusive,. or the second operand
cannot be located in the DEBUG symbol table and is not a
valid hexadecimal number.. If the second operand is intended
to be a symbol, a DEF. request must have been previously
issued for that symbol; if not, the operand must specify a
valid hexadecimal core location.
INVALID CORE-ADDRESS
The core location indicated by the second operand is uneven
(not on a halfword boundary) or the sum of the second
operand and the current origin value is greater than the
user's virtual core size. If the current origin value is
unknown, i t may be reset to the desired value by issuing the
ORIGIN request.
REPLACES OLD BREAKPOINT xx AT xxxxxx
This response indicates that the BREAK request just issued
specifies a breakpoint identifier (xx) which is aSSigned to
a currently active breakpoint. The old breakpoint ·(at core
location xxxxxx) is cleared and the new breakpoint is set.
DEBUG ENTERED

BREAKPOINT xx AT xxx xxx
This message is given when a breakpoint is encountered
during program execution. xx is the breakpoint identifier
andxxxxxx is the core address of the breakpoint. After the
message' is typed., the keyboard is unlocked to accept any
DEBUG request exc1.!pt RETORN .•
Examples:

a. BREAR 1 leC
The current origin value is added to 18C and the byte at the
resulting core. address is saved and replaced by the byte
'El'. Refer to Figure 16 where the origin is set to 12000,
and the instruction at breakpoint 1 is set is the second
from the· last instruction shown in Figure 17. Note that the
DEBUG - BREAK

223

load map indicates that program PRIME is loaded -at 12000.
Setting the origin to 12000"
therefore, means that the
statement locations shown in the listing of program PRIME
may be used in setting breakpoints. When breakpoint 1 is
encountered during program execution;, the message
DEBUG ENTERED

BREAKPOINT 01 AT 01218C
is typed.
b.

BREAK 3 AM

The byte at the address assigned to symbol AAA is saved and
replaced by the eE3·. In Figure 16 a DEF request is issued
which assigns symbol AAA to location 1A4 relative to the
current origin of 12000. Breakpoint 3 therefore sets at core
address 121A4. as indicated by the message
DEBUG ENTERED

BREAKPOINT 03 AT 0121A4
which is typed when the breakpoint
program execution.

224

DEBUG - BREAK

is encountered

during

printf prime listing
FORTRAN IV G LEVEL 0 MOD 0
"
FILE PRIME
C

0001
0002

100
8

0003
0004
0005
0006
0001
0008
0009
0010
0011
0012
0013
0014
0015
0016
0011
0018
0019
0020

101
3

102
103
104
105
106
1

107
5

DATE = 67080
CAMBRIDGE MONITOR SYSTEM
PRIME NUMBER PROBLEM
WRITE (6.8)
FORMAT (27B PRIME NUMBERS FROM 1 TO
50/2X,. IH1/2X. IB2/2X.,lH3)
1=5
A=l

PRIME

A=SQRT(A)
J=A
00 1 R=3"J;,2
L=I/K
IF (L*R-I) 1,.2.,4
CONTINUE
WRITE (6,,5)1
FORMAT (I3)
1=1+2

2
108 IF

(50-I}7~4,3

4 WRrrE (6,9)
9 FORMAT (14H PROGRAM ERROR)

1 WRITE (6,6)
6 FORMAT (4H END)
109 STOP

END

PRIME

FORTRAN IV G LEVEL 0,. MOD 0
FILE PRIME

FORTRAN IV G LEVEL O. MOD 0
FILE PRIME
LOCATION
000000
000004
000008

STA NUM LABEL

OP
BC
DC

DC

OOOOOC

STM

000010
000014
000016
00001A
00001E
000022
000024
000028
00002C
00016C
000170
000174
000178
00011C
00011E
000182
000184
000186

LM
LR

Figure 11.

L

ST
STM

BCR

A36

DC
DC
DC
L

L

LM
MVI
BCR
A20

L

LR
LR

BAL

CAMBRIDGE
PRIME
CAMBRIDGE
OPERAND
15,12(0,1"5)
06D7D9C9
D4C54040
14,121,12 (13)
2,.3.40 (15)
4,13
13,36(0,15)
13,8(0,4)
3,,4 .• 0(13)
15,2
00000000
00000000
00000000
13,4(0,13)
14,12(0,13)
2,12,,28 (13)
12(13),255
15,14
15.160(0,13)
12,13
13,4
111.64(0,.15)

DATE = 67080
MONITOR SYSTEM
DATE = 67080
MONITOR SYSTEM
BCD OPERAND

A4
A20
A36

IBCOM#

Sample output created by a FORTRAN command in which
the LIST and SOURCE options are specified.

DEBUG - BREAR

225

load prime (type)

PRIME#
PRIME

AT 12000
AT 12000
IHCFCOMH AT 122A8
SAVAREA AT 13210
VFIOCS
AT 13110
IBCOM#
AT 122A8
FDIOCS# AT 12364
IBCSSQRT AT 132EO
SQRT
AT 132E0
IBCFCVTH AT 13390
ADCON#
AT 13390
INT6SW
AT 143F1
FCVEO
AT 13E3A
FCVLO
AT 13612
FCVIO
AT 13948
FCVCO
AT 1403C
FCVAO
AT 13582
FCVZO
AT 134DC
IHCFIOSH AT 14410
FIOCS'
AT 14410
IBCTRCB AT 14FA8
IHCUATBL AT 15220
R;T=0.39/0.60
debug
DEBUG ENTERED•••
ori9in 12000
break 1 18c
def aaa 1a4
break 3 aaa
return

R;T=O.02
start
EXECUTION BEGINS •••
DEBUG ENTERED

BREARPOINT 01 AT 01218C
90
PRIME NUMBERS

FROM

1 TO

50

1
2
3
DEBUG ENTERED

BREARPOINT 03 AT 0121A4
Fi9ure 16.

226

Sample procedure for setting breakpoints

DEBUG - BREAK

CAW
Format:
CAW
Usage:
This request causes the contents of the channel address word
which existed at the time DEBUG was entered to be typed at
the terminal. The CAW. specifies the storage protection key
and the core address of the first channel command word
associated with the next or most recent START I/O,. The CAW
located in hexadecimal core location 48, is saved at the
time DEBUG is entered. It has the following format:
Bits

Contents

0-3

Protection key which is matched with a key in storage
whenever reference is made to main storage.

4-7

Not implemented; currently set to zeros.

8-31

Command address:, indicating
the hexadecimal core
location of the ~irst channel command word associated
with the next or the most recent START I/O.

For a further discussion of the channel address word:, refer
to the IBM manual, IBM System/360 Principles of Operation.
Responses:
If the request is issued correctly" the contents of the
channel address word are typed in hexadecimal representation
at the terminal and" following a carriage return, the
keyboard is unlocked to accept another DEBUG request.. See
Figure 18 for an example of· response to the CAW request,.
INVALID DEBUG REQUEST
This response to the CAW request indicates that one or more
operands have been specified. Reissue the request in its
correct format.

DEBUG - CAW

227

CSW
Format:

I

CSW

Usage:
This request causes the contents of the channel status word
which existed at the time DEBUG was entered to be typed at
the terminal. The CSW indicates the status of a channel or
an input/output device or the conditions under which an I/O
op~ration has
been terminated.
The CS~ is formed in the
channel and stored in hexadecimal core location 40 when an
I/O interruption occurs.
If I/O interruptions have been
suppressed, the csw is stored when the next START 1/0 TEST
1/0 or HALT I/O instruction is executed.
The CSW is saved
when DEBUG is entered and has the following format:
l,

1•

1,

contents
0-3

Protection key moved from the CAW and used to
indicate the protection key under which I/O was
started.

4-1

Not implemented; currently set to zeros.

8-31

Next command address--a pointer to the core location
eight bytes greater than the address of the last
channel command word executed.

32-47

Status bits indicating the conditions in the device
or the channel that caused the CSW to be stored.

48-63

Residual count indicating the difference in the
number of bytes specified in the last executed
channel command word and the number of bytes which
were actually transferred.

Responses:
If the request is issued correctly, the contents of the CSW
are typed at the terminal in hexadecimal representation. A
carriage return is then issued and the keyboard is unlocked
to accept another DEBUG request. For an example of response
to the csw request see Figure 18~
INVALID DEBUG REQUEST
This response to the csw request indicates that one or more
operands have been specified. Reissue the request in its
proper format.

228

DEBUG - CSW

DEF
Fornlat:
DEF

symbol hexloc < bytecount > I
4

symbol

I

is the name to be assigned to the core
derived from the second operand. hexloc

hexloc is

address

the hexadecimal core location. relative to the
current origin" to which the name specified in the
first operand ~s to be assigned

bytecount is a decimal number between 1 and 56 inclusive
which specifies the length attribute (in bytes) of
the symbol specified in the first operand.
usage:
The DEF request allows the user to assign a symbolic name to
a specific core address and to refer to that address in
other DEBUG requests by the assigned name. The symbol name
is specified as the first operand of the DEF request. It
may be from one to eight characters in length, must contain
at least one non-numeric character. and the first character
of the symbol name should not be an asterisk. Any name
longer than eight characters wi11 be left-justified and
truncated on the right.
The second operand specifies a hexadecimal number which is
added to tne current origin as established by the ORIGIN
request. The sum of these two values is the core address to
which the symbol name is assigned.
The third operand is optional and. if given, must specify a
decima.l number between 1 and 56 inclusive..
This number is
the length attribute in bytes of the symbol name.
If the
third operand is omitted" a default attribute of four bytes
is assigned.
When DEF is issued,. an entry is made in the DEBUG symbol
table indicating the symbol name, the core address to which
it is assigned, and the length attribute of the symbol.
Symbols remain defined until a new DEF request is issued for
them or until the user obtains a new copy of CMS by issuing
an IPL request in the Debug environment or in the control
Program environment.
If DEF is issued spe~ifying
a symbol that has been
previously defined. the previous core address is replaced by
the more recent core address for that symbol in the DEBUG
symbol table. DEF requests specifying additional symbol
names for core locations to which a symbol name has already
DEBUG - DEF

229

been assigned cause additional entries in the DEBUG symbol
table so that multiple symbols may be assigned to the same
core address.
Notes:
a. Only sixteen symbols may
environment at any given time.

be

defined

in

the

Debug

b. Issuing a new ORIGIN request does not affect core
addresses to which previously defined symbols are assigned.
c. Symbols assigned using DEF are
the Debug environment.

defined for use

only in

Responses:
If DEF is issued correctly. a carriage return is given and
the keyboard is unlocked to accept another DEBUG request .•
INVALID DEBUG .REQUEST
This response to DEF indicates that less than two or more
than three operands have been specified~
Reissue the
request in its correct format.
INVALID ARGUMENT
This message indicates that the name specified in the first
operand contains all numeric characters. the second operand
is not a valid hexadecimal number,. or the third operand is
not a decimal number between 1 and 56 inclusive.
INVALID CORE-ADDRESS
This response is given when the sum of the second operand
and the current origin is greater than the user·s virtual
core size. If the current origin value is unknown., reset it
to the desired value by issuing the ORIGIN request and
reissue the DEF request.
16 SYMBOLS ALREADY DEFTNED
If this message is given, the DEBUG symbol table has been
filled and no new symbols may be defined until the current
definitions ~re cleared by obtaining a new copy of eMS.
However;, existing symbol may be assigned to a new core
lopation by issuing another DEF request for that symbol.
Examples:

a. DEFINE IN1 12F5A
The
IN1
The
and

current origin value is added to 12F5A and the symbol
is assigned to the resulting hexadecimal core address.
default length attribute of 4 is assigned to symbol IN1,
an entry for IN1 is made in the DEBUG symbol table.

b. DEFINE K 13 l2
The currently defined or1g1n is added
value 13, and the resulting address is
230

DEBUG - DEF

to the hexadecimal
assigned the symbol

K. An entry for R is made in the DEBUG symbol
its length attribute is 12 bytes.

DEBUG - DEF

table. and

231

DUMP
Format:
symbol 1
DUMP

ident

< hexloc 1

o

symbol 2
hexloc 2>

*

3

,
I

I
I

ident indicates the name by which the printout is identified
symbo11 is a name assigned (using DEF) to
at which the dump is to begin
hexlocl is

the hexadecimal core location., relative to the
current origin,. at which the dump is to begin

symbol2 is a name assigned (using DEF) to
at which the dump is to end
hexloc2 is

*

the core address

the core address

the hexadecimal core location,. relative to the
current origin~ at which the dump is to end

indicates that the dump is to end at the
the user·s virtual core

last address of

Usage:
This request is used to dump the contents of all or part of
the offline printer. The
the user's virtual core on
information has the heading ·ident FROM symbol1 TO symbol2"
where ident is the identifier specified as the first operand
of the DUMP request.
The second and third operands specify the portion of core
which is to be dumped, and are optional. If omitted, the
core address specified in the most recent DUMP request is
used or, if no previous DUMP request has been issued, one
word (four bytes) of core is dumped starting at location o.
If the second and third operands are specified, the core
addresses to which they refer
are determined in the
following way.
If the
second operand
contains any
non-numeric character, the DEBUG symbol table is searched
for a matching symbol entry. If a match is found the core
address to which that symbol name is assigned is used as the
address at which the dump is to begin. If no match is found,
or if the operand contains only numeric characters, the
current origin as established by the ORIGIN request is added
to the specified operand.
The resulting core address is
used as the beginning address of the dump, provided it is
not greater than the user's virtual core size.
The core
address at which the dump is to end is given by the third
operand of the DUMP request.
If an asterisk is specified
l,

232

DEBUG - DUMP

for this operand. all of core from the starting address to
the end of core is dumped.
If an asterisk is not specified
as the third operand. the same procedure is used to
determine the ending address of the dump as that described
above for the starting address.
Both addresses must be
within the address range of the user's virtual core, and the
address specified in the third operand must be greater thanthat specified in the second.
The first three lines of output from the DUMP request give
the contents of general-purpose registers 0-7 and 8-15, and
the floating-point registers 0-6.
Thereafter, the contents
of the specified portion of core are given, 32 bytes per
line. The core address of the first byte in the line is
given in the left-most column of the dump and is always an
even doubleword boundary,.
The alphameric interpretation for the 32 bytes is pri,nted to
the right of the specified hexadecimal locations.
Responses:

A carriage return is issued and the keyboard is unlocked to
accept another DEBUG request.
The requested information is
printed offline as soon as the printer is available,.
INVALID DEBUG REQUEST
No. two" or more than three operands have been specified in
the DUMP request. Reissue the request,. specifying one or
three operands.
INVALID ARGUMENT
This message is given if the address specified by the third
operand is less than that specified by the second operand or
the second and/or third operands cannot be located in the
DEBUG symbol table and are not valid hexadecimal numbers.
If either operand is intended to be a symbol, a DEF request
must previously have been issued for that symbol: if not.
the operand must specify a valid hexadecimal core location.
INVALID CORE-ADDRESS
The hexadecimal number specified in the second or third
operand" when added to the current origin. is greater than
the user's virtual core size. If the current origin value
is unknown reset it to the desired value by issuing ORIGIN
and reissue the DUMP request.
i,

Example:
DUMP NEUC 0000 05FO
The contents of core from locations 0000 to 05FO(each plus
the current origin) are printed on the offline printer and
identified by the heading NEUC. See Figure 19 for a sample
of this output, where the origin value is o.

DEBUG - DUMP

233

SEOC:

PROII

000 TO

05FO

GR C-7
Gli 8-F'
PPREGS

ClIC5C2E4
00000004
OOOOOOCC

00009610
00000100
00000000

00009B10
C4C5C2E4
00000000

00000000
C74C4040
00000000

00000778
OCOOA3BO
00000000

000029AC
00000l.l0
00000000

000001:<0
000026C!
00000000

000(0048
000013BO
00000000

o CO 00 0
000020
oece4e
000060
o CO 08 0
oeOCA 0
o OOOCO
OCOCEC

800094CO
000400CA
00OOO2ce
00040000
OOOODOO\)
ooooocec
00003000
OOOOOOOC

60009580
60009516
DC 000000
00002288
00000000
00000000
00000000
00000000

C 0000002
OOCOOO 05
0000A048
00C40000
00000000
00000000
00000000
00000000

60000050
6COODOC2
00000000
OOOOBBOO
OOOOOOOC
00000000
00000000
0000CFA2

020n810
00000000
000 1f69E
00000000
ClIC5C2E4
00000000
CCOOOOOO
010058CO

000013BO
00000000
00000000
0000BC2C
c14C4040
00000000
00000000
00EC07FC

PFOtOCee
FF040009
00000000
0004CO(C
00016D1E
OOOOOOOC
00000000
00000000

8003F29S
0000223E
OOOOBDOO
OOCC05.1 C
00000000
00000000
00000000
00000000

0001CC
000120
OC0140
000160
OC0180
0001 AO
o CO 1C C
0(01EO
000200
0(0.20
o C0240
000260

000001FC
40001561
00OC29AC
00003 AAO
c 3D 30906
00009386
oooooooe
0000019C
03000000
CCOO0238
0407110 D5
00000000

00000000
OCOCA76C
00000009
C00400CA
00()09 E10
4COO57E8
OGOOOOOO
00000000
C3D6DSF1
00J0023C
00000000
OCOCOOOC

00040000
00009B10
900015611
400051P4
C3D3D9D6
000011BO
00000000
00000000
00000000
000026CE
00000000
OCOOOOOO

OOOCCCCC
00000000
C74CQCQC
000057f8
000C5CA8
400C9511C
0003EOOO
OAooe • .:£
C3D&ISf1
ooocecce
OOOCCCCC
00000000

CCO()OOCA
00000778
000CA438
000051 P8
0003E8B8
OCOCOO06
00012000
6CCCOC82
00000000
OA82CIIE4
enccoeoc
00000000

0002CO
OC02EO
00030.0

OOOOJ2C4
F04BF 3FE
00000000

F04BFOF2
00000000
00000000

40F2P04B
00000000
OOOOOOOC

P5P04ff5
00000000
oooocecc

F3151117
00000000
ccccocea

* ••• D•• B. T.0.01.0.02 20.50.53 ••• *
*0.3& •••••••••••••••••••••••••••• *

o Co 3E C
00040.0
oe042e
OC0440
000 .. 60
0(0480
0004AO
OG04CO
o C0 4E 0
o C050 0
o CO 52 0
J CO ~ II 0
J CO 560

OOOOOOCC'
00091)000
oe001 e5C
C7C)C8F1
01810000
00001C50
OCuO()OOO
ooeo HF8
000C9828
00003504
OOOC19FO
OeO(0778
0000CC88
0000 1A 58
SOCOOOO(i
4180C02C
494C50ce

00000000
C4E2D2F 1
OCOCOOOO
00000000
C4E2D2FII
01060000
00000&10
CCOC19C0
00OO049C
CC0031FO
CC00237C
00000000
eCFFFFFI'
00000& AS
98030038
ce22111 FO
5000078.F

000003PII
00001050
D9C4 D9 F1
o 180000C
OC001050
C3D91l3f1
00000400
00009EF6
00001A9C
000032P8
0000011e
00000000
00003810
00000000
41EOCO&O
C08!l4190
8756c04S

0000C3F9
0191CCC6
00000000
E3C1DiF1
00000000
ccocecec
OOOO;;C1S
000014CO
000CC4F9
0000SES8
00000£10
COOCCCCC
00003880
0000EAC8
98I1BCCF:<
C0409180
QOIlOCC':A

OC040000
C4f0000000 00000000 00000000
*** DUPL.ICATE ceRE LOCATICNS ***
g:i1At95E 40 E37EPO 4BPOf161
15171700 00000000 00000000
OOOOOOCO 00000000 00000000
*** DUPLICATE CORE LOCATION S • **
00000000 00000000 OJOOOOOO
C3 D6 D5F 1 0000C2EO C 19CGCC8
01920000 C4E2D2P3 OCOC1C50
I)OOCOOC( OOOEOOOO
0709 D5 P1
E3c1C7F2 OOOOCOOC oeoooooo
019COOO8 C4 E2D2P6 00001050
0OO011EO 00009774
C3 &6D5F1
00002C98 OOGOBBBC OCG019CO
00010408 00001A28 00000&00
oaaot! [;[0 00001EAO OCoeOE3c
00000525 OOCO 93Ab 00001(i60
00000545 000057cA OCJ010FF8
00009810 0000C569 0OO09DFC
00000585 OOOOBAEC 0000 BAFII
05c0900 F C162D203 C1920000
41FOC05c 49409000 078F87SA
0701'8756 CJ34585J CuFb4940

Figure 19'.

234

* •........••...••........•..... ~. •
* ..................................

* .........•........ 6 .............. *
* ................................•

........•
* ................. DEBUG
* ..........................................
*........................................ *
* ................................... *
..... 0 ..............................................

* ••••••••••• LEBO •••••••••••••••• *
* •••••••••••••••••••••••• G
•• 11 ••• 5 ••• 8*
*CLRO •••••••••••••••• CLBO •••••• Y.*

.......

* ..................••

* ................. •• r ••••

.. ..... *

* •••••• 0 ••••••••••••••••••••••••• *

* .•.••.. V•••• COIiS •••••••••••••••••

* •••••••• liAIT

COR1 •••• COR1 •••• *

* ....•...••.......•......•....• DU·
*IIP BEOC 000 05fO •••••••••••••••• *

•................................ *
* ..................................

* ..• u•••••••••••••••••••••••••••• *

* ••••••••••••••• 8 •••••••••••••••••
*......•..•...•. 0 •••••••••••••••• *
•••••••••••••••• 4 ••••••••

e

_
o

•••••••

* •••••••• A.I.& •••••••••••••• 2 • • • *
* ••••• 0 ••• •• •••••• • 0 ••••• •.•.•. *
••• 0 •• *
*. ••••••••••• 6.

. ........

Sample DUMP output from the offline printer

DEBUG - DUMP

-

GO

Format:
GO

< symbol>
hexloc

symbol is a name that has been assigned by the DEF request
to the core address at which execution is to begin
hexloc is

the hexadecimal core location, relative to the
current origin~ at which execution is to begin

Usage:
The GO request
causes the user to
leave the Debug
environment and begin execution at a user-specified address
or at the address contained in bits 40-63 of the old PSW for
the interrupt which caused DEBUG to be entered. This PSW is
saved when DEBUG is entered,. and is loaded as the current
PSW when GO is issued,. If an operand is specified in the GO
request r,
the instruction address portion of the PSW is
altered to contain the address indicated by that operand
before the PSW is loaded.
The core address indicated by the GO operand is determined
in the following
way.
If the operand
contains any
non-numeric characters. the DEBUG symbol table is searched
for a matching symbol I.!ntry. If a match is found" the core
address to which that symbol name is assigned is used as the
location at which execution is to begin. and is moved to the
saved old PSW. If no match is found in the DEBUG symbol
table, or if the operand contains only numeric characters,
the current origin (as established by the ORIGIN request) is
added to the specified operand and the resulting address
moved to the PSW provided it is not greater than the user's
virtual core sizl.!.
1,

Prior to loading the PSW. the general-purpose registers,
channel address word, and channel status word are restored
to their contents as they existed when DEBUG was entered,
or, if they have been modified by the user in the Debug
environment, to their modified contents.
The saved old PSW
is then loaded to become the current PSW, and execution
begins at the specified instruction address.
Notes:
a. GO should not be issued without
Debug environment has been entered
external" or program interrupt.
h. lihen
time in

an operand unless the
due to a . breakpoint,

an operand is specified, GO may be issued at any
the Debug environment, except when DEBUG has been

DEBUG - GO

235

entered to
it.

set breakpoints in

a program prior

to starting

c. If an operand is specified in the GO request, the address
to which it refers must be the core location of an operation
code.
Responses:
If GO is issued successfully, there is a carriage return and
execution coninues from the address contained in the loaded

psw.

INVALID DEBUG REQUEST
This response ~9:ndicates that more than one operand has been
specified in the ',GO request. Reissue the GO request in its
correct format.
INVALID ARGUMENT
An operand specifaed in the GO request cannot be located in
,the DEBUG symbol table and is not a valid hexadecimal
"number. If the operand is intended to be a symbol. a DEF
request must have been previously issued for that symbol: if
not!. the operand must specify a valid hexadecimal core
location.
INVALID CORE-ADDRESS
The address at which execution is to begin is not on a
halfword boundary (indicating that an operation code is not
located at that address) or the sum of the GO operand and
the current origin value is greater than the user's virtual
core size. If the current origin value is unknown, it may
be reset to the desired value by issuing the ORIGIN request.
INCORRECT DEBUG EXIT
The GO request has been issued without an operand when DEBUG
dhad not been entered due to a breakpoint, external"
or
program interrupt. The IPL ,• KX, or RESTART requests may be
issued, GO may be issued with an operand, or RETURN may be
issued if DEBUG had been entered via the DEBUG command.
Examples:

a. GO
The old PSW for the interrupt that caused DEBUG to be
entered is loaded as the current PSW, and execution begins
at the address specified in bits 40-63 of that PSW,.
b. GO INN

The DEBUG symbol table is searched for symbol INN and the
~;address to which that symbol is assigned is loaded into bits
t.l,{~·O:-63 of the old PSW prior to loading it as the current psw •
., Control passes from the Debug environment and execution
begins at the core address to which symbol INN refers.

236

DEBUG - GO

c. GO 12345
The current or1g1n is added to location 12345 and the
resulting address placed in bits 40-63 of the old PSW prior
to loading it as the current psw. Control is transferred
from the Debug environment and execution begins at the
specified address.

DEBUG - GO

237

GPR

Format:
GPR

reg1 < regN > I

reg1 is a decimal number from 0-15 inclusive, indicating the
first or only general-purpose register whose contents
are to be typed.
regN is a decimal number from 0-15 inclusive, indicating the
last general-purpose register whose contents are to be
typed.
Usage:
The GPR request is used to inspect the contents of one or
more general-purpose registers as they existed when DEBUG
was entered. If only one operand is given, the conten~s of
the specified register are typed at the terminal..
If two
operands are given, the contents of the registers specified
by the first throuqh the second operand, inclusive, are
typed.
The first and second operands must be decimal numbers from
0-15, and the second operand must be greater than the first.
Responses:
If the request is issued correctly~ the contents ,of the
register (s) specified are typed at the terminal{, one per
line. Following a carriage return, the keyboard is unlocked
to accept another DEBUG request.
INVALID DEBUG REQUEST
This message indicates
have been specified.
format.

that none or more than two operands
Reissue the request in its proper

INVALID ARGUMENT
This response is given if the operand(s) specified are not
decimal numbers between 0 and lSi, or if the second operand
is less than the first.

Examplep:

a. GPR 8
The contents of general-purpose register 8 as it existed
when DEBUG was entered are typed at the terminal.
See
Figure 20.
b. GPR 5 15
The contents of general-purpose registers 5 through 15,
inclusive, are typed as they existed when DEBUG was entered,.
238

DEBUG - GPR

See Figure 20.
gpr 8
002AIA88
gpr 5 15
000A5DD8
002AIA88
00009B38
002AIA88
00000100
80009670
B0009FBA
600095C2
000llD40
0000550C
000095B8

Figure 20.

Examples of the GPR request

DEBUG - GPR

239

IPL
Format:
IPL
Usage:
The IPL request causes control to transfer from the Debug
environment to the eMS Command environment.
IPL may be
issued any time the keyboard is unlocked in the Debug
environment regardless of the- circumstances by which DEBUG
is entered.
Responses:
CMS ••• VERSION nn LEVEL mm
This indicates that IPL has successfully executed and
control has passed from the Debug environment to the CMS
Command environment. The keyboard is unlocked to accept any
CMS command.
INVALID DEBUG REQUEST
This indicates that one or more operands have been specified
in the IPL request. Reissue the request in its correct
format.

240

DEBUG - IPL

KX
Format:
KX

Usage:
The KX request closes all open files and I/O devices.
updates the user·s file directory, and reIPL's CMS.. This
request may be issued whenever the keyboard is unlocked in
the Debug environment:. regardless of the circumstances by
which DEBUG is entered,.
Responses:
KILLING CMS EXECUTION • • •
CMS ••• VERSION nn LEVEL mm
This indicates that RX has executed,. eMS has reIPL' ed. and
and control has passed to the CMS command environment. The
keyboard is unlocked to accept any CMS command.
INVALID DEBUG REQUEST
This indicates that one or more operands have been specified
in the KX request.
Reissue the request in its correct
format.

DEBUG - KX

241

ORIGIN
Format:
ORIGIN

I symbol
I hexloc

1
1

symbol is any name that has
by the DEF request

been assigned to a core address

hexloc is any hexadecimal core location between 0
end of the user·s virtual core

and the

Usage:
This request allows the user to specify an origin, or base
address. which is added
to the hexadecimal locations
specified in other DEBUG requests.
For example, the ORIGIN
request enables users to specify instruction addresses
relative to program load points, rather than to 0, while
operating in the Debug environment. If the ORIGIN request
is not issued, all hexadecimal locations specified in DEBUG
requests are assumed to be relative to 0,.
lihen ORIGIN is issued!. the origin setting is determined in
the following way.
If the ORIGIN operand contains any
non-numeric characters!. the DEBUG symbol table is searched
for a matching symbol entry. If a match is found, the core
address to which that symbol name is assigned becomes the
new origin setting.
If no match is found in the DEBUG
symbol table, or if the operand contains only numeric
characters the address specified in the operand becomes the
origin setting.
j,

Any origin set by an ORIGIN request remains in effect until
another ORIGIN request or a RESTART request. is issued, or
until the user obtains a new copy of eMS. Whenever a new
ORIGIN request is issued, the value specified in that
request overlays the previous origin setting. If the user
obtains a new copy of eMS or issues a RESTART request, the
origin is set to 0 until a new ORIGIN request is issued,.
Responses:
If the request is issued
return and the keyboard is
request.

correctly, there is a carriage
unlocked to accept another DEBUG

INVALID DEBUG REQUEST
This response indicates that the wrong number of operands
have been specified.
One and only Qne op~rand must be
specified.

242

DEBUG - ORIGIN

INVALID ARGUMENT
The operand specified in the ORIGIN request cannot be
located in the DEBUG symbol table and is not a valid
hexadecimal number. If the operand is intended to be a
symbol. a DEF request must have been previously issued for
that symbol: if not t•
the operand must specify a valid
hexadecimal core location.
INVALID CORE-ADDRESS
The address specified by the ORIGIN operand is greater than
the user·s virtual core size.
Examples:
a. ORIGIN 12000
The origin is set to the hexadecimal value of 12000. 12000
is added to all hexadecimal locations specified in other
DEBUG requests and the resulting core address is referenced.
b. ORIGIN XYZ5
The absolute address assigned to symbol XYZ5 (provided an
entry for XYZ5 exists in the DEBUG symbol table) becomes the
new origin
setting.
This setting
is added
to all
hexadecimal locations specified in other DEBUG requests:. and
the resulting core address is referenced.

DEBUG - ORIGIN

243

PSW
Format:
PSW
Usage:
This request types the contents of the old program status
word for the interrupt that caused DEBUG to be entered. If
DEBUG was entered due to an external interrupt" the PSW
request causes the contents of the external old PSW to be
typed at the terminal. If a program interrupt caused DEBUG
to be entered, the contents of the program old PSW are
typed.
If DEBUG was entered for any other reason, the
following is typed in response to the PSW request:
01000000xxxxxxxx
where the 1 in the first byte means that external interrupts
are allowed and xxxxxxxx is the hexadecimal core address of
the DEBUG program.
The fields of the

PS~

follow.

Bits

contents

0-1 System mask, indicating the sources which are allowed to
interrupt the cPU.
8-11

Protection key, used to determine
location may be written into.

12

ASCII flag, indicating whether ASCII-8 or
is to be used.

13

Machine check flag,
machine check occurs.

14

Wait state flag,
the wait state.

15

Problem state flag, set to 1 when the machine is
operating in
the problem state rather
than the
supervisor state.

16-31

Interrupt code, showing the source of the interrupt
for external interrupts or the cause of the interrupt
for program interrupts.

32-33

Instruction length code., indicating the length;, in
halfwords, of the instruction being executed when a
program interrupt occurred (unpredictable for external
interrupts).

34-35
244

which is

set

if

to

which is set to 1 when

Condition code,

which

reflects

DEBUG - PSW

a given

core

EBCDIC code
1 whenever

a

the CPU is in

the result

of

a

previous arithmetic. logical, or I/O operation.
36-39

Program mask, indicating whether
program exceptions
are allowed to
interrupts.

or not
cause

various
program

40-63

Instruction address, giving the location of the next
instruction to be executed for program interrupts' or of
the instruction last executed for external interrupts.

For a further discussion of program status words and their
IBM
System/360
use.,
refer
to
the
IBM
manual/.
Principles of Operation.
Responses:
If the request is issued correctly., the contents of the
appropriate PSW are typed in hexadecimal representation at
the terminal, followed by a carriage return and an unlocked
keyboard. See Figure 18 for an example of response to the
PSW request.
INVALID DEBUG REQUES~
This response indicates that the user has specified one or
more operands in the PSW request. Reissue the request in
its correct format.

DEBUG - PSW

245

RESTART
Format:
RESTART
Usage:
RES~ART
request is equivalent to the IPL request.
RESTART
causes control
to transfer
from the
Debug
environment to the CMS Command environment. RESTART may be
issued any time the keyboard is unlocked in the Debug
environment, regardless of the circumstances by which DEBUG
has been entered.
~he

Issuing RESTART causes a new copy of the CMS nucleus to be
brought into core from the system disk.
This new copy
overlays the user·s former copy of the nucleus. causing all
symbols which had been previously defined by DEF requests to
be cleared from the DEBUG symbol table.
Responses:
CMS ••• VERSION nn LEVEL mm
This response indicates that
RESTART has successfully
executed and control has passed from the Debug environment
to the CMS Command environment. The-keyboard is unlocked to
accept any CMS command.
INVALID DEBUG REQUEST
One or more operands have been specified in the RESTART
request. Reissue the request in its correct format.

246

DEBUG - RESTART

RETURN
Format:
RETURN
Usage:
-rhis request is a means
of exitting from the Debug
environment to the CMS Command environment. It should be
used only when DEBUG has been entered by issuing the DEBUG
command.
When RETURN is issued" the general-purpose registers are
restored with the information they contained at the time
DEBUG was entered or, if the user has specified a change to
this information while in the Debug environment, with the
changed information. In either case, register 15, the error
code register, is set to zero. A branch is then made to the
address contained in register 14, the normal CMS return
register. If DEBUG is entered by issuing the DEBUG command,
register 14 contains the address of a central CMS service
routine and control transfers directly to the CMS Command
environment ..
Responses:
R;T=xx.xx/XX.XX
The Ready message followed by a carriage return and an
unlocked keyboard indicates that the RETURN request has
successfully executed and control has transferred from the
Debug environment to the CMS Commend environment. After this
message is typed, the keyboard is unlocked to accept any eMS
command.
INVALID DEBUG REQUEST
This message is given if one or more operands have been
specified in the RETURN request. Reissue the request in its
correct format.
INCORRECT DEBUG EXIT
If DEBUG is entered due to a program or external interrupt,
a breakpoint, or an unrecoverable error, this message is
typed in response to the RETURN request. To exit from the
Debug environment under the above circumstances,
issue GO
with an operand, IPL"
or RESTART. The GO request may be
issued with no operand if DEBUG has not been entered due to
an unrecoverable error.

DEBUG - RETURN

241

SET
Format:

SET

I
I
I
I

CAW
CSW
PSW
GPR

hexinfo
hexinfo
hexinfo
reg



hexinfo 

CAW

the specified information is to be stored in the
channel address word that existed at the time DEBUG
was entered.

csw

the specified information, is to be stored in the
channel status word that existed at the time DEBUG
was entered.

PSW

the specified information is to be stored in the old
program status word for the interrupt that caused
DEBUG to be entered.

GPR

the specified information is to be stored
general-purpose register given as the second

in

the

op~rand.

usage:
The SET request is used to change the contents of control
and general-purpose registers which are moved from their
normal locations when the DEBUG environment is entered. The
contents of these registers are restored when control
transfers from DEBUG to another environment.
If register
contents have been modified in DEBUG the changed contents
are restored.
t,

The register that is to be modified is specified as the
first operand of the SET request"
and the information to be
inserted in this register is given in hexadecimal format in
the hexinfo operand(s). Each hexinfo operand should be from
one to four bytes (that is, two to eight hexadecimal digits)
in length. If an operand is less than four bytes and
contalns
an
uneven
number
of
hexadecimal
digits
(representing half-byte information) the information is
right-justified and the left half of the uneven byte is set
to 0;, as shown in Example b. If more than eight hexadecimal
digits are specified in a single operand. the information is
left-justified and truncated on the right, as shown in
Example d.
The number of bytes that can be stored. using the SET request
varies depending on the form of the request.
With the CAW
form, up to four bytes of information may be stored.. With
the CSW"
GPR,
and PSW forms,
up to eight bytes of
information may be stored, but these must be represented in
two operands of four bytes each.
When two operands of

248

DEBUG - SET

----------------information are specified, the information is stored in
consecutive locations" even if one or both operands contain
less than four bytes of information, as shown in Example b.
The contents of registers that have been changed using the
SET request are not typed after the request has been issued.
To inspect the contents of these registers, the CAW" CSW.
PSW, or GPR requests are issued as needed.
Figure i7
contains examples of issuing these requests both before and
after SET has been issued.
Responses:
If the request is issued correctly"
a carriage return is
issued and the keyboard is unlocked to accept another DEBUG
request.
INVALID DEBUG REQUEST
This response indicates that the wrong number of operands
have been specified. If the CAW is set, two operands must be
given. To set the CSW or the PSW, two or three operands are
required. TO set a GPR. three or four operands must be
given.
INVALID ARGUMENT
This message indicates that either the first operand is not
CAW, CSW, PSW or GPR. the first operand is GPR and the
second operand is not a decimal number between 0 and 15
inclusive, or one or more of the hexinfo operands does not
contain hexadecimal information.
Examples:

a.
SET CAW 1100
This example causes the two-bytes 1100 to be placed in the
first, two bytes of the channel address word that existed
when DEBUG was entered.
See Figure 18. This new channel
address word is restored when an exit is made from the DEBUG
environment.
h.
SET CSW 001 00FF81
Since an uneven number of bytes is specified in the second
operand, a zero is placed in the left-frost half-byte" giving
0001. These two bytest, together with the three bytes given
in the third operand are placed as a single five-byte field
into the csw that existed when DEBUG was entered.
See
Figure 18.
This new channel status word is restored when
leaving the DEBUG environment.
c.
SET PSW 01000000 00012036
The contents of the entire program status word for the
interrupt that caused DEBUG to be entered are replaced by
these eight bytes of information.
See Figure 18. This PSW
becomes the current psw when an exit is made from the DEBUG
environment.

DEBUG - SET

249

d.
SET GPR 5 000012345
The contents of general-purpose register 5 are replaced with
the information given in the ,third operand. Since this
information is greater than eight hexadecimal digits. it is
left-justified and 'truncated on, the right. giving 000.012311.
See Figure 18. General-purpose register 5 contains this new
information when the general~purpose registers are restored
prior to leaving the DEBUG environment.

caw
00010FE8
set caw 1100
caw
11000FF8
csw
00010FF8OC000005
set csw 001 00ff8l
csw
000100FF81000005
psw
01000000000095B8
set psw 01000000 00012036
psw
0100000000012036
gpr 5
00007F68
set gpr 5 0000123Q5
gpr 5
00001184
Figure 18.
Examples of the SET request, using other
requests as appropriate to inspect contents both before and
after SET is issued

250

DEBUG - SET

STORE

Format:
syrobol
STORE

hexinfo


length

X

hexloc < n >
q

symbol is a name assigned by using the DEF request to the
core address of the first byte to be examined
hexloc

is the hexadecimal core location relative to the
currently defined origin of the first byte to be
examined

n is a decimal number from 1 to 56 inclusive, that specifies

the number of bytes to be examined
length is the length attribute
the first operand

of the syrobol

specified as

Usage:
This request is used to examine the contents of specific
locations in the user's virtual core, and causes contents to
be typed at the terminal in hexad·.!cimal form.
The first
operand of the request specifies the beginning address of
the portion of core to be examined.
This address is
determined in the following way.
If the operand contains
any non-numeric characters. the DEBUG symbol table is
searched for a matching symbol entry. If a match is found,
the core address to which that symbol refers is used as the
location of .the first byte to be examined. If no match is
found, or if the first operand contains only numeric
characters, the current origin as established by the ORIGIN
request is added to the specified operand and the resulting
core address is used as the location of the first byte to be
examined. provided that address is not greater than the
user's virtual core size.
The second operand of X is optional.
If specified,
it
indicates the number of bytes--up to a maximum of 56--whose
contents are to be typed. If the second operand is omitted.
a default value of 4 bytes is assumed unless the first
operand is a symbol; if it is, the length attribute which is
assigned to that symbol in the DEBUG symbol table is used as
the number of bytes to be typed.
Responses:
If the X request is correctly issued,. the information is
typed and, following a carriage return, the keyboard is
DEBUG - X

255

unlocked to accept another DEBUG request.
INVALID DEBUG REQUEST
This response indicates that no or more than two operands
have been specified in the X request.
Reissue the request
in its correct format.
INVALID ARGUMENT
This message is given when the first operand cannot be
located in the DEBUG symbol table and does not constitute a
valid hexadecimal number or the second operand is not a
decimal number between 1 and 56 inclusive. If the first
operand is intended to be a symbol. it must have been
defined in a previous DEF request; otherwise, the operand
must specify a valid hexadecimal number.
INVALID CORE-ADDRESS
The hexadecimal number specified in the first operand, when
added to the current origin, is greater than the cor~ size
of the machine being used. If the current origin value is
unknown, reset it to the desired value by issuing ORIGIN and
reissue the X request.
Examples:
a. X XYZ
The contents of core starting at the address to which symbol
XYZ is assigned are typed at the terminal. The number of
bytes typed is determined by the length attribute of symbol
XYZ as established in the DEF request for that symbol. See
Figure 22.

b. X OTHER 12
Twelve bytes of core are typed beginning with the core
address to which symbol OTHER has been assigned in a
previous DEF request. See Figure 22.

c. X 123
Since no byte count is specified, four bytes of core are
typed starting at the core address that is the sum of the
current origin value and the hexadecimal number 123. See
Figure 22.
d. X 123 32
Thirty-two bytes of core are typed, starting at the address
that is the sum of the current origin value and the
hexadecimal number 123. See Figure 22.

256

DEBUG - X

x xyz
00CCD501
def other 120
x other 12
0670897000031A7150170004

x 123
7000031A

x 123 32
7000031A715017000492EE7004D2037000C3Ic5910C35447BOCOE25010C35458
Figure 22.

Examples of the X request

DEBUG - X

257

SETERR
Purpose:
The SE~ERR command is used to trace transfers to and from
all SVC-called programs in which error conditions occur.
Format:
SE'l'ERR
Usage:The SETERR command sets error overrides that cause trace
information to be recorded for all SVC-called programs that
return ~ith an error code in general-purpose register 15.
The following information is recorded.
(1) A basic line consisting of the core locations of the
SVC instruction and of the program which it called, the
contents of the SVC old program status word, and the core
locations to which the SVC-called program would return under
both normal and error conditions.
(2)
The contents of all general-purpose registers, both
before the SVC-called program is given control and after it
issues a return.

(3)
The contents of all floating-point registers both
before the SVC-called program is given control and after it
issues a return.
(4)
Two lines--16 words--of the parameter list which exists
at the time the SVC is executed. See Figure 23 for a sample
of the type of information recorded by the SETERR command,
and the format in which this information is printed on the
offline printer.

The SETERR command causes the above trace information to be
recorded for all SVC-called programs that return error
codes.
This information is not printed until the user
issues a CLROVER or a ~O command, a RESTART request in the
Debug environment, or logs out from the Control Program.
Traces initiated by the SETERR command may be terminated by
issuing a CLROVER or a KO command,. Both CLROVER and KO
cause the trace information recorded up to the time they are
issued to be printed on the offline printer.
Notes:
a.
Issuing one or more SETERR commands when a SETOVER
command is active has no effect, since error as well as
normal overrides are set by SETOVER,.
258

SETERR

h. Issuing more than one SETERR command has no additional
effect other than causing the heading given under Output to
appear in the trace information printout each time a SETERR
is issued.
c.

Any operands given in the SETERR

co~roand

are ignored.

Responses:
None.
Output:
SETTING ERROR-OVERRIDE TO PROVIDE A DYNAMIC
TRACE OF CMS (AND OS) SVC-CALLS • • •
This message appears in the offline printout of
information at all points where SETERR commands
issued.

the trace
have been

Example:
SETERR
This causes information such as that given in Figure 23 to
be recorded for all SVC-called programs which return an
error code in general-purpose register 15.
Error Messages:
None.

SETERR

259

SETTING ERROR-OVERRIDE TO PROYIDE A DINARIC TRACE OF CBS (AID OS) SVC-CALLS •••
••••• ERROR-OVERRIDE,
CALLER=000057F2
GPRS BEFORE = E2C5E3C5
0000139C
00009386
00012000
FPfiS BEFORE = 00000000
00000000
GPRS AFTER
E2C5E3C5
0000139C
00000004
00000100
FPfiS AFTER
00000000
00000000
PARK.-LIST
--FINI---S
FFFFOOOO
00000000

CALLEE=FINIS
SYC-OLD-PSW=000400CA400057F4
00000000
00005816
00009B10
E~C5B3C5
00009508
00000001
400057E8
00001180
00000000
00000000
00000000
00000000
0000139C
00000000
00000778
000029DC
C6C9D5C9
E2404040
000040A8
OOOOOAlO
00000000
OOCOOOOO
00000000
00000000

--.

00000000

00000000

--.

00000000

--OYEB--

IB!BBT=o000057P8
018'1=0000511"8
00005018
0003B8B8
40009540
00001110
00000000
00000000
00000120
00000048
000026CE
00000006
00000000
00000000
5C40FPPP
.FFEIIID
--IIDB---BODD--

••••• EfiROR-OYERRIOE,
CALLER=000057F2
GPRS BEFORE = E2E3C1E3
0000139C
00009386
00012000
HRS BEFORE = 00000000
00000000
GPRS AFTER = E2E3C1E3
0000139C
00000004
00000100
FPBS AFTER = 00000000
00000000
PARK.-LIST = --FINI---S
FFFFOOOO
00000000

CALLEE=FIHlS
SVC-OLD-PSW=000400CA400057F4
00000000
00005816
00009B10
E2E3(lB3
00009508
00000001
400051£8
oooe 11BO
00000000
00000000
00000000
00000000
0000139C
00000000
00000718
OCOC29DC
C6C9D5C9
E2404040
000040A8
00000110
00000000
00000000
00000000
00000000
--TEST--

HRBIET=000057P8
EBRE~000057~
000050A8
0003E888
40009540
000011&0
00000000
00000000
00000120
00000048
000026CE
00000006
00000000
00000000
5C40Fl"FP
l'l'l'BFl"FD
--FOBT--

••••• ERBOR-OVERRIDE.
CALLER=00009514
GPIiS BEFORE = E2E3C11!3
00009B10
00009386
00012000
FPRS BEFORE
00000000
00000000
GPIiS AFTER = E2E3C1E3
00009B10
00000004
00000100
!!PBS AFTEB = 00000000
00000000
PAR!I.-LIST = --STAT---E
FFFFFFFF
FFFFFFFF

CALLEE=STATE
SVC-OLD-PSW=000400CA60009516
00000000
00000000
00009B10
E2!3C1E3
C0009508
CC000001
40009378
800094CO
00000000
00000000
00000000
00000000
00009810
COOOOOOO
00000778
00002A84
E2 E3C1 E3
(5404040
00002BDO
ooooono
00000000
00000000
00000000
OOOCOCOO
--TEST---SYSI---Ii
FFFFFFFF
fFFFFFFF
FFFFFFFF
FFFFFlFF

HIBBET=0000951A
EBBET=0000951A
000050A8
0003E8B8
60009580
00000001
00000000
00000000
00000A20
00000048
000026CE
00000001
00000000
00000000
FFllFPl1
lFFIIllF
FFl"FFFFF
FFl"l"FFFF

••••• EFBCR-CVEBBltE.
CALLEB=000057F2
GPBS BEFORE = E21!3C1E3
0000139C
00009386
00012000
FPES BEFOFE = 00000000
00000000
GPRS APTER
E2E3C 1E3
0000139C
00000004
00000100
FPRS AFTER
00000000
00000000
PARK.-LIST
--FINI---S
FFFFOOOO
00000000

CALLEE=FINIS
SYC-OLD-PSV=000400CI.40Ce57F4
00000000
OC005816
00009B10
B2£3(lE3
00009508
00000001
400057f8
000C11BO
00000000
00000000
00000000
OCOOOOOO
0000139C
OCCOOOOO
00000718
000029DC
E2404040
000040A8
CcceCAlO
C6c9D5C9
00000000
00000000
00000000
00000000

--.

BB!lBE'f=000057F8
BBRET=000057F8
000050A8
0003E858
40009540
000011BO
00000000
00000000
00000120
00000048
000026CE
00000006
00000000
00000000
5C40FFFF
FFFEFFFD

••••• EIiRCR-OVEBRICE,
CALLER=000025C2
GPRS BEFORE
00000000
000C09EO
00000004
00000100
FPRS BEFORE
00000000
00000000
GPRS AFTER
00000000
0000091'4
00000004
00000100
FPRS AFTER
00000000
00000000
PARM.-LIST
--LOAO---f'!CD -00000000
00000000

CALLEE=LOADftOD 5VC-OLD-PSW=000400CA400C25(4
00009B10
COOOOOOO
00000778
000009E8
D3404040
40404040
40009378
4cce2~8E
oooooooc
COOOOOOO
00000000
00000000
00005838
00000000
00000778
00002100
00001180
000026CE
00002FOC
00CCOE7C
COOOOOOO
OCCOOOOO
00000000
00000000
--L
fFOOOOOC
--CPFU-OOOOOCOO
CCC400CA
5000E692
00000000

BBBBET=000025C8
EBBET=000025F8
00000A20
00000048
000007B 8
00000000
00000000
00000000
OOOOOAFO
00000044
000026CE
00000001
00000000
00000000
-- BC T1t-00011000
0000EE58
0800!~68

••••• ERROR-OVERRIDE,
CALLER=00009514
GPFS BEFCRE
00000000
00009B10
0000~386
00012000
FPRS BEFORE
00000000
00000000
GPBS AFTER
I:3C9E2E3
000115E8
0000F138
00001BA8
FPES AFTER
00000000
00000000
PAR fl. - LIST
--L
PPFPFPPF
FFPFFFFP

CALLEE=L
00000000
COC09508
00000(,00
00011000
D3C9 E2 E3
00000000
--TEST-PFPFFPFf

SYC-OLD-PSIi=000400CA50009516
00000000
0000981C
D3~(4C40
CCOOOOOl
40009378
800094CO
00000000
00000000
OCC(OOOO
OOCOOOOO
00000028
000002F8
00011470
000011E0
00000002
00000000
00000000
C(CCCOOC
--SISI---Ii
FFFFFlFF
FFFFFFF!
fFFEFFFF

HBBRE'l'=00009511
EBBE'f=0000951A
00005018
0003E888
40009500
00000001
00000000
00000000
00000000
00000000
000026CE
OOOOOOO~
OOCOOOOO
00000000
FFEIFfF!
IPIFIIIP
FFPFFFFF
FFFFFFFF

••••• E 6RCR-CVERRltE,
CALL ER=000057 F2
GPRS BEPORE
00000000
0000139C
00009386
00012000
FPES BEFCF!
00000000
00000000
GPES AFTER
00000000
0000139C
C0000004
00000100
FPES AFTER
00000000
00000000
PARfl.-LIST
--FINI---S
!FFFOOOO
00000000

SV C-OLD-PSW=OOO 40CCA 40 C(5 7F 4
CALLEE=FINIS
(OOOCOOC
00005816
00009B10
D3404040
00009508
00000001
400057E8
000C11BO
00000000
OJOOOOOO
00000000
OCOCOOOO
0000139C
OCCOOOOO
0000077 8
000029tc
(6 C9 D5 C9
E240ij040
000040U
OOOCCUO
00000000
COOOOOOO
00000000
OOC(OOOO

HBBBET=000057F8
EllRET=000057F8
0000501.8
000318£8
40009540
00001180
OOCOOOOC
00000000
00000120
00000048
000026CE
00000006
OOOOOOOC
00000000
5C40FIPF
IflElllD
--F
-BODD--

.* ••

tiOTE--NCE~AL-

00000000

00000000

--.

00000000

00000000

00000000

OOOOOO(lO

--.

00000000

--.

00000000

--.

OOOOOOOC

--TEST--

--LISt--

-FOB~-

AND ERROR-OVERRIDES EAVE NOW BEEN CLEARED ••••

Figure 23.

260

--.

Sample offline printout of trace information
recorded by the SETERR command

SETERR

SETOVER
Purpose:
The SETOVER command is used to trace transfers to and from
sVC-called programs which are executed normally as well as
those in which error conditions are encountered.
Format:
ISETOVERj
SAMELAST



 I

leaves all options as set by the user's last
SETOVER command provided a CLROVER has not been
issued. If SAMELAST is not speci'fied or if CLROVER
has been issued. options are reset to their
default settings.
Any options specified after
SAMELAST replace these settings.

optionl ••• optionN
below.

are one

or

more

of the

options

given

options:
GPRS

record
the contents of
the general-purpose
registers both before the SVC-called program is
given control and after a return from that program
GPRSB
record
the contents of
the general-purpose
registers only as they exist before the SVC-called
program is given control
GPRSA
record
the contents of
the general-purpose
registers only as they exist after a return from
the SVC-called program
The default option is that no general-purpose register
information is recorded .•
FPRS

record
the contents
of the
floating-point
registers both before the SVC-called program is
given control and after
a return from that
program.
FPRSB
record
the contents
of the
floating~point
registers only as they exist before the SVC-called
program is given control
FPRSA
record
the contents
of the
floating-point
registers as they exist after a return from the
SVC-called prograro
The default option is that no floating-point register
information is recorded.
NOPARM

PARM1

no parameter list information is to be recorded
when a program is called by an SVC instruction
record one line (8 words) of parameter list
information when a program is called by an svc
instruction
SETOVER

261

The default option is two lines (16 words) of the parameter
list recorded when a program is called by an SVC instruction
NOWAIT

no information is to be recorded when WAIT is
called by an SVC
WAITSAME record the same information for GPR·s, FPR·s, and
uarameter lists when WAIT is called as that
recorded for all other SVC-called programs
WAIT1
record one line (8 words) of the parameter list
when WAIT is called
~AIT2
record two lines of the parameter list when WAIT
is called
The default option is that no GPR, FPR, or parameter list
information recorded when WAIT is called
DEFAULT

cancel a1l current settings
to their default settings

and reset the options

Usage:
The SETOVER command traces all internal branches which take
place due to SVC, or supervisor call, instructions.
The
effect of the SETOVER command is to set overrides which
cause information to be recorded at the appropriate times.
Both normal and error overrides are set by the SETOVER
command.
The information recorded will vary:. depending on the type of
override. For both normal and error overrides, the core
location of the calling SVC instruction and the name of'the
called program or routine are recorded, as well as the
contents of the SVC old program status word (that is, that
which was stored when the SVC was issued) and the core
locations of the normal and error returns from the called
program. In addition to this basic line, error overrides
record
the
contents
of
the
general-purpose
and
floating-point registers before branching to the SVC-called
program and returning from it, and 16 words of the parameter
list which existed when the SVC was issued. For normal
overrides, the additional information recorded depends upon
the options specified by the user in the SETOVER command.
If no options are specified, the default options are used:
no general-purpose or floating-point register information,
and 16 words of the pararoeter list are recorded for all
routines except WAIT.
For WAIT only the basic 'line of
information, common to both normal and error overrides" is
recorded. When the user does specify options, the default
settings are assumed initially. and options specified by the
user replace the appropriate default settings. If the user
specifies SAMELAST as his first option, the options remain
as they were set by the last SETOVER command issued provided
no CLROVER command has been issued, and any further options
given in the SETOVER comroand replace these previously set
options.
It is possible to issue two
262

or more SETOVER commands before

SETOVER

issuing a KO or a CLROVER command. When additional SETOVER
commands are issued, the option settings are adjusted to
reflect those specified in the most recent SETOVER command.
If SAMELAST is not specified as the first option in these
additional commands, the options are reset to their default
settings, and only those options specified by the user in
the new SETOVER command replace the default settings.
""

To terminate overrides set by the SETOVER command, the user
may issue a KO or a CLROVER command. Both CLROVER and KO
cause all trace information recorded up to the point they
are issued to be printed on the offline printer. CLROVER
can be issued only when the keyboard is unlocked to accept
input to the CMS Command environment,. To clear overrides at
any other point in system processing, KO must be issued. If
a user issues a RESTART request to the Debug environment or
logs" out from the Control
PrograF prior to clearing
overrides set by SETOVER and/or SETERR. the overrides are
cleared automatcially and all recorded trace information is
printed on the offline printer.
Notes:
a. If SAMELAST is specified, it must be the first option
given and there must be no intervening CLROVER between the
two SETOVER commands.
b. If mutually exclusive options are specified, such as
NOPARM and PARM1, the last such option appearing in the
SETOVER command is used. For options which are not mutually
exclusive--GPRS
and
GPRSA, for
example--the
logical
combination of the options is used.
In this case, the
option set by GPRS would be used since it includes the GPRSA
option.
c.
The number of lines of parameter list information
recorded for calls to the WAIT routine cannot exceed that
recorded for other routines, (that is, the" PARM setting
governs the WAIT setting when the latter specifies the
greater number of lines to be recorded.
Responses:
None.
output:
SETTING NORMAL - AND ERROR-OVERRIDES TO PROVIDE
DYNAMIC TRACE OF CMS (AND OS> SVC-CALLS... • •
This message appears in the offline printout of trace
information at all points where SETOVER commands are issued.
A

Examples:
a.
In

SETOVER
addition to

the

basic

information recorded

SETOVER

for

both
263

normal and error overrides, this example causes the default
information (no general-purpose or floating-point register
information and two lines of the parameter list) to be
recorded for all normal overrides. For error overrides, the
contents of all general-purpose and floating-point registers
are recorded both before branching to the SVC-called program
and after returning from it. as are two lines of the
parameter list information.
A sample of the type of
information which is recorded is given in Figure 15.
h.
SETOVER GPRSB FPRSA NOPARM
In addition to the basic information, this example causes
the contents of the general-purpose registers to be recorded
before the SVC-called program is given control, and the
contents of the floating-point registers to be recorded
after a return is issued by that program for all normal
overrides. No parameter list information is recorded. For
calls to the
WAIT routine, only the
basic line of
information is recorded. The same information is recorded
for error overrides as that given in Example a.
See Figure
24 for a sample of the type of information which is recorded
for this example and the format in which it is printed.

c.
SETOVER SAMELAST PARMi WAIT2
Assume Example b had been issued prior to this example and
no CLROVER had been issued between them. Since SAMELAST is
specified as the first option"
the settings for Example b
would be assumed initially. The NOPARM setting, however, is
replaced by the PARMI option specified above.
WAIT2 would
normally replace
the default option of
recording no
parameter list information for calls to the WAIT routine.
but since PARM1 has been specified, only one line of the
parameter list for calls to WAIT is recorded. The same
information is recorded for error overrides as that given in
Example a. Refer to Figure 25 for a sample of the type of
information which is recorded by this example and the format
in which it is printed.
Error Messages:
E (00001)

The user has specified one or more invalid options,. Reissue
the SETOVER command making sure that all options are spelled
correctly and that SAMELAST. if specified,
is the first
option given.

264

SETOVER

SETTING NORIIAL- AIiD ERROR-OVERRItES TO PROVIDE A DINAIHC TRACE OF ClIS (AID OS)

SYC-CALlS •••

hORMAL-OVERRIDE,
CALLER=00009514
GPRS BEFONE = E2C5E3D6
00009B10
00009386
00012000
fPRS AFTER = 00000000
00000000
PARII.-LIST = --SETO---VER --

CALLEE=SETO YER S YC-OLD- PSIi=000400CA60009516
00000000
00000000
00009B10
E2C5E3D6
00009508
00000001
40009378
SCCe94CO
00000000
COOOOOOO
00000000
00000000
--5A!E---LAST---PARft---1

IIRUET=0000951A
lRRB'l=OO 00951.&
000050A8
0003EBB8
60009580
00000001
00000000
00000000

*****EEBOR-CVERRItE,
CALLER=000051P2
GPB5 BEFOBE
E2C5E3D6
0000139C
00009386
00012000
FPBS BEPORE
00000000
OOOCOOOO
GPRS AFTER
E2C5E3D6
0000139C
COC00004
00000100
FPB5 AFTER
00000000
00000000
PAR~.-LIST
--FINI---5
FFFFOOOO
OOCOOOOO

CALLEE=FINIS
SVC-OLD-PSII=000400CA400e51F4
00000000
oe005S16
00009B10
E2C5E3D6
00009508
00000001
400057ES
OeOC11BO
00000000
OOOOOOuO
00000000
OOCCOOOO
0000139C
00000000
00000718
0000291)C
E2404040
000040A8
cceCCAAO
C6c9D5c9
00000000
OOCOOOOO
00000000
OCCCOOOO

-lIAIT--

--2

--5TA'I--

HB!RET=000057P8
BBBET=000057P8
000050A8
0003ES58
40009540
000011BO
00(00000
00000000
00000.&20
00000048
00C026CE
00000006
00000000
00000000
5C40FFFF
"FEIIED
--I!CDO--

hOBMAL-CVERRII:E,
CALLER=C000955A
GPRS BEFORE = 00000004
000095FC
00009386
00012000
FPRS AFTEB = 00000000
00000000
PARI'I.-LIST = -- TYPL---I N

CALLEE=TVPLIIi
SVC-OLD-P5W=000QOOCA60CC955C
OOGOOOCO
COOOOOOO
00009B10
E2c5E3I:6
00009508
00000001
40009376
6ceC954E
00000000
COCOOOOO
00000000
00000000
0100960C
C200001A
D95E40E3
7EFC4EFO

NRlIRET=00009560
EBBET=0000954A
000050A8
0003E8ES
1I0C096C2
0000960F
00000000
00000000
P461FC4B
--11 2--

NORMAL-OVERRIDE,
CALLErl=0000CB4E
GPRS BEFOEE = 00000000
0000C858
C00001F8
00000009
FPRS AFTER = 00000000
OOOOOOOv
FARM.-LIST = --ATTN--

CALLEE= ATT N
5VC-OLD-PSW=000400CA6CCCCB5e
OC000013
01C(9774
C000023£
00000012
000095DC
000001f8
0000C658
0000C658
00000000
00000000
OOOOOOOC
ceccceoo
--LIFO-12000251
--NOLL--

NR!RE'I=OCOOCB50
EFRET=0000A238
00000251
00000231
00000001
OOOOOOCO
COCOOOOC
00000000
000001E8
000004CO

NORMAL-OVERRIDE,
CALLER=000096D8
GPRS BEFORE = GCOOOOOO
000095DC
00009386
00012000
FPRS AFTER = CCOOOOOO
00000000
EARII.-LIST = --WAIT---RD

CALLEE=liAITRD
SV(;- OLD- PSW=000400CA400096DA
00000000
00000000
00009456
oec(CCOO
(G009508
(CCOOOOl
40009378
800094CO
OOOCOOCO
OOCOOOOO
00000000
00000000
01009774
f4000012
--TYPL---Ili--

NB!BET=000096DE
EBBET=COCC5tDE
0003E8ES
C00050A S
OOeOCEEO
00003218
00000000
00000000
01009366
D2000020

~CHAL-CVEIiBHE,
CALLER=00009514
GPBS BEFCRE = E2E3C1E3
00009B10
00C09386
00C12000
FPRS AFTER = 00000000
00000000
PAtlM.-LIST = --STAT---E

CALLEE=5TATE
5YC-OLD-PSII=000400CA6CCC9516
OOCOOOO(
oecooooo
00009B10
E2E3C1E3
00009508
00000001
40009318
800094CO
00000000
00000000
oooooooe
oececcoo
--TE51---FORT---~1~ --

NR!RE7=0000951A
EBRET=0000951A
000050AS
0003E85S
60009580
00000001
cecocooc
00000000
IFillFFI
000013£0

*****EBROR-OVERRIDE,
CALLER=000051F2
GPbS BEFORE
E2E3C1E3
0000139C
00009Jdb
00012000
FPRS BEFORE
00000000
00000000
GPIiS AFTER
E2E3C1 n
0000139C
00000004
00000100
FPBS AFTER
eoccoooo
OOCOOOOO
--S
FAEI'i.-LIST
--FINI-FFFFOOOO
COOOOOOO

CALLEE=FIN IS
SYC-OLD-PSII=000400CA400057F4
00000000
00005816
00009B1C
E~E2C1E3
COC095CS
CCCOOOOl
400057E8
000011BO
00000000
00000000
OOOOOOOC
00000000
0000139C
00000000
00000778
OOCC~SDC
C6C905C9
E2404040
000040A8
OOOOOIAO
00000000
00000000
aooooocc
OCCCO(OO

--*

00000000

00000 000

--*
OOOOOOOC

--'IES'I--

NR!RET=OC0057F8
EBRET=0000~7F8
COC050A8
0003E8B8
40009540
000011BO
00000000
00000000
COOOOA20
00000048
000026Cl
00000006
coooeooo
00000000
5C401FFF
FFFEFFFD
--108T--

NORMAL-OVERRIDE,
CALLER:0000955A
GPJiS BEFCBF = 00000004
000095FC
00009386
00012000
FPES AFTER = COCOOOOO
00000000
FAB~.-LIST =
--TYFL---IN

00(00000
0(;009508
00000000
01009COC

SVC-OLD-P5W=000400CA6C00955C
00000000
00009B10
E~E3C1E3
(CCOOOOl
40009378
8000954E
00000000
OOOOOOOC
occeccoc
C2C0001A
D95E40E3
1EP04fFO

NR!RBT=00009560
~BBET=0000954A
00C05CA 8
0003E8B8
400096C2
0000960F
oocooeoc
00000000
F461F04E
--09 2--

~ORMAL-CVJ::RBIl:E,
CALLER=OOOOCB4E
GPRS BEFORE = eC000011
0000CB5d
00000007
C0000009
FPRS AFTER = 00000000
OOOOOOO~
PARM.-LIST = --ATTN--

CALL EE =A TTN
S VC-OLD- PSW:000400C A6 000CE50
OOO()0002
01009174
00000231
00000010
000095DC
oooao lE8
0000C65f
OCCCC65E
OOOOOCCO
COOOOOOO
00000000
00000000
01000241'
--NULL---LIFC--

NBeBET=0000CB50
BBBET=0000A238
0000024F
00000048
oeC00001
000032F8
00000000
00000000
COCOC1E8
00000400

~CJi P.Al-(V EEl EILE,
CALL E!1=OOO "9bDS
GPES BEFCr,E = 00000000
000095DC
OCC09386
00012000
FFiS AFTER = 00000000
OOOOOOOC
PAR~.-LIST =
--WAIT---liD--

CALLEE=W AIT RI:
SY C-OLD-PSW =OOO~OOCA 4CCC HDA
00 000 00 C
CCC00000
00009458
00000000
0U009508
00000001
4000937E
eCCC94CO
00000000
OJOOJOOO
0000000C
OCCCCCOO
01009/74
E4CJ0010
--TVPL--

--1.--

NReRE7=OC0096DE
E6BET=000096DE
000050A8
0003F8S8
COOOCEEO
000032F8
00000000
00000000
01009386
1)200CO~0

CALLER=OOO09514
*****EBROR-OVERRIDE,
E2E3C1E3
GPRS BEFORE
00009B10
i) ,)('0 9 386
000120;)0
C(OOGGOO
FPIiS b EFOIlr;
COOOOOOO
E2E3c lE3
GPIiS AFTUi
00009810
00OOJOO4
CCOO0100
coeooooo
000COOOO
FPR S AfTER
--5T AT---f
fAH. -LIST
FFFFFFFF
r'FFFFFFF

CALLEE=S'IATE
SYC-OLD-P5W=000400CA60009516
00(00000
00000000
0000913 1C
E:a3c lE3
COO095C8
40009378
800094CO
CCCOOOOl
00000000
COCOOOOO
00000000
00000000
000091310
OJOOOOOO
0000071 E
OCCCa84
E2E3C 11::3
C5404040
00002 BOO
COOOO lAO
OOOOOOOC
COOOOOOO
00000000
00000000
--TE5T---SY5I---Ii
FFFFFFFF
FFFFF FFF
PFFFFFFF
PPfHH'F

NRI!BET=0000951A
~BRET=0000951A
OOC050&S
0003E8B8
60009580
00000001
00000000
00000000
COCOOA2C
00000048
000026CF
00000C01
00000000
00000000
PFFFFFFF
FFFPFFPP
FFFiPFPi
p,.rlFFP

Figure 24.

00000000

CCCOOOO(,

00000000

CAlLEE:TYFLI~

Offline printout showing trace information
recorded by the SETOVER command with the
options GPRSB, FPRSA, and NOPARM specified

SET OVER

265

SETTING NOR!!AL- AND ERROR-OVERRIDES TC PROYIDE A DYNAIIIC TRACE OF CIIS

(ANI: OS)

SVC-CALLS •••

bOJiIlAL-CVERRIJ:E,
CALL ER=000C9514
GPRS BEFCBE
E2C5E3D6
00009B10
00009386
00012000
FPBS AFTER = 00000000
00000000

CALLEE=SETOYE R SYC-OLO-P5W=0001i00CA 6CCC 9516
00000000
COOOOOOO
00009S10
E2C5E3D6
00009508
00000001
4000937€
8eCC911CO
OOOGOOOO
CCCOOOOO
oooooooe
oeccecoo

NRIIRE'I=00009511
EBBET=0000951A
00005018
000318£8
60009580
00000001
OOCOOOOC
00000000

*****EEhOR-CYERRICE,
CALLER=000057F2
GPRS BEFORE
E2C5E3D6
0000139c
00009386
00012000
FPRS BEFCRE
00000000
00000000
GPRS AFTEIi
E2c5E3D6
0000139C
00000004
00000100
FPRS AFTER
00000000
00000000
FAIHI.-LIST = --FINI---S
FFFFOOOO
00000000

CALLEE=FINIS
SVC-OLD-PSW=000400CA400057F4
OOOOOOOC
OC005816
00009810
E2C5E306
00009508
00000001
400057EE
OCe( 11S0
COOCOOOO
GOCOOOOO
00000000
00000000
0000139C
00000000
0000077E
OOCC2SDC
C6C905C9
E2404040
OOOOIlOlS
cocceAlO
00000000
(DCOOOOO
00000000
00000000
--CVHi--

N6I1BET=0 0005718
.EBRET=000057 F8
00005018
0003E8£8
1I0C0954C
00001180
00000000
00000000
COOOOA2e
00000048
000026CE
00000006
00000000
ooooeooo
5C40FFFF
FFFEFFFD
--RIDE---1I0[U--

NORM AL-O VERR IDE,
CA LLEIl=0000955 A
GPES BEFCBE
00000004
000C95FC
00009336
00012000
0001
40009378
eeCC94C0
cooooooe
(OCOOOOO
OOOOCOOO
00000000

liBIIBE'I=0000951A
UBU=0000951 A
000050A8
0003£8B8
6000958e
00000001
00000000
OOOCOOOO

*****ERROB-OVERHIDE,
CALLEB=OC0057F2
GPRS BEFORE
E2E3C1E3
0000139C
0000J386
00012000
FPRS BEFORE
CCOOOOCO
00000000
GPFS APTEE
E2E3C1E3
GGJG139C
0000000ij
00000100
FPRS AFTER
COOOOOOO
COOG0000
--FINI---S
FAHM.-LIST
FFFFOOOO
000COOOO

CALLEE=F IN IS
SVC-OLD-l?SIi=000400CA400057F4
00000000
00005816
00009B10
£~E3C1E3
COC0950E
(CC00001
400057E8
00001180
00000000
00000000
00000000
00000000
v000139C
00000000
0000077E
occe~5DC
CbC9D5CS
E2404040
00004018
000001AO
OJOOOOOu
OOOJOOOO
OOOOOOOC
oeeeocoo

HBIIBET=Q00057f8
EBBE'I=eOOC57F6
eDCC5CA8
0003E8B8
40C09540
000011 EO
00000000
00000000
CO C0012 C
00000048
000026CI
00000006
ecoooooe
OOOCOOOO
5C40F1FF
IFFElfie
--FOBT--

00000000

00000000

00000000

(JOOJOOOO

CALLEE=T~PLIN

--*

00000000

00000000

--TEST--

SVC-OLD-PSli=000400CA6CC(S~5C

NORMAL-OYERRIDE,
CALLEB=0000955A
GPFS BEFCFE
000000J4
COOC95fC
J0009386
00012000
FP ES AFTER
= CCOCOOCO
OCJOOOOO

C00095Cb
00000000

E2£;C1E3
8000954£
ecceoooo

NBIIHE'I=00009560
EiBET=00COS54A
00005e18
0003E8B8
400096C2
000096Cf
OOCOOOOO
00000000

bC HiA 1-( YE RBILE,
CALL ER=000096 D8
GP6S BEFC~E
00000000
000095DC
CC009386
00012000
FPFS AFTER = 00000000
acoroooo

CALLEE= iI AIT RD
SVC-OLD-!'SW=OOO 1I00CA 4CCC StDl
OOOOOOOC
ooeooooo
00009458
00000000
00009508
00000001
4000937E
ECC(94CO
00000000
00000000
0000000C
accccooc

NRIIBET=000096DE
EBBE'I=0000960E
00005018
0003E8E8
COOOCE&O
00003a'8
OOCOOOOO
00000000

*****EEHCH-OYEBRIDE,
CALLER=00009514
GPRS BEFO~E
E2E3C1E3
OOOC9Hl0
00C09386
00012000
FP6S BEfCEE
00000000
OCOCOOOC
GP BS AFTER
E2E3C 1 E 3
0G009Bl0
00000004
C0000100
tPRS AfTER
OOCOJCJD
COOOOOOO
PAhM.-LIST
--STAT---E
FFFFFFfF
rFfFFFFF

CALLEE=STATE
SVC-OLD-PS.=OOCqOOCA6CC(5~lE
aocooeoc
00000000
00009810
E2E3C1E3
OGOJ9508
00000001
4000937E
SCCCSQC'
coococec
COC00000
00000000
00000000
00009ill0
OiJOiJJOOO
000007713
OCCC2A84
E2E3clE3
C5404040
00002BDO
CCC(CAAO
cooooooc
coeooooo
cooooooo
00000000
--TEST---SYSI---N
FFFFFFFF
FFFFFFFF
FFFFFFFF
FfFFfFFf

NIiIlRE'I=0000951A
EIiBET=00009511
000050A8
0003E8ee
60C0958(;
00000001
00000000
00000000
COOOOA20
00000048
00C026CE
00000001
OOOOOO~O
00000000
FFFFFFFF
FFFFFFFF
FFFFHH
UfUUF

*****EBROH-OVERRIDE,
CALLEd=C00057F~
GPRS BEFORE
E2E3C1E3
GJJ0139C
000093d6
OC012000
FP6S BEFOhE
0000)000
OOOGOOOO
~PRS AFTER
E2F3C1E3
COOC139C
(C000004
00000100
FP6S AFTER
00000000
OOOOGOOO
PARII.-LIST
--FINI---S
FFFFooeD
00000000

CALLEE=FINIS
SYC-OLD-PSW=000400CA400057F4
00000000
00005816
00009a1C
E~E2C1E3
(OCOS506
((000001
400057E8
000011BO
00000000
00000000
OOOOOOOC
OCCCCCOO
e00013SC
eccoooOO
00000778
000029DC
CbC9t5C9
£2404040
000040AE
CCCCC1AO
cooooooo
O~OOOOOO
OOOOOOOC
oeceecoo

NBIIBET=000057F8
ERBET=00e057F8
CCC05CAS
0003E81!8
4000954C
000011EO
Oocoocce
00000000
00000 120
000COGII8
000026CE
00000006
OOCOOCOO
00000000
5C40ftff
FPlfJtft

Figure 25.

266

OOOCOCJC

00000000

OOOJJOOO
(CCOOOOl
00000000

~OO()"OO

00009810
40009378
OOOOOOOC

--*
OOOOOOOC

--P(,!'I--

Offline printout showing trace information
recorded by the SETOVER command with the
options SAMELAST, PARMI, and WAIT2
specified (SAMELAST in this example refers
to the options as set in Figure 24)

SETOVER

LANGUAGE PROCESSORS
The language processors supported in eMS are the same ones
used under
Operating System/360
(OS): these
include
Assembler (F), Fortran IV (G) I' and PL/I (F).
The language processors in CMS and OS are compatible at the
source language level as long as the macros and SVC's used
in an Assembler program are supported by CMS.
The object
modules (text decks) that are
output from the above
Operating System compilers may be executed under either CMS
or OS as long as the previous restrictions are adhered to.
There are two additional processors available as Type III
programs from the IBM Program Information Department: they
are SNOBOL, a string processing language, and BRUIN, an
interpretive language. BRUIN, Brown University Interpreter,
was adapted from the OS version of BRUIN developed at Brown
University, Providence;, Rhode Island.
BRUIN provides two
modes of operation: a desk calculator mode and a stored
program mode.

Language Processors

267

ASSEMBLE
Purpose:
The ASSEMBLE command creates relocatable object programs
from programs written in System/360 Assembler Language.
Format:

I ASSEMBLE lfilename1 <* •• filenameN>«option1 ••• optionN»

I

1

I

A

I

filename

specifies
Additional
assemblies.

a

SYSIN
file to
be
filenames
specify

option

is one or more
below .•

of the assembler

assembled.
additional

options listed

Options:
DECK
NODECK

creates a TEXT file of the relocatable
program
suppresses the TEXT file

object

LIST
NOLIST

creates a LISTING file of the assembled program
suppresses
the LISTING
file
and
online
diagnostics

XREF

NOXREF

includes a cross-reference symbol table in the
LISTING file
suppresses the cross-reference symbol table

NODIAG

types source statements containing errors at the
terminal,
along with
diagnostic and
error
messages
suppresses typing of errors.

LTAPn
LDISK
PRINT

writes the LISTING file on the tape whose
symbolic address is TAPn
writes the LISTING file on the permanent disk
writes the LISTING file on the offline printer

RENT
NORENT

checks the program for reentrance
suppresses the reentrance check

Usage:
The filetype SYSIN is assumed for all input files to the
ASSEMBLE command.
The file
must have
fixed-length,
SO-character records.
More than
one assembly may be
performed by specifying additional filenames, separated by
blanks.
Any number of files may be specified, but the
command must not exceed a single input line. Each file
268

ASSEMBLE

named is assembled separately in the order named.
output is controlled by a set of options.. The
list of options selected, enclosed in a set of parentheses,
follows the last"
or only, filename specified with the
command.
One
set of options governs
all assemblies
performed by one ASSEMBLE command. The options, specified
in any order, are separated by at least one blank.
A
default value is supplied for any option not included. The
default option values are:
DEeR LIST XREF DIAG NORENT LDISR

~ssembler

Any combination of option values may be specified, but if
NOLIST is included" XREF" DIAG, LDISR, PRINT, and LTAPn are
ignored.
During an assembly, three work files are created, with the
filetypes SYSUT1, SYSUT2, and SYSUT3. Their filenames are
the same as the SYSIN file being assembled.
According to
the options specified;, files with filetypes LISTING and TEXT
may also be created"
with the same filename,. At the
beginning of each assembly, any pre-existing files with any
of the above filetypes and the current filename are deleted,
even if the set of options specified means they are not to
be replaced by the current assembly.
To save old copies of
LISTING and TEXT files" use ALTER to change their filenames
or the filename
of the SYSIN file
before assembly.
Insufficient space on the permanent disk for any of the
assembler files causes termination
with an I/O error
message.
filename TEXT P1 is the file of machine-language code
created by the assembler.
This file can be loaded for
execution with the LOAD or $ commands, or punched in object
deck form on the cardpunch with the OFFLINE PUNCH command.
If NODECR is specified, this file is not created.
filename LISTING Pl is the file of source statements and
assembled machine code produced by the assembler. This file
is not created if NOLIST is specified.
An external symbol
directory and a cross-reference symbol table are included,
unless NOXREF is specified.
Diagnostics and error messages
appear at the bottom of the LISTING filet, and, unless NODIAG
is specified;, are typed at the terminal.
If PRINT is specified!, the LISTING file is printed on the
offline printer. If LTAPn is specified, the LISTING file is
written on the tape whose symbolic addr,.!ss is TAPn in blocks
of ten 121-character records. If LDISK is specified, or no
value is specified, the LISTING file is written on the
permanent disk.
The SYSUT1"
SYSUT2, and SYSUT3
files created by the
assembler and used as work files are deleted at the end of
each assembly.
If they are not deleted because of an
abnormal termination, they may be deleted with the ERASE
ASSEMBLE

269

command, or by reissuing the ASSEMBLE command.
The assembler searches the system macro libraries (SYSLIB
MACLIB SY and OSMACEO MACLIB SY) for macro definitions.
Names of macros in these libraries may be obtained with the
MACLIB LIST command.
Additional macro libraries may be
created on the permanent disk with the MACLIB GEN command,
and up to five of these additional libraries may be included
in the assembler search list at one time with the GLOBAL
ASSEMBLER MACLIB command. The assembler accepts the first
definition for a macro it finds, allOWing-the user to
override system macro definitions. If the user has a file
called SYSLIB MACLIB or OSMACRO MACLIB on a disk that
precedes the system disk in the order of search. that
library is searched in place of the system library. See
GLOBAL
under
-Execution Controland
MACLIB
under
"Libraries" for further information.
ASSEMBLE uses
SYSIN files.

the standard

order of

search to

locate the

Reponses:
a.
ASSEMBLING: filename
This response is typed for the
assemblies performed by a single
diagnostics for the assemblies.

second and subsequent
command. It separates

b.

SYMBOLIC TAPE ADDRESS INCORRECT
LISTING FILE WILL BE WRITTEN ON DISK. WRITING
ON TAPE IS CANCELLED.
The option LTAPn was specified, and TAPn was not a valid
symbolic tape address.
The LISTING file is written on the
permanent disk.
c.
OUTPUT TAPE FULL. CHANGE IT AND HIT CARRIAGE RETURN.
An end of reel condition was detected on the tape unit for
the LISTING file. The tape has been rewound. Press ATTN to
enter the CP environment, and ask the operator to mount a
When the operator replies that a new tape is
new tape.
mounted, return to CMS with ATTN, and issue a carriage
return. The assembly resumes where it was interrupted.
d.
READY THE TAPE UNIT AND HIT CARRIAGE RETURN.
The tape unit specified by LTAPn signalled not ready. Go to
CP with ATTN and ask the operator to ready the unit,. When
he replies that the unit is ready, return to CMS with ATTN,
and issue a carriage return.
The assembly begins or
resumes.
e.

PERMANENT I/O ERROR ON TAPE
LISTING FILE WILL BE WRITTEN ON DISK~ WRITING
ON TAPE IS CANCELLED.
Allor part of the assembly listing is being written on disk
as filename LISTING P5.
If any of the records were
successfully written on the specified tape before the error,
210

ASSE~BLE

they are missing from the disk LISTING file.
f •
PLEASE READY THE PRINTER
This response should never occur
responsible system programmer.

under CP.

Notify

the

PERMANENT I/O ERROR ON ~HE- PRINTER, LISTING FILE
WILL BE WRITTEN ON DISK.
This response should never occur under CP.
Notify
responsible system programmer.

the

g.

h.

PERMANENT I/O ERROR ON DISK, ASSEMBLY CONTINUES
WITHOUT WRITING LISTING FILE ON DISK.
The assembly is completing without any LISTING file,. If a
listing is necessary" execution may be cancelled with the KX
command.
The error may have resulted from insufficient
space on the permanent disk. Use the ERASE command to
create more free space and try the assembly again,. If the
error recurs, notify the operator.
Note:
The error completion code returned on completion of the
ASSEMBLE command is the highest severity code returned by
the assembler for any of the assemblies performed by that
command.
References:
The System/360 instruction set is described in System/360
Principles of Operation. The assembler instructions and
macro language are described in IBM System/360 Operating
System
Assembler Language.
Additional information
on
assembler execution and messages may be found in IBM
System/360 operating
System Assembler (F)
Programmer's
Guide. Note that the execution options in the Programmer's
Guide are different than those supported by eMS.
Examples:

a.
ASSEMBLE RETURN
The file RETURN SYSIN Pi is assembled. Since no options are
The
specified. the default options govern the assemble.
following files are created:
RETURN LISTING Pi
RETURN TEXT
Pi
See Figure 24 for an example showing the on-line diagnostics
generated by the assembler.

b.
ASSEMBLE RETURN JOBA TESTi (RENT NOXREF NODIAG)
The file RETURN SYSIN Pi is assembled, and the resulting
object code is checked for reenterability. The listing file
is printed;, and is not saved on disk. The listing does not
contain a cross-reference symbol table. On-line diagnostics
are suppressed. RETURN TEXT Pi is created on the permanent
ASSEMBLE

271

disk. When the assembly is complete, the same operations
are performed for JOBA SYSIN P5. and then for TESTl SYSIN
P5.
Error Messages!
E(OOOOl)
FILE(S) TO ASSEMBLE UNDEFINED.
No filenames were specified with the ASSEMBLE command.
E(OOOOl)
AT LEAST ONE OF THE FILES TO ASSEMBLE DOESN'T
EXIST OR DOESN-T HAVE A CORRECT -TYPE- NAME.
Assemblies were started.
E(OOOOl)
AT LEAST ONE OF THE FILES TO ASSEMBLE HAS
INCORRECT RECORD LENGTH.
Sysin files must have fixed-length. SO-character records.
E(00004)
Minor errors
were detected during the
assembly.
successful execution of the program is still probable.

but

E(OOOOS)
Errors were detected in the assembled program, but execution
may still be possible.
E(00012)
Serious errors were detected in the
Successful execution is not probable.
E(00016)
Very serious errors were detected
Execution is impossible.

assembled

program.

in the assembled program.

E(00020)
PERMANENT I/O ERROR WHILE READING SYSIN FILE
filename UNABLE TO ASSEMBLE ALL THE FILE.
Files specified before t'he one named in the message have
been assembled. The file named and subsequent ones have not
been assembled. The file in which the error occurred must
be reentered before assembling it.
E(00020)
The assembler detected a catastrophic error such that it
could not continue processing. This may be an I/O error,
caused by insufficient free space on the permanent disk.
Free some space with the ERASE command, and retry the
assembly. If the error recurs, notify the operator.

212

ASSEMBLE

~SSEMBLER

LANGUAGE PROGRAMMING

PROGRAM NAMING

The normal entry point name of a program should be the same
as the filename of the TEXT file.
The program may then be
executed by the command
$ filename
If the filename and entry point name
following sequence must be used:
LOAD filename
START entryname

are different,

the

PROGRAM ENTRY

When control is received by a user program, the address of
the entry point is in register 15, which may be used for
immediate addressability.. Register 14 contains a return
address into the CMS nucleus, and must be saved. Register
13 contains the address of an lS-word save area. Register 1
paints to a parameter list!, which contains any parameters
passed to the program by $ or START. The parameter list is
aligned on a double word boundary, and each entry is found
in the high-order bytes of successive double words.
All
data is in EBCDIC.
The first entry is always the entry
point name of the program being executed. The following
entries are the parameters passed to the program.
For
instance, after the command
$ JOB10 5/7/68 21.37
register 1 points to a parameter list in the following
format.
PLIST

DS
DC
DC

DC
DC

OD

CLS'JOB10'
CLa'S/7/68'
CLS'21.37'
SX'FF'

The last entry is always a double word with all bits set to
one which- serves as a delimiter. Any parameters longer than
eight characters are truncated to the eight high-order
characters.
PROGRAM EXIT

Return should always be to the address received in register
14. This gives control to eMS service routines which close
files, update the user's disk file directory, and calculate
and type the time used in execution.
CMS also inspects
register 15 for an error code.
If none is found,
the
completion message has the form "R; T=n.nn/x.xx xx/xx/xx".
If there is a value in register 15. the message is
"E(nnnnn); T=n.nn/x.xx xx/xx/xx" where nnnnn is the error
code returned in register 15 and n.nn is the CMS CPU time in
seconds used for execution. x.xx is the CP and CMS CPU time"
Assembler Language Programming

273

and xx/xx/xx is the time of day in hours/minutes/seconds.
LINKAGE TO CMS COMMANDS AND ROUTINES

with few exeptions, all CMS linkages are made with one
supervisor call: SVC X'CA·. The address of a parameter list
is placed in register 1 before the call:, and the first entry
of the list always specifies the CMS command or function
being called. All registers are saved and restored by the
SVC-handling service routine, except register 15, which is
used as an error return register..
The parameter list is always aligned on a double word
boundary. If a command is called!, the same parameters that
would be typed to call the command are placed in successive
double words. For instance, a parameter list for ERASE
might appear as
PLIST

DS
DC
DC

CLB'ERASE'
CLS'.'

DC

CLS·WORKFILE'

OD

In this case all files with the filetype WORKFILE are erased
during execution of the program by the sequence
LA 1,PLIST
SVC X'CA-

After the files are deleted, CMS returns control to the next
instruction after the SVC. Register 15 is set to zero to
indicate that no error occurred. Should an error occur, a
response is typed and control passes to DEBUG. Parameter
lists for eMS routines. which are not commands, such as RDBUF
or WRBUF, are not uniform. complete explanations of these
parameter lists are found in ·CMS Nucleus Routines" later in
this' section and in the CMS Program Logic Manual.
To avoid going to DEBUG when an error occurs in a called
program. the programmer may specify an error return address
with each SVC. The address is placed in the four bytes
iBJInediately after the SVC.. Control goes to the address
specified on any error in the called program. For example
LA

1, PIST

SVC

X'CA-

nc

AL4(ERROUT)

LH

3,26(1)

Note that the address constant must include a length
specification to prevent alignment by the assembler.
In
this example, if the called program completes normally,
control is returned at the LH instruction. If any error
occurs, control goes to ERROOT. Errors are ignored by the
sequence

274

Assembler Language Programming

SVC
pc

X·CA·
AL4(*+4)

Linkage Notes:
a. Commands that are not resident in the CMS nucleus may
also be called by the CMS SVC. but they are loaded at
hexadecimal location 12000.
This is also the default load
point for user programs.
Therefore, a higher load point
must be specified when the user's program is loaded.
A
complete list of disk resident commands may be obtained with
a LISTF * MODULE SY" which also gi ves a rough idea of the
command size, expressed in SOO-byte records.
b. A few CMS routines may be executed only by branching.
The addresses of these programs are listed in a nucleus
module under the entry point SYSREF. SYSREF is resolved as
an EXTRN in any user program. The displacement from SYSREF
to the desired address is obtained with the CMSYSRFF macro
instruction, which generates a series of EQU statements.
The name of each nucleus routine, with a D prefixed to it,
is equated to its displacement from SYSREF in the address
list. The following example shows how to get to the SCAN
routine in the nucleus,.
USERJOB

CSECT
EXTRN SYSREF
L
L

BALR
LTR
BNZ

3!,=A(SYSREF)
15.DSCAN(3)
14,15
15,15
ERR $

CMSYSREF

In the expansion of CMSYSREF, DSCAN is equated to the
displacement of the SCAN address in the SYSREF list. The
address is loaded into register 15 for the BALR. SCAN is a
routine to break up terminal line images in core into a
standard CMS parameter list. For further information on
SCAN" see the CMS Program Logic Manual.

Assembler Language Programming

215

CMS MACROS
The macro definitions that are used by the Cambridge Monitor
System are contained in the files SYSLIB MACLIB and OS MACRO
MACLIB which reside on the system disk. SYSLIB MACLIB
contains the CMS macros which provide linkages to the CMS
I/O routines, and OS MACRO MACLIB contains the System/360
Operating System macros which have been changed to interface
with eMS.
Only the CMS macros are discussed in this
section. For a discussion of the OS macros supported, see
·OS ~acros". To obtain a list of the names, size, and
location of macro definitions in libname MACLIB, the command
MACLIB LIST libname may be issued.
To print out the actual
macro definitions, refer to the procedure described in
MACLIB under "Libraries".
The CMS macros described in this section deal primarily with
linkage to the CMS disk and terminal handling routines.
TYPE and TYPIN handle terminal I/O, and FCB, STATE, SETUP,
RDBUF. WRBUF. CKEOF, ERASE and FINIS handle I/O to the
permanent disk. The offline unit record devices may be
accessed from an assembler language program by calling the
OFFLINE command, as explained previously under "Linkage to
CMS Commands and Routines".
The TYPE and TYPIN macros each set up a parameter list in
line and issue a CMS supervisor call.
For disk I/O, the
parameter list is set up in a constant area by the FCB (File
Control Block) macro, and the label of that macro is used
as a parameter of the WRBUF, RDBUF, SETUP and STATE macros
which issue CMS SVC instructions for linkage.
If an
existing file is to be read, STATE and SETUP must be
executed before the first RDBUF to initialize the first File
Control Block. Figure 26 shows a typical sequence of macros
for writing and reading disk files.
Notes:
a. The TYPE and TYPIN macros generate parameter lists in
line with executing code.
If either macro is to be used
repeatedly,. it may be more efficient to set up a single
parameter list and 1ssue CMS SVc·s to call the routines
directly. See "Linkage to CMS Commands and Routines·.
b.

CMS closes user files on program completion.

c.
The CMS macros
alphabetical order.

276

d~scussed

in

CMS Macros

this

section

are

in

STMT SOURCE STATEMENT
1 BEGIN CSECT
PRINT NOGEN
2
ESTABLISH ADDRESS ABILITY
3
BALR 12,0
USING *.12
4
INITIALIZE INPUT
STATE SINPUT " ERR1
5
FILE CONTROL BLOCK
SETUP INPUT
9
READ A RECORD
15 RD
RDBUF INPUT.ERROR=EOF
WRITE SAME
20
WRBUF OUTPUT I, ERROR=ERR2
REPEAT TO END
25
B
RD
REALLY EOF?
26 EOF
C1

ERASE

fcb

label

is an optional statement label.

fcb

is the label of the
to be erased.

FCB which identifies the file

Usage:
The ERASE macro allows the
permanent disk.

user to

erase any file

on his

Note:
To erase a disk file with a filemode other than P~ the user
may set up a parameter list and call the ERASE command
directly. as explained under "Linkage to CMS Commands and
Routines".
Example:
ERASE INPUT
The permanent disk file identified by the FeB labeled INPUT
is erased. For example. if the macro
INPUT FCB (INFILE.DATA). BUFF
has been issued. file INFILE DATA Pn is erased.

ERASE Macro

281

FCB Macro
Purpose:
The FeB macro generates a eMS File Control Block, which
serves as a parameter list naming and describing disk files
for the eMS I/O routines.
Format:
label I FCB I (filename, filet ype) "area I
label

is a statement
characters.

label of

seven or

(filename,filetype) specify the name and type of
Mode * is assumed.
area

less

the file.

is the label of the input or output area
in the program.

Usage:
A File Control Block is needed for each disk file referenced
in a program. The label assigned to the FCB macro is a
parameter of the SETUP, RDBUF"
and WRBUF macros.
The FCB
label with an S prefixed is a parameter of the STATE macro.
Before the FCB can be used for input files, the STATE and
SETUP macros must be executed.
No initialization is needed
for output files being created.
Included in the parameter list generated by FCB is an item
number field. This specifies the record of the file being
referenced.
If unchanged, records are read sequentially
from first to last, and written in the same order.. Records
are added to the end of existing files.
However, if a
number is specified in the itero number field, the item
specified is read or written. The field is a half word at
LABEL+26, where LABEL is the FeB state~ent label.
Example:
INPUT FCB (INFILE,DATA),BUFF
Expansion of
this macro
generates a
parameter list
referencing INFILE DATA. Before a RDBUF macro can use this
FCB for input, the following sequence must be executed:
STATE SINPUT,ERROR
SETUP INPUT
No initialization is needed for output. Data is read into
the area labelled BUFF unless a different area is specified
with RDBUF .•

282

FCB Macro

FINIS Macro
purpose:
The FINIS macro provides linkage to the FINIS command" which
closes the specified user file by clearing its entry from
the active file table.
Format:

< label >
label
fcb

FINIS

fcb

is an optional statement label
is the
closed

label of

the FCB

naming the

file to

be

Usage:
The FINIS macro closes the permanent disk file identified by
the FeB whose label is given as an operand of the macro..
Note:

eMS closes files automatically at program completion.
Example:
FINIS INPUT
The permanent disk file identified by the FeB labeled INPUT
is closed. For example. if the macro
INPUT FCB (INFILE/.DATA) ,BUFF
is issued, file INFILE DATA Pn is closed.

FINIS Macro

283

RDBUF Macro
Purpose:
RDBUF reads a record from a disk file.
Format:

I 

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Producer                        : Adobe Acrobat 9.13 Paper Capture Plug-in
Modify Date                     : 2009:09:04 13:55:16-07:00
Create Date                     : 2009:09:04 13:55:16-07:00
Metadata Date                   : 2009:09:04 13:55:16-07:00
Format                          : application/pdf
Document ID                     : uuid:2328e680-ffc4-4a20-9d25-ce36e65c0b39
Instance ID                     : uuid:449fcd02-40bc-47af-9f95-7c15570d06ba
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 608
EXIF Metadata provided by EXIF.tools

Navigation menu