Chapter Contents

Previous

Next
FILEDIALOG

FILEDIALOG



Displays a selection window that lists external files

Category: External File


Syntax
Details
Examples
See Also

Syntax

rc=FILEDIALOG(dialog-type,filename<,default-file <,default-dir<,filter-1<. . . ,filter-11<,description-1 . . .<description-11>>>>>>);

rc
contains the return code for the operation:
-1 A user cancelled without selecting a file.
0 Either dialog-type is OPEN and the file exists, or dialog-type is SAVEAS and the file does not exist.
1 Dialog-type is SAVEAS, the file exists, and the user wants to replace the file.
2 Dialog-type is SAVEAS, the file exists, and a user wants to append to the file.

Type: Numeric

dialog-type
specifies the type of dialog window to open. An invalid type specification produces an error and halts the program. Types are

'AGGREGATE'
lists aggregate storage areas -- for example, directories, partitioned data sets, or MACLIBs.

'LIBRARY'
lists SAS data libraries.

'OPEN'
lists files that a user can open.

'SAVEAS'
lists files that a user can write to.

Type: Character

filename
is the fully qualified name of the selected file, including the directory.

Note:   This parameter is an update parameter. See Input, Output, and Update Parameters for more information.  [cautionend]

Type: Character

default-file
is the name of the file (without directory information) to display as selected when the dialog window opens. If you specify a null string (''), the file that was selected last is the default file.

Type: Character

default-dir
is the directory whose files are listed when the dialog window opens. If you specify a null string (''), the directory that was selected last is the default directory.

Type: Character

filter1 ... filter11
are up to 11 name specifications to narrow the list of files to display -- for example, *.html. The number of filter arguments is host specific. If you do not supply a filter, the list contains all files in default-dir.

Type: Character

description1 ... description11
are up to 11 descriptions, one for each filter, to make the dialog window more informative for application users. If no descriptions are supplied, a default description is displayed for each specified filter. If you provide a description for any filter, then you must supply a description for each filter that you specify.

Type: Character


Details

Depending on the values of default-dir and filter, default-file may not be in the list of files displayed. Therefore, default-file will not be selected.

An error condition is produced if you supply a description for at least one filter but fail to supply a description for each specified filter.

Operating Environment Information:   The formats of the files and filter parameters are all host specific. The UNIX and MicroSoft Windows platforms use all of the passed filters. The Macintosh platform ignores the filter argument. All other platforms use only the first filter that is passed.  [cautionend]


Examples


See Also

FILELIST


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.