Input and output


Data can be read into GenStat data structures using the READ directive or the FILEREAD procedure:


READ
reads data from an input file, an unformatted file or a text

FILEREAD
reads data from a file, assumed to be in a rectangular array


Files can be connected to input, output or other channels during execution of a GenStat program. Channels can also be closed, terminating the connection, so that they can be attached to other files.


OPEN
opens files and connects them to GenStat input/output channels

CLOSE
closes files, freeing the channels to which they were attached


The channel from which input statements are taken can be changed, as can the channel to which output is sent. It is also possible to send a transcript (or copy) of input and/or output to output files, to skip sections of input or output files, and to obtain information about the files connected to each channel.


INPUT
specifies the channel from which subsequent statements should be read

RETURN
returns to the previous input channel

OUTPUT
specifies the channel to which future output should be sent

COPY
requests a transcript of subsequent input and/or output

SKIP
skips lines of input or output files

ENQUIRE
provides details about files opened by GenStat


The contents of data structures can be "printed" into output files or into text structures, using the PRINT directive. The CAPTION directive produces captions and titles. Other directives allow system information or details of attributes of structures to be printed, or syntax details to be obtained. Directive SKIP, as mentioned above, allows blank lines to be inserted in output files; PAGE moves to the top of the next page.


PRINT
prints data in tabular form to an output file or text

CAPTION
prints captions and titles in standardized formats

LIST
lists details of the data structures that currently exist in your program

PAGE
moves to the top of the next page of an output file

DISPLAY
repeats the last GenStat diagnostic

DUMP
prints attributes of data structures and other internal information

HELP
provides help information about GenStat


Other information is available from the procedures in the help module of the GenStat Procedure Library:


LIBHELP
provides help information for Library procedures

LIBEXAMPLE
accesses examples and source code of Library procedures

LIBINFORM
prints information about the contents of the Procedure Library

LIBMANUAL
prints a "Manual" for the Procedure Library

LIBVERSION
provides the name of the current GenStat Procedure Library

NOTICE
gives access to the GenStat Notice Board (news, errors, instructions for authors of procedures etc.)


Menus can be defined:


QUESTION
obtains a response using a GenStat menu

QFACTOR
allows the user to decide to convert texts or variates to factors

QLIST
presents a sequence of menus to obtain a response from a list


The values of a data structure, with all its defining information, can be stored in a sub-file of a "backing-store" file. It can then be retrieved in a later job, without the need to repeat the definitions. The current state of the whole job can also be dumped to an unformatted file, so that it can be picked up and continued on a later occasion.


STORE
stores data structures in a backing-store file

RETRIEVE
retrieves data structures from a backing-store file

CATALOGUE
displays the contents of a backing-store file

MERGE
copies sub-files of backing-store files into a single file

RECORD
dumps the complete details of a job

RESUME
reads and restarts a recorded job