Examples
A. LOGON
The dialogue which logs a user onto OLS, assuming the user number of Section IV, is as followings:
TELNET ENTRY OLS QUERY/RESPONSE
UCSB ONLINE SYSTEM
ENTER USER NUBMER (196)
196% ID NUMBER=
57372% USER NAME= (ARPA)
ARPA% JOB NAME= (UCSB-WHITE)
UCSB-WHITE% AUTOSAVE CODE = integer
MOLSF % LOAD (MOLSF)
FILE LOADED
In this and succeeding examples, '%' denotes CR (carriage return). Entries echoed by OLS are enclosed in parentheses above. The user should substitute for 'UCSB-WHITE' his own affiliation and name. The procedure above loads the math subsystem of OLS. To load instead either COL or NET, substitute its name for 'MOLSF'. To load a different subsystem (say COL) after logging in:
TELNET ENTRY OLS QUERY/RESPONSE
;SYST_ WORK AREAS UPDATED
;LOAD _COL% LOAD (COL)
FILE LOADED
Again, '_' denotes a space, not an underscore.
B. NEWTOWN-RAPHSON SQUARE ROOT APPROXIMATION
A simple user program can be constructed to approximate the square root of a number N using the Newton-Rapshon iteration procedure, which derives the (k+1)th approximation from the kth by the following algorithm:
X k+1= (xk+n/kk)/2
The following entries construct the user program:
;LIST_)TYPE_%ENTER_N
;1_;REAL_;LOAD_;ENTER_;STORE_N
;TYPE_% ENTER_FIRST_GUESS
;1_;LOAD_;ENTER_;STORE_X
;TYPE_%#_OF_INTERATIONS?
;0_;LOAD_;ENTER_;STORE_N
;1_;REPT_(;LOAD_N ;/_X;+_X ;/_2
;STORE_X ; DISP_%/_X ;+_X ;/_2
;LIST_;STORE_;USER_;1_;SQRT_
To display the user program, enter:
;USER_;DISP_;SQRT_
When executed, the program obtains from the user the number N whose square root is sought, an initial guess, and the number of iterations to be performed. The program then computes and displays the results of each iteration, and then calls itself, permitting a second square root to be computed. The program is executed as follows:
TELNET ENTRY OLS QUERY/RESPONSE
;USER_;1_;SQRT_ ENTER N
3 ;ENTER_ ENTER FIRST GUESS
1 ;ENTER_ #OF ITERATIONS?
4 ;ENTER_ 2. +00
1.75 +00
1.73214+00
1.73205+00
ENTER N
etc.
C. Remote Job Entry
A file of card images can be constructed with the help of the COL subsystem of OLS ard submitted as a batch job. Assuming COL has been loaded, the following entries construct a card file which invokes the Fortran compiler:
;2_//jobname_JOB_(acct#,name , , , , , ,T) ; STORE_
//_EXEC_FORTGCLG ; STORE_
//FORT.SYSIN_DD_* ; STORE_
source-statement-1 ;STORE_
...
source-statement-N ; STORE_
/* ; STORE_
To display the completed file, type:
;3_;DISP_%
To submit the file, type:
;4_;SUB_%
To watch for it in execution, type:
;DISP_J%%%...
When execution is complete, 'printed' output can be retrieved with the following dialogue:
TELNET ENTRY OLS QUERY/RESPONSE
;CMPLX_;LOAD_ UNIT = (2314)
2314% VOL=SER= (MVT180)
MVT180% DSNAME= (RJEOUT)
RJEOUT% MEMBER= (jobname)
Jogname% NOW LOADING
FILE LOADED
The output can then be examined by entering:
;2_;DISP_1%%%...
NOTE: Text within brackets describes non-ASCII characters that were part of the original document. Please see the PDF file for the original representation.