General form, CNTLIN=
option in PROC FORMAT:
PROC FORMAT LIBRARY=libref.catalog
CNTLIN=SAS-data-set;
libref.catalog
is the name of the
catalog in which you want to store the format.
SAS-data-set
is the name of the
SAS data set that you want to use to create the format.
|
proc format lib=myfmts cntlin=routes; run;
value rainfall 0='none';
City Where Airport Is
Located
|
Start Point
|
Airport Name
|
Country Where Airport
Is Located
|
---|---|---|---|
Auckland
|
AKL
|
International
|
New Zealand
|
Amsterdam
|
AMS
|
Schiphol
|
Netherlands
|
Anchorage, AK
|
ANC
|
Anchorage International
Airport
|
USA
|
Stockholm
|
ARN
|
Arlanda
|
Sweden
|
Athens (Athinai)
|
ATH
|
Hellinikon International
Airport
|
Greece
|
Birmingham, AL
|
BHM
|
Birmingham International
Airport
|
USA
|
Bangkok
|
BKK
|
Don Muang International
Airport
|
Thailand
|
data sasuser.aports; keep Start Label FmtName; retain FmtName '$airport'; set sasuser.acities (rename=(Code=Start City= Label)); run; proc print data=sasuser.aports(obs=10) noobs; run;
proc format library=sasuser cntlin=sasuser.aports;
run;
proc format library=sasuser fmtlib;
select $airport;
run;
FORMAT NAME : $AIRPORT
LENGTH: 22 NUMBER OF VALUES: 52 MIN LENGTH: 1 MAX
LENGTH: 40 DEFAULT LENGTH: 22 FUZZ: 0
|
||
---|---|---|
START
|
END
|
LABEL (VER. V7|V8 21OCT2002:14:13:14)
|
AKL
|
AKL
|
Auckland
|
AMS
|
AMS
|
Amsterdam
|
ANC
|
ANC
|
Anchorage, AK
|
ARN
|
ARN
|
Stockholm
|
ATH
|
ATH
|
Athens (Athinai)
|
BHM
|
BHM
|
Birmingham, AL
|
BKK
|
BKK
|
Bangkok
|
options fmtsearch=(sasuser);
proc print data=sasuser.cargo99 (obs=5);
var origin dest cargorev;
format origin dest $airport.;
run; |
|