PING  0.9
Statistical data handling and processing in production environment
data_selective_export

Perform selective export of a dataset to any format accepted by PROC EXPORT.

%data_selective_export(idsn, time=, geo=, idir=, ilib=, odir=, _ofn_=, fmt=csv);

Arguments

  • idsn : input dataset(s) to export;
  • geo : (option) a list of countries or a geographical area; default: geo=, or geo=_ALL_VALUES_, so that the whole dataset will be exported; in practice, a where clause is created using this list;
  • time : (option) year(s) of interest; default: time=, or time=_ALL_VALUES_, so that the whole dataset will be exported; ibid geo;
  • idir : (option) name of the input directory where to look for input datasets, passed instead of ilib; incompatible with ilib; by default, ilib will be set to the current directory;
  • ilib : (option) name of the input library where to look for input datasets; incompatible with idir; by default, it is not used.

Returns

  • _ofn_ : (option) name (string) of the macro variable storing the output exported file name(s);
  • odir : (option) output directory/library to store the converted dataset; by default, it is set to:
    • the location of your project if you are using SAS EG (see %egp_path),
    • the path of sysget(SAS_EXECFILEPATH) if you are running on a Windows server,
    • the location of the library passed through ilib (i.e., sysfunc(pathname(&ilib))) otherwise.

See also

%ds_export, %ds_select.