| Directives |
|
| Formats |
|
|||||||||||||||||||||
| Description | Use the READ DATA directive to read data embedded in a program. | |||||||||||||||||||||
| See Also | DATA
Define Data Elements, RESTORE Reset Program Data Position, BEGIN Reset Files and Variables, LOAD Read Program into Memory. |
|||||||||||||||||||||
| Format 1 | Read Data
Use this format to transfer the values/expressions from data statements in a program to the variables identified in varlist. When READ DATA is executed, ProvideX evaluates each expression in the data statements, in order, and places the values into the corresponding variables defined in your READ DATA directive. ProvideX increments an internal pointer to the next data expression during the reading of data$. When the end of a data statement is reached, the next data statement in the program is used. Use a RESTORE directive to reset the pointer to the start of the first data statement. Include the END= or ERR= option, to avoid an Error #2 when the pointer is at End-of-File.
|
|||||||||||||||||||||
| Format 2 | Read Data from String
You can READ DATA FROM a string to initialize a list of variables or to parse a record into different IOLists. Example 2. Initialize Variables: You can READ DATA to an IOList to initialize all variables.
You can use READ DATA to parse a record into different IOLists.
|
|||||||||||||||||||||