• Keine Ergebnisse gefunden

SAMPLE CP-6 SESSION

Im Dokument CONCEPTS AND (Seite 41-48)

Figure 6-1 shows a sample CP-6 session. The left hand pages show annotations tthat match the letters on the right or sample program.

Although Figure 6-1 does not illustrate all the CP-6 program development facilities, it does build, compile, link, execute and debug a program.

Figure 6-1: Annotation

A. The user initiates communication by connecting the terminal to the CP-6 system. If the user's terminal is hardwired, the connection is made by turning on the terminal. If the user's terminal is linked via an

interface, the user follows local dial-up procedures. When the user makes connection with the CP-6 system, the system requests that the user enter a recognition character. The user enters the recognition character which is not echoed (displayed) on the terminal.

B. The system identifies itself in a way that is standard for the

installation. Identification information will normally include time and date of connection, as well as logical and physical connection information.

C. system requests that the user log on and the user enter the account, name and password. As a security aid, this log-on information is not echoed on the terminal.

D. The system confirms the log on. This installation standard message will normally include time and date of the log on.

E. The IBEX command processor prompts the user to enter an IBEX command with the exclamation point character. The user enters the TERMINAL command to request terminal status information, which is output to the user's

terminal.

F. IBEX prompts for another command, and the user invokes the EDIT processor used to build and manipulate source language and data files. The EDIT processor acknowledges that i t has been invoked.

G. The EDIT processor prompts the user to enter an EDIT command with an asterisk. The user enters a command to set FORTRAN format tab stops.

H. The EDIT processor prompts the user for another command, and the user opens a new file and assigns i t the name SITRI.

I. The EDIT processor prompts the user to enter successive file lines (also called records) with line numbers (also called record keys). In response to the first line number, the user enters the first line of a FORTRAN program. This process continues until the user responds to a line number prompt with an immeditate RETURN (see line 11). In this example, the user creates a program to read three variables, calculate their square roots, add the resultant values and write out all calculated values. As i t appears at this point, the source .program contains errors so that data manipulation features of the EDIT processor can be demonstrated.

J. The EDIT processor prompts for another EDIT command, and the user enters three chained commands (linked together with the semi-colon character) that:

• Identify a search record (SE6)

• Replace the first 2 blank characters in the record with the value 50 (/ /S/50/)

• Request that the corrected line be echoed (TX).

The EDIT processor types the manipulated record as corrected.

A ?please type a left parenthesis

*** CP-6 AT YOUR SERVICE, LAOC L66A

13:44 08/14/80 FEP #0001 PATH#OOOB LINE#1700

C LOGON PLEASE:UACCT,UNAME,PSWRD

D *** SYSID# 126425 ON LAOC L66A AT 12:44:09.57 AUG 14 '80

TERMINAL ATTRIBurES:

1

!TERMINAL

E NODE-PORT = 1-1700 LINE SPEED = 1200 PROFILE NAME = XRX8S0

F G H

I

J

ON: TAB SIMUIATICN,RELATIVE TABBING,SPACE INSERTIOO,DISPLAY INPUT, APL LCMER CASE,&:ROLL,PRINT HALT,RELATIVE PAGE,SAVED INPUT SIZE=3 { !EDIT

EDIT HERE

{ *TA F

*BUILD SITRI 1.000 2.000 10 3.000 4.000 20 5.000 6.000 7.000 100 8.000 200 9.000 300 10.000 11.000

WRITE (6,100) READ (5,200) X,Y,Z IF (X) 20,50,20

D = SQRT(X**2+Y**2+Z**2) WRITE (6,300) X,Y,Z,D STOP

FORMAT(7X,lHX,11X,lHY,11X,lHZ,11X,lHD) FORMAT (3E)

FORMAT (4(lX,Ell.3»

END

*SE6i/ /S/SO/iTX 6.000 50 STOP

Figure 6-1. Sample CP-6 Program

Figure 6-1: Annotation (cont)

K. The EDIT processor prompts for a command. The user enters an unrecognized command. The EDIT processor responds with **Eh?, and prompts for another command.

L. The user responds to the command prompt by entering a ? to obtain further information about the error condition that caused the EDIT processor to type **Eh?

M. The EDIT processor prompts for a command, and the user invokes the HELP processor again to examine the syntax of the EDIT command IN. The HELP processor displays the requested information.

N. The EDIT processor prompts for a command, and the user invokes the HELP processor for the next level of HELP information -- parameter descriptions.

The HELP processor displays the requested information.

O. The EDIT processor prompts for a command and the user responds by entering an IN command that is syntactically correct. The EDIT processor prompts for the insert line by typing the line number, and the user enters the record data (note that a table precedes the data) •

P. The user responds to the next EDIT prompt by entering the END command to return control to IBEX.

Q. IBEX prompts for a command and the user invokes the EDIT processor to,open another new file. This time, the user builds a 3-record data file called CHANT.

R. The user responds to the next IBEX prompt by invoking the FORTRAN processor to compile the source program in file SITRI and write the object code to file DAEMON. (If file DAEMON already exists, the file will not be

replaced; instead, a diagnostic message will be produced.)

S. The FORTRAN compilation results are displayed at the terminal, indicating an error-free compilation~

T. The user responds to the next IBEX prompt by opening another new file named GOETIA. The user build an execute (XEQ) file; that is, a file of IBEX commands. This file will subsequently be submitted as a job file for execution. When executed, the commands (records) in this file will:

• Establish the file CHANT as the source of input.

• Establish the user's terminal (ME) as the output destination for results of execution.

• Link and execute the object code contained in file DAEMON.

U. The user responds to the next IBEX prompt by executing the XEQ file.

v.

The system displays the results of execution as follows:

• Each IBEX command in the XEQ file is echoed as it is executed.

• The results of the link and execute process are displayed on the

terminal as a result of establishing the user's terminal as the output device.

K {*IN LINE 5.5

FCRTRAN 77 VERSIClJ A03 SOURCE=SITRI 10.000> 11: END

PROTECT I ClJ LOCATIClJ PAGES

DATA 0 1

PROCEDURE 2000 1

READ ONLY 0 1

* NO LINKING ERRCRS.

X Y Z D

.100E+Ol .200E+Ol .300E+Ol .374E+Ol .100E+Ol .100E+Ol .100E+Ol • 173E+Ol

*STOP*

Figure 6-1. CP-6 Sample Program (cont)

6

Figure 6-1: Annotation (cont)

W. The user responds to the next IBEX prompt by requesting a listing of the files existing in the log on account. The four files created during this session are listed as the only four files in the account.

X. The user responds to the next IBEX prompt by directing that a listing of the source file be created for printing at the output destination

PR@DOCUMENT. The device identification is known to the system.

Y. Another COpy command directs that a listing of th~ object code be created for printing at another output destination, LP@UPSTAIRS.

Z. The user responds to the next IBEX prompt by requesting that all queued output files be printed.

AA. The user responds to the next IBEX prompt by submitting the XEQ file for execution as a batch job. Note that no JOB command is required. The system responds by displaying the job identification of the submitted job.

BB. The user responds to the next IBEX prompt by invoking the BASIC processor.

The BASIC processor acknowledges that i t has been invoked.

CC. The BASIC processor prompts for input with the> character. The user responds by :

• Invoking AUTO mode.

• Entering statements that will find the square roots of three variables, and printing calculation results.

• Establishing the data file CHANT as an input file.

• Executing the contents of the work area.

• Sealing and saving the work area.

• Terminating use of the BASIC processor.

DO. The user responds to the next IBEX prompt by logging off the system.

EE. The system responds to the log off by printing terminating usage and accounting information.

NOTE: This figure is a file image copy of an actual CP-6 programming session.

w

{

!L CHANT DAEMCN GOETIA SITRI X

{

!COPY SITRI TO PR@DOCUMENT

•• COPYing

Y

{

!COPY DAEMCN TO LP@UPSTAIRS

•• COPYing Z { !PRINT

M { ! BATCH GOETIA Job 58825 Submitted BB { !BASIC

BASIC AOI HERE )AurO

10 DEF FND(X,Y,Z)=SQR«X**2)+(Y**2)+(Z**2»

20 PRINT" X"," Y"," Z"," D"

30 FOR A = 1 TO 2 40 INPUT #l;A,X,Y,Z 50 PRINT X,Y,Z,FND(X,Y,Z) 60 NEXT A

70 STOP 80 END CC 90

)OPEN "CHANT" TO 1, INPUT )RUN

X Y Z D

1 2 3 3.74166

1 1 1 1.73205

HALT AT LINE 70 )SEAL LEMffiETCN

LEMffiETCN SAVED AND SEALED )SYS

DD { !OFF

EE { CON=OO:00:14:23 EX=OO:00:03.97 SRV=OO:00:10.10 PMME= 1238 CHG= 5.76 Figure 6-1. CP-6 Sample Program (cont)

Im Dokument CONCEPTS AND (Seite 41-48)