Function
Read the lines immediately following into a serial file.
Format
Format 1 is for use within a job, whenthe user has been established. Format 2 should be used to preface an external document. With both formats the mode,TABS(P1,P2,...Pn) andterminator parameters are optional and may be submitted in any order: null parameters are not therefore required if these parameters are missing. An INPUT command at a command processor level other than zero will ignore any mode parameter and set up a file of the same type and mode as the file from which the command is issued.
If TABS is specified, then tabulate characters occuring in paper tapes being INPUT are converted by GEORGE into the appropriate number of spaces to put the next character in the next tabulate position. This facility enables GRAPHIC set to be used with fixed format languages such as PLAN.
The character positions of the tabulations are indicated by
P1 to Pn. For example, for a PLAN
program the TABS parameter would be:
TABS(7,13,16,36,73,76)
GRAPHIC mode may then be used and the tab will automatically be converted
into spaces.
If there is more than one valid TABS parameter only the first is implemented; the rest are ignored.
TABS parameters are ignored if given with embedded INPUT commands.
When no TABS parameter is given, any tab characters in the data are passed across without conversion if the input mode is NORMAL or ALLCHAR, and discarded if the input mode is GRAPHIC.
The directory specified or implied in the file description must either be the user's proper directory or a psuedo user's directory that belongs to the proper user. If the local name of hte file is to be issued as a macro (by RUNJOB), it must not contain spaces.
The TRAPGO entrant description qualifier may be given with the INPUT command to grant the required mode of access to the file to the required users.
If the file specified exists and the user has the correct traps for it, the new information will be appended to the file if APPEND is given as a qualifier to the file description.
Forbidden contexts
NO USER, OPERATOR (Format 1)
USER, OPERATOR (Format 2)
Execution
If the named file does not exist, one is created. If it already exists, the normal rules hold with regard to overwriting it. Records following the INPUT command are written to the file until a record starting with the four specified terminating characters is encountered. When issuing this command from a MOP terminal, the user must wait for each line to be accepted before typing the next one.
If the command is issued from a card or paper tape reader and the correct
terminator is not found, GEORGE will read to the end of the cards or
paper tape and output the message
PLEASE ENGAGE UNIT number
on the operator's console. The operator has three alternatives:
These three options are also available to the operator in the event of a
peripheral failure. If the failure is caused by a transfer error the
message
PLEASE ENGAGE UNIT peripheral description
FOR ERROR RESTART
will be output.
If INPUT detects that the input file has reached the maximum size of 245K
words, the peripheral will be disengaged and the message:
FILE filename OVERFLOWED DURING INPUT/JOB
ON UNIT n
is output to the operator's console. The operator then has three courses
of action:
If the command is issued from a macro definition file and the correct
terminator is not found, GEORGE will continue to read lines up to the end
of the file at that level. It will then send the error message
TERMINATOR MISSING
close the INPUT file as though it had read the terminator and return to
command level. The action of the command processor at this point depends
on the level at which the INPUT command was issued. The command processor
will return to the next higher level unless it is already in the job
description file, in which case it will act as though it had reached the
end of the file without encountering an ENDJOB command. The data following an INPUT command
issued in a macro definition file must be in the same mode as the file.
Examples
| INPUT DATAFILE,GRAPHIC,TABS(10,20,50),T#### | The data that follows the command will be written to a file called DATAFILE in GRAPHIC mode. The lines of data are terminated by a line beginning ####, which is not to be stored. Any tabulate characters in the data will be converted into the appropriate number of spaces to put the next character into the 10th, 20th or 50th position - whichever is next. |
| INPUT :FRED,:Z.CARDFILE | The data will be stored in a file called CARDFILE under :Z's directory where :Z is a pseudo user whose directory belongs to :FRED. The mode of the file depends on the source of the command. The lines of data are terminated by the standard terminator of ****, which is stored. |
Error Messages
FILE NAME PARAMETER MISSING
TERMINATOR MISSING
USER NAME PARAMETER MISSING
z IS NOT A VALID MODE
z IS NOT A VALID TERMINATOR