


The DOPEN function similarly to the FOPEN function returns a directory identifier and allows the directory to be opened for input. When utilised effectively, they can be used to create a loop of all of the files within the directory in order to read the FINFO for each of the files. These functions are the DOPEN, DNUM and DREAD functions. Three extra functions are available to make it possible to read in the FINFO from a directory of files. There are in total ten files stored within this location. Sometimes it can be useful to gain the FINFO from a number of files in a directory. The data for the Class Names file can be seen in the table below: This closes the file and outputs a system return code of 0 for a file that has been successfully closed or not 0 for a file that was unsuccessful. Finally, it is important to close the file using the SYSRC=FCLOSE function. Once the file is opened the FINFO functions can be used to access the info items required.

In order to access the info items for a single file, the FOPEN function must be used to return a file identifier for the file and allow the file to be opened for input. The Logical Report Length - the length of the input buffer created during DATA step processing. P = Print, the SAS System write carriage-control characters. N = Binary, the file has no record boundaries. V = Variable, each record ends in a newline character.į = Fixed, each record has the same length. A total of six attributes named ‘info items’ can be identified through the use of the FINFO function and are formatted as below. The FINFO function can be used to gain a number of file attributes from the Windows file system.
