General form, DATASETS
procedure with the MODIFY and FORMAT statements:
PROC DATASETS LIB=SAS-library <NOLIST>;
MODIFY SAS-data-set;
FORMAT variable(s)
format;
QUIT;
SAS-library
is the name of the
SAS library that contains the data that you want to modify.
NOLIST
suppresses the directory
listing.
SAS-data-set
is the name of the
SAS data set you want to modify.
variable
is the name of one
or more variables whose format you want to assign, change, or remove.
format
is the name of a format
to apply to the variable or variables that are listed before it. If
you do not specify a format, any format that is associated with the
variable is removed.
|
General form, FMTSEARCH=
system option:
OPTIONS FMTSEARCH= (catalog-1
catalog-2...catalog-n);
catalog
is the name of one
or more catalogs to search. The value of catalog can
be either libref or libref.catalog.
If only the libref is given, SAS assumes that Formats is the catalog
name.
|
options fmtsearch=(rpt prod.newfmt);
General form, FMTERR
system option:
OPTIONS FMTERR | NOFMTERR;
FMTERR
specifies that when
SAS cannot find a specified variable format, it generates an error
message and stops processing. Substitution of a default format does
not occur.
NOFMTERR
replaces missing formats
with the w. or $w.
default format and continues processing.
|
proc print data=sasuser.cargorev(obs=10);
format route $route.;
run;
30 proc print data=sasuser.cargorev(obs=10);
31 format route $route.;
ERROR: The format $ROUTE was not found or could not be loaded.
32 run;
NOTE: The SAS System stopped processing this step because of errors. |
options nofmterr;
proc print data=sasuser.cargorev(obs=10);
format Route $route.;
run;