This command opens an external data file for input (default), output or append and associates a AgileLoad Dataname with it for future reference.
The file must be located in the current repository "Data" directory.
OPEN fileName AS fileId;
OPEN fileName AS fileId FOR INPUT;
OPEN fileName AS fileId FOR OUTPUT;
OPEN fileName AS fileId FOR APPEND;
A string expression defining the name of the file to open.
A FILE variable used to identify the file for future references.
The FOR INPUT option opens the file for reading. If the file does not exist or cannot be found, the OPEN call fails.
The FOR OUTPUT option opens an empty file for writing. If the given file exists, its contents are destroyed.
The FOR APPEND option opens for writing at the end of the file or creates the file if it doesn’t exist.
// Open the "UserNames" file for reading
OPEN "UserNames" AS DataFile;
// Open the "OuputFile" file for writing
OPEN "OuputFile" AS DataFile FOR OUTPUT;
Copyright © AgileLoad. All rights reserved.