Overview (FILE HANDLE command)
FILE HANDLE assigns a unique file handle to a path and/or file and supplies operating system specifications
for the file. A defined file handle can be specified on any subsequent FILE, OUTFILE, MATRIX, or WRITE subcommands of various procedures.
The minimum specification is the command name followed by the string
that will be used as the handle, followed by the NAME subcommand that specifies either a file or directory,
as in:
FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
Syntax Rules
- The handle, specified immediately after the command name, must conform to variable naming rules. See the topic Variable Names for more information.
-
FILE HANDLEis required for reading data files with record lengths greater than 8,192. See the topic LRECL Subcommand (FILE HANDLE command) for more information. -
FILE HANDLEis required for reading IBM VSAM datasets, EBCDIC data files, binary data files, and character data files that are not delimited by ASCII line feeds. - If you specify
360on theMODEsubcommand, you must specifyRECFORM. - If you specify
IMAGEon theMODEsubcommand, you must specifyLRECL.
Operations
A file handle is used only during the current session. The handle is never saved as part of a data file. The normal quoting conventions for file specifications apply, with or without file handles.