Form Input Operation (Magic xpa 2.x)
You can use this operation to read a section from a text file or an input device and to load the contents into variables defined in the related form.
You can use the Form Input operation to:
Note:
|
This operation is not supported in Rich Client tasks.
|
The Form Input operation properties are:
Form
IO
Delimiter
Chr
Flow Mode
Flow Direction
Condition
You can use the Program Generator to automatically generate a data input program.
SIDE EFFECT: Loading data from an input text file into a variable that is part of an INIT or Link expression triggers their non-procedural recomputing.
Be sure to specify a separate Form Input operation with a separate Form corresponding to each different record layout present in the input text file.
When used in Batch tasks using the 0 Scratch File, you have to define an End Task expression in the Task Properties dialog box to terminate the execution of the Batch task either when the input text file has reached its end (using the EOF (End-of-File) function), or when a predefined number of records has been read from the file.
You can define a Form with multiple lines, to read an equivalent number of physical records from the external input text file using one Form Input operation. Use this technique when you are copying data from an input text file to create a DB table, and each record of the DB table is based on data spanning several lines of the input text file.
Each line in a Form can have a maximum width of 9999 bytes. Thus, you can use the Form Input operation to read input records containing up to 9999 bytes.
The maximum Content Size of one Form, that is, the product of lines multiplied by columns, is 32KB.
The numeric variables of the input text file records may include commas and decimal points (edited numeric values).
For each Form Input operation, Magic xpa will attempt to read from the Input file records whose length equals the width of the Form used with the operation. If a line terminator appears before the Form Width number of characters have been read, Magic xpa will terminate the Form Input operation at this point.