Interactive data processing

<< Click to Display Table of Contents >>

Navigation:  User guide > Data >

Interactive data processing

Column binary, character and variable (IDF format) data can be read from the terminal during the execution step, and can be displayed as required.

Use Run Control Parameter INTERACTIVE if you wish to use the keyboard during execution.

Interactive data input

The A (accept) command prompts you at run time for character data and variable data. It can be used to read data directly into the character area, or into variables. Character data read in this way can be output to a raw data file, using PUNCH, and variable data can be output to an IDF, using WRITE or FINISH DATA.

The HOLD command prompts you at run time for column binary data. It reads data directly into the data locations. This data can then be output to a raw data file, using PUNCH.

The REPLY command prompts you at run time for a yes/no answer. It reads the reply into a variable, which can be output to an IDF if required.

If data input is to be solely from the terminal (i.e. no data files are to be read), then the START DATA (NOREAD) command should be used.

Interactive data output

The SHOW command can be used to display the values of individual variables, or data locations as required.

Testing a data stage

If you are unsure about a complicated data stage you can use a HOLD command at any point in the stage to suspend execution and allow you to inspect the contents of any variable or data location at the time:

if $age/b, hold $age.'variable age is empty',

or

if $test/4+5, hold $123.'test is 4 or 5',