PURPOSE: The SF DATA INPUT option controls whether data is taken from the System File (SF) or the terminal when a SF is open. This command is valid in a CM, PM, SF and as a direct command.
{ENABLE; DISABLE} SF /DATA / INPUT [{IF; UNLESS} clause]
ENABLE |
allows data input from the opened SF. This is the default state. |
DISABLE |
allows data input from the terminal, overriding the default state. DISABLE SF DATA INPUT does not close the SF, and, if an ENABLE SF DATA INPUT command or statement subsequently occurs, ACCENT R returns to the same SF. Input from that SF will resume at the next line. |
{IF; UNLESS} clause |
specifies certain criteria that must be met for the ENABLE or DISABLE command to take effect. |
The DISABLE SF DATA INPUT command is used below to allow an interactive response at the terminal to line 20 of the Command Module (CM). A program that requests data input always seeks it first from an opened SF unless a DISABLE SF DATA INPUT statement is in effect; thus, the ACCEPT statement would go to line 40 of SF BEGIN.ACC for its data and mistakenly interpret QUIT to be the USER_NAME.
*LIST SF BEGIN.ACC
00010 DISABLE SF DATA INPUT
00020 USE DBL BIZNIS
00030 USE CM INTERACTIVE_PROGRAM
00040 QUIT
*LIST CM INTERACTIVE_PROGRAM
00010 TYPE "USER NAME:", NOCR
00020 ACCEPT @STRING
NOTES: You can force data to be read from the Terminal while in an SF using the TERMINAL command.
SEE ALSO: SF COMMAND INPUT, TERMINAL