Chapter eight: Advanced system facilities and budgeting

Scan of page 53 Scan of page 54 Scan of page 55 Scan of page 56 Scan of page 57 Scan of page 58

Allocation and control of resources

The Computer Centre staff have control of the usage of the system and they create the files and allocate the resources for the user. Before a user can log on, a file must be created for him on magnetic disc to hold programs and data. This file has a username and password and can only be accessed by those who know them.

The controls which are set on resource usage are as follows:

User name identifies the user’s files.
Password provides security in that only those who know it can log on.
File access key may be set to allow all users to list the catalogue or programs in a username or to restrict access to those logged on under the username.
File size sets the maximum disc storage space that can be used with a username.
CPU time maximum number of minutes of execution for BASIC programs. This is cumulative total since the creation of the file.
No. logons maximum number of logons allowed under a username.
Logon time maximum number of minutes that users under one username may spend logged onto the system. This is a cumulative total since the creation of the file.

The Computer Centre staff can increase the time allocations if a user’s budget has been exceeded.

They will also remind a user of his password or allocate him a new one if he should forget it.

Running programs

The current program may be executed as follows:

RUN This will start the program at the 1st line.
RUN st.no This will start the program at the specified statement number.
RUN, size This option will start the program with additional store made available to it. The size parameter can have values of 1, 2, 3…etc denoting the number of additional areas of 512 words that are allocated to the program for data storage.
RUN CLEAR

This will initialize all program variables before starting it. All numeric variables will be given a value of zero and all string variables will be set to the null string.

If CLEAR is not used all program variables should be given values in the program or the program may halt with an “unassigned variable” error message.

These options may be combined but if present must be separated by commas and should be in the order:-

st.no, size, CLEAR

Examples

RUN Run the program
RUN 40 Run the program from line 40
RUN 200,2 Run the program from line 200 with 1024 words (2x512) additional data storage.
RUN,2 Run the program with 1024 words additional data storage.
RUN 10, 1, CLEAR Initialize the program variables and then run the program from line 10 with 512 words of additional data storage.

Renumbering the program

The line numbers of the current program may be altered as follows:

RENUMBER st.no step
RESEQUENCE st.no step
Renumber the statements in the current program to ascend from the given statement number by the given step.
RENUMBER st.no
RESEQUENCE st.no
As above with the default step value of 10.
RENUMBER
RESEQUENCE
As above with the default initial value of 10.

e.g.:

RENUMBER 100,20

will give statement numbers: 100 120 140 160 etc.

Storing compiled programs on disc

Compiled programs may be stored on disc so that each time the programs are loaded and run a recompilation is not necessary. This facility may be useful for storing frequently used programs as the “run” time is reduced.

A named program is compiled and stored as follows:–

CSAVE This will compile the current program and then store the compiled program on disc with the name of the current program. Users logged on under other usernames cannot access the program.
CSAVE st.no This will store the compiled program on disc in a form where when run it will start at the specified statement number.
CSAVE, size This will store the compiled program on disc with additional data storage made available to it. The size parameter can have values 1, 2, 3…etc denoting the number of additional areas of 512 words that are allocated to the program for data storage.
CSAVE access

where access = USER or RUN or SHARE. This will store the compiled program on disc with the specified access restriction i.e.

USER - users logged on under other usernames cannot access the program.

RUN - other users may GET and RUN the program.

SHARE - other users may GET, RUN and copy the Program.

CSAVE CLEAR This will store the compiled program on disc with all program variables initialized. All numeric variables are set to zero and all string variables are set to the null string. If CLEAR is not used all program variables should be give values in the program or the program may halt with an “unassigned variable” error message.

These options may be combined but if present should be separated by commas and should be in the following order.

st.no., size, access, CLEAR

Examples

CSAVE Compile and store the current program.
CSAVE 20,CLEAR Compile and store the current program. Set up to start from line 20 and initialize the program variables.
CSAVE ,1 Compile and store the current program. Make available 512 words additional data storage.
CSAVE RUN,CLEAR Compile and store the current program. Initialize the program variables and allow other users to GET and RUN the program.

Note: CSAVE’d programs require considerably more disc storage than SAVE’d programs.

Dumping programs onto disc

When a program run has been broken into or has halted at a STOP statement or at the termination of the program it may be dumped to disc. It may then be reloaded at a later time

and continued. The program is dumped as follows:–

DUMP Store the current object program on disc. Other users may not access the program.
DUMP RUN Store the current object program on disc. Other users may GET and continue the program.
DUMP SHARE Store the current object program on disc. Other users may GET, CONTINUE and copy the program.

When reloaded the program can be continued from any line number but it should be noted that program variables will still have the values they had when the program was dumped.

Loading object programs

CSAVE’d programs and DUMP’ed programs are loaded from disc by GET or OLD commands in the same way as SAVE’d programs.

e.g.:

GΕΤ ΑΑ22

will load the program AA22 from the users file. Any current program is deleted when the program is loaded.

Continuing programs

A program can be started or restarted with the CONTINUE command in the following circumstances:-

  1. The program run has been broken into.
  2. The program run has halted at a STOP statement.
  3. The program run has terminated normally.
  4. The program run has halted with an error message.
  5. A previously DUMP’ed program has been loaded.
  6. A previously CSAVE’d program has been loaded.

The CONTINUE command is used as follows:-

CON Continue from the next line.
CON st.no Continue from the given statement number.

Any size parameter specified in an associated CSAVE or RUN command will be retained when the program is continued but any channel associations set up in a previous run will not. Any MAT statement broken into will not be completed upon continuing.

Examples

Load the program and RUN it:

GET ABCD
RUN ABCD
LINE 420 BREAK IN

Continue from line number where break in occurred:

CON 420
ABCD
LINE 800 DONE

Give program new name:

NAM ABCDD

Dump program to disc:

DUM RUN

Reload:

SCR
GET ABCDD

Continue from line 20:

CON 20
ABCDD
LINE 800 DONE

The CHAIN statement

This statement allows a program to be run immediately after another. The program name in the CHAIN statement takes the place of the current program and is executed either from its first statement, or from the statement numbers pecified.

е.g.

Terminate execution of the current program and execute MYPROG from the first statement:

50 CΗΑΙΝ "ΜΥΡRΟG"

Terminate execution of the current program and execute PROG3 from statement number 40:

70 CHAIN "PROG3",40

CHAIN also allows channel associations to be retained. This is explained in the chapter on file-handling.

Immediate execute

Many program statements may be executed by entering the required statement without a line number.

  1. If a program is present in object form it is possible to access the program variables. This can be very helpful in debugging programs.

    e.g.:

    10 LET A = 77
    20 END
    RUN
    LINE 20 DONE
    
    ΡRΙΝΤ Α
    DONE
    
  2. The facility may be used in calculator mode.

    e.g.:

    PRINT 5.2*3.16+2.1
     34.5072
    DONE
    

Note: The following statements may not be used in immediate execute mode:-

DΑΤΑ
DEF
DΙΜ
END
FNEND
FOR
ΝΕΧΤ
ΟΡΤΙΟΝ ΒΑSΕ
REM

General commands

ΑCCΟUΝΤ

This supplies details of the user’s remaining budget. For example:

NO LOGINS = 00573 MAX = 99999
TOT TIME USED = 12844 MIN MAX = 99999 MIN
ΤΟΤ ΜΙLL ΤΙΜΕ = 00035 SΕC ΜΑΧ = 99999 SΕC
DISC USED = 0020 BUCKETS MAX = 0.024 BUCKETS

DISC

This supplies details of his usage of disc store. For example:

DISC USED = 0020 BUCKETS MAX = 0024 BUCKETS

DΑΤΕ

This gives the present date and time in the following format:

28/03/77 TIME 14/59/46

ΤΙΜΕ

This supplies details of the user’s usage of terminal time. For example:

ΤΕRΜ ΤΙΜΕ = 0014 ΜΙΝS ΤΟΤΑL = 12844 ΜΙΝS ΜΑΧ = 99999 ΜΙΝS

LENGTH

This gives the length of the current program. For example:

0015 LINES 0002 BUCKETS