Week 5 Flashcards

1
Q

SAS INFORMANTS

A

Placed after variable name and ends with a .
Name $8. - 8 characters
DATE9.
Temp 5.1 - 5 width, 1 decimals
Used in a Format statement or in InPut line
Can do in data step or PROC print

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

User defined formats

A

PROC FORMAT;
VALUE var 0=‘no’
1=‘yes’;
RUN;
Best after the lib name statement

Then link the new format to the variable in a data step using informant
FORMAT var fmtvar.;

Used in. PROC step link is local only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

PROC FORMAT

A

PROC FORMAT;
VALUE fmtname range-1= ‘text’;
VALUE $fmtname ‘text’ = ‘format text’;

To remove format, declare format in a VALUE statement, but don’t include ranges

DOLLARw.d - counts all characters
PERCENTw.d.
SSNw.
Zw.d leading zeros

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to create a permanent format?

A

LIBNAME SASDATA ‘c://‘;
PROC FORMAT LIBRARY = SASDATA;
VALUE etc;
Run;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How to use formats from the permanent library?

A

LIBNAME SASDATA “C://“;
OPTIONS FMTSEARCH = (Work. Formats library.formats);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly