FILE HANDLE

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.

FILE HANDLE handle /NAME='path and/or file specifications' 
                  [/MODE={CHARACTER }] [/RECFORM={FIXED   } [/LRECL=n]
                         {BINARY    }            {VARIABLE}
                         {MULTIPUNCH}            {SPANNED }
                         {IMAGE     }
                         {360       }
                  [/ENCODING = 'encoding specification']

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History

Release 13.0

  • The NAME subcommand is modified to accept a path and/or file.

Release 16.0

  • ENCODING subcommand added for Unicode support.

Example

FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
FILE HANDLE dataDirectory /NAME='/sales/data'.
GET FILE 'thisMonthFile'.
GET FILE 'dataDirectory/july.sav'.