Você está na página 1de 9

SAS MADE EASY – TABLES BY LATHA

Formats by Category
There are four categories of formats in this list:
Category Description
Character instructs SAS to write character data values from character variables.
Date and Time instructs SAS to write data values from variables that represent dates,
times, and datetimes.
ISO 8601 instructs SAS to write date, time, and datetime values using the ISO 8601
standard.
Numeric instructs SAS to write numeric data values from numeric variables.

Category for each format:


Categories and Descriptions of Formats
Category Formats Description
Character $ASCIIw. Format Converts native format character data to ASCII
representation.
$BASE64Xw. Format Converts character data into ASCII text by using
Base 64 encoding.
$BINARYw. Format Converts character data to binary representation.
$CHARw. Format Writes standard character data.
$EBCDICw. Format Converts native format character data to EBCDIC
representation.
$HEXw. Format Converts character data to hexadecimal
representation.
$MSGCASEw. Format Writes character data in uppercase when the
MSGCASE system option is in effect.
$OCTALw. Format Converts character data to octal representation.
$QUOTEw. Format Writes data values that are enclosed in double
quotation marks.
$REVERJw. Format Writes character data in reverse order and preserves
blanks.
$REVERSw. Format Writes character data in reverse order and left aligns
$UPCASEw. Format Converts character data to uppercase.
$VARYINGw. Format Writes character data of varying length.
$w. Format Writes standard character data.
Date and Time $N8601Bw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the basic notations
PnYnMnDTnH nMnS and yyyymmddThhmmss.
$N8601BAw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the basic notations
PyyyymmddThhmmss and yyyymmdd Thhmmss.
$N8601Ew.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations
SAS MADE EASY – TABLES BY LATHA

PnYnMnDTn HnMnS and yyyy-mm-


ddT hh:mm:ss.
$N8601EAw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss.
$N8601EHw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss, using
a hyphen ( - ) for omitted components.
$N8601EXw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss, using
an x for digit of an omitted component.
$N8601Hw.d Format Writes ISO 8601 duration, datetime, and interval
forms P nYnMnDTnHnM nS and yyyy-mm-
ddThh:mm:ss, dropping omitted components in
duration values and using a hyphen ( - ) for omitted
components in datetime values.
$N8601Xw.d Format Writes ISO 8601 duration, datetime, and interval
forms P nYnMnDTnHnM nS and yyyy-mm-
ddThh:mm:ss, dropping omitted components in
duration values and using an x for each digit of an
omitted component in datetime values.
B8601DAw. Format Writes date values using the IOS 8601 base
notation yyyymmdd .
B8601DNw. Format Writes the date from a datetime value using the ISO
8601 basic notationyyyymmdd.
B8601DTw.d Format Writes datetime values in the ISO 8601 basic
notation yyyymmddThhmmssffffff.
B8601DZw. Format Writes datetime values in the Coordinated Universal
Time (UTC) time scale using ISO 8601 datetime and
time zone basic notation yyyymmddThhmmss+|-
hhmm.
B8601LZw. Format Writes time values as local time by appending a time
zone offset difference between the local time and
UTC, using the ISO 8601 basic time
notationhhmmss+|-hhmm.
B8601TMw.d Format Writes time values using the ISO 8601 basic
notation hhmmssffff .
B8601TZw. Format Adjusts time values to the Coordinated Universal
Time (UTC) and writes them using the ISO 8601
basic time notation hhmmss+|- hhmm.
DATEw. Format Writes date values in the
form ddmmmyy, ddmmmyyyy , or dd-mmm-yyyy.
DATEAMPMw.d Format Writes datetime values in the
form ddmmmyy:hh:mm:ss.ss with AM or PM.
SAS MADE EASY – TABLES BY LATHA

DATETIMEw.d Format Writes datetime values in the


form ddmmmyy:hh:mm:ss.ss.
DAYw. Format Writes date values as the day of the month.
DDMMYYw. Format Writes date values in the
form ddmm<yy> yy or dd/mm/<yy>yy , where a
forward slash is the separator and the year appears
as either 2 or 4 digits.
DDMMYYxw. Format Writes date values in the form ddmm<yy> yy or dd-
mm-yy<yy>, where the x in the format name is a
character that represents the special character that
separates the day, month, and year, which can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits.
DOWNAMEw. Format Writes date values as the name of the day of the
week.
DTDATEw. Format Expects a datetime value as input and writes date
values in the form ddmmmyyor ddmmmyyyy.
DTMONYYw. Format Writes the date part of a datetime value as the month
and year in the formmmmyy or mmmyyyy.
DTWKDATXw. Format Writes the date part of a datetime value as the day of
the week and the date in the form day-of-week, dd
month-name yy (or yyyy).
DTYEARw. Format Writes the date part of a datetime value as the year
in the form yy or yyyy.
DTYYQCw. Format Writes the date part of a datetime value as the year
and the quarter and separates them with a colon (:).
E8601DAw. Format Writes date values using the ISO 8601 extended
notation yyyy-mm-dd.
E8601DNw. Format Writes the date from a SAS datetime value using the
ISO 8601 extended notation yyyy-mm-dd.
E8601DTw.d Format Writes datetime values in the ISO 8601 extended
notation yyyy-mm-ddThh:mm:ss.ffffff.
E8601DZw. Format Writes datetime values in the Coordinated Universal
Time (UTC) time scale using ISO 8601 datetime and
time zone extended notations yyyy-mm-
ddThh:mm:ss+|-hh:mm.
E8601LZw. Format Writes time values as local time, appending the
Coordinated Universal Time (UTC) offset for the local
SAS session, using the ISO 8601 extended time
notation hh:mm:ss+|-hh:mm.
E8601TMw.d Format Writes time values using the ISO 8601 extended
notation hh:mm:ss.ffffff.
E8601TZw.d Format Adjusts time values to the Coordinated Universal
Time (UTC) and writes them using the ISO 8601
extended notation hh:mm :ss+|-hh:mm.
SAS MADE EASY – TABLES BY LATHA

HHMMw.d Format Writes time values as hours and minutes in the


form hh:mm .
HOURw.d Format Writes time values as hours and decimal fractions of
hours.
JULDAYw. Format Writes date values as the Julian day of the year.
JULIANw. Format Writes date values as Julian dates in the
form yyddd or yyyyddd.
MMDDYYw. Format Writes date values in the
form mmdd<yy> yy or mm/dd/<yy>yy , where a
forward slash is the separator and the year appears
as either 2 or 4 digits.
MMDDYYxw. Format Writes date values in the
form mmdd<yy> yy or mm-dd-<yy>yy , where
the x in the format name is a character that
represents the special character which separates the
month, day, and year. The special character can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits.
MMSSw.d Format Writes time values as the number of minutes and
seconds since midnight.
MMYYw. Format Writes date values in the form mmM<yy> yy, where
M is the separator and the year appears as either 2
or 4 digits.
MMYYxw. Format Writes date values in the form mm<yy> yy or mm-
<yy>yy, where the x in the format name is a
character that represents the special character that
separates the month and the year, which can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits.
MONNAMEw. Format Writes date values as the name of the month.
MONTHw. Format Writes date values as the month of the year.
MONYYw. Format Writes date values as the month and the year in the
form mmmyy or mmmyyyy.
PDJULGw. Format Writes packed Julian date values in the hexadecimal
format yyyydddF for IBM.
PDJULIw. Format Writes packed Julian date values in the hexadecimal
format ccyydddF for IBM.
QTRw. Format Writes date values as the quarter of the year.
QTRRw. Format Writes date values as the quarter of the year in
Roman numerals.
TIMEw.d Format Writes time values as hours, minutes, and seconds
in the form hh:mm:ss.ss.
TIMEAMPMw.d Format Writes time values as hours, minutes, and seconds
in the form hh:mm:ss.sswith AM or PM.
SAS MADE EASY – TABLES BY LATHA

TODw.d Format Writes SAS time values and the time portion of SAS
datetime values in the form hh:mm:ss.ss.
WEEKDATEw. Format Writes date values as the day of the week and the
date in the form day-of-week, month-name
dd, yy (or yyyy).
WEEKDATXw. Format Writes date values as the day of the week and date
in the form day-of-week,dd month-name
yy (or yyyy).
WEEKDAYw. Format Writes date values as the day of the week.
WEEKUw. Format Writes a week number in decimal format by using the
U algorithm.
WEEKVw. Format Writes a week number in decimal format by using the
V algorithm.
WEEKWw. Format Writes a week number in decimal format by using the
W algorithm.
WORDDATEw. Format Writes date values as the name of the month, the
day, and the year in the formmonth-name dd, yyyy.
WORDDATXw. Format Writes date values as the day, the name of the
month, and the year in the formdd month-name
yyyy.
YEARw. Format Writes date values as the year.
YYMMw. Format Writes date values in the form <yy>yyM mm, where
M is a character separator to indicate that the month
number follows the M and the year appears as either
2 or 4 digits.
YYMMxw. Format Writes date values in the form <yy>yymm or
<yy>yy-mm, where the x in the format name is a
character that represents the special character that
separates the year and the month, which can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits.
YYMMDDw. Format Writes date values in the form yymmdd or < yy>yy-
mm-dd, where a dash is the separator and the year
appears as either 2 or 4 digits.
YYMMDDxw. Format Writes date values in the form yymmdd or < yy>yy-
mm-dd, where the x in the format name is a
character that represents the special character which
separates the year, month, and day. The special
character can be a hyphen (-), period (.), blank
character, slash (/), colon (:), or no separator; the
year can be either 2 or 4 digits.
YYMONw. Format Writes date values in the
form yymmm or yyyymmm .
YYQw. Format Writes date values in the form <yy>yyQ q, where Q
is the separator, the year appears as either 2 or 4
SAS MADE EASY – TABLES BY LATHA

digits, and q is the quarter of the year.


YYQxw. Format Writes date values in the form <yy>yyq or <yy>yy-
q, where the x in the format name is a character that
represents the special character that separates the
year and the quarter or the year, which can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits.
YYQRw. Format Writes date values in the form <yy>yyQ qr, where Q
is the separator, the year appears as either 2 or 4
digits, and qr is the quarter of the year expressed in
roman numerals.
YYQRxw. Format Writes date values in the form <yy>yy qr or <yy>yy-
qr, where the x in the format name is a character
that represents the special character that separates
the year and the quarter or the year, which can be a
hyphen (-), period (.), blank character, slash (/), colon
(:), or no separator; the year can be either 2 or 4
digits and qr is the quarter of the year expressed in
roman numerals.
ISO 8601 $N8601Bw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the basic notations
PnYnMnDTnH nMnS and yyyymmddThhmmss.
$N8601BAw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the basic notations
PyyyymmddThhmmss and yyyymmdd Thhmmss.
$N8601Ew.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations
PnYnMnDTn HnMnS and yyyy-mm-
ddT hh:mm:ss.
$N8601EAw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss.
$N8601EHw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss, using
a hyphen ( - ) for omitted components.
$N8601EXw.d Format Writes ISO 8601 duration, datetime, and interval
forms using the extended notations Pyyyy-mm-
ddThh:mm:ss and yyyy-mm-ddThh:mm:ss, using
an x for digit of an omitted component.
$N8601Hw.d Format Writes ISO 8601 duration, datetime, and interval
forms P nYnMnDTnHnM nS and yyyy-mm-
ddThh:mm:ss, dropping omitted components in
duration values and using a hyphen ( - ) for omitted
components in datetime values.
$N8601Xw.d Format Writes ISO 8601 duration, datetime, and interval
SAS MADE EASY – TABLES BY LATHA

forms P nYnMnDTnHnM nS and yyyy-mm-


ddThh:mm:ss, dropping omitted components in
duration values and using an x for each digit of an
omitted component in datetime values.
B8601DAw. Format Writes date values using the IOS 8601 base
notation yyyymmdd .
B8601DNw. Format Writes the date from a datetime value using the ISO
8601 basic notationyyyymmdd.
B8601DTw.d Format Writes datetime values in the ISO 8601 basic
notation yyyymmddThhmmssffffff.
B8601DZw. Format Writes datetime values in the Coordinated Universal
Time (UTC) time scale using ISO 8601 datetime and
time zone basic notation yyyymmddThhmmss+|-
hhmm.
B8601LZw. Format Writes time values as local time by appending a time
zone offset difference between the local time and
UTC, using the ISO 8601 basic time
notationhhmmss+|-hhmm.
B8601TMw.d Format Writes time values using the ISO 8601 basic
notation hhmmssffff .
B8601TZw. Format Adjusts time values to the Coordinated Universal
Time (UTC) and writes them using the ISO 8601
basic time notation hhmmss+|- hhmm.
E8601DAw. Format Writes date values using the ISO 8601 extended
notation yyyy-mm-dd.
E8601DNw. Format Writes the date from a SAS datetime value using the
ISO 8601 extended notation yyyy-mm-dd.
E8601DTw.d Format Writes datetime values in the ISO 8601 extended
notation yyyy-mm-ddThh:mm:ss.ffffff.
E8601DZw. Format Writes datetime values in the Coordinated Universal
Time (UTC) time scale using ISO 8601 datetime and
time zone extended notations yyyy-mm-
ddThh:mm:ss+|-hh:mm.
E8601LZw. Format Writes time values as local time, appending the
Coordinated Universal Time (UTC) offset for the local
SAS session, using the ISO 8601 extended time
notation hh:mm:ss+|-hh:mm.
E8601TMw.d Format Writes time values using the ISO 8601 extended
notation hh:mm:ss.ffffff.
E8601TZw.d Format Adjusts time values to the Coordinated Universal
Time (UTC) and writes them using the ISO 8601
extended notation hh:mm :ss+|-hh:mm.
Numeric BESTw. Format SAS chooses the best notation.
BESTDw.p Format Prints numeric values, lining up decimal places for
values of similar magnitude, and prints integers
without decimals.
SAS MADE EASY – TABLES BY LATHA

BINARYw. Format Converts numeric values to binary representation.


COMMAw.d Format Writes numeric values with a comma that separates
every three digits and a period that separates the
decimal fraction.
COMMAXw.d Format Writes numeric values with a period that separates
every three digits and a comma that separates the
decimal fraction.
Dw.p Format Prints numeric values, possibly with a great range of
values, lining up decimal places for values of similar
magnitude.
DOLLARw.d Format Writes numeric values with a leading dollar sign, a
comma that separates every three digits, and a
period that separates the decimal fraction.
DOLLARXw.d Format Writes numeric values with a leading dollar sign, a
period that separates every three digits, and a
comma that separates the decimal fraction.
Ew. Format Writes numeric values in scientific notation.
FLOATw.d Format Generates a native single-precision, floating-point
value by multiplying a number by 10 raised to the dth
power.
FRACTw. Format Converts numeric values to fractions.
HEXw. Format Converts real binary (floating-point) values to
hexadecimal representation.
IBw.d Format Writes native integer binary (fixed-point) values,
including negative values.
IBRw.d Format Writes integer binary (fixed-point) values in Intel and
DEC formats.
IEEEw.d Format Generates an IEEE floating-point value by
multiplying a number by 10 raised to the dth power.
NEGPARENw.d Format Writes negative numeric values in parentheses.
NUMXw.d Format Writes numeric values with a comma in place of the
decimal point.
OCTALw. Format Converts numeric values to octal representation.
PDw.d Format Writes data in packed decimal format.
PERCENTw.d Format Writes numeric values as percentages.
PERCENTNw.d Format Produces percentages, using a minus sign for
negative values.
PIBw.d Format Writes positive integer binary (fixed-point) values.
PIBRw.d Format Writes positive integer binary (fixed-point) values in
Intel and DEC formats.
PKw.d Format Writes data in unsigned packed decimal format.
PVALUEw.d Format Writes p-values.
RBw.d Format Writes real binary data (floating-point) in real binary
format.
SAS MADE EASY – TABLES BY LATHA

ROMANw. Format Writes numeric values as roman numerals.


S370FFw.d Format Writes native standard numeric data in IBM
mainframe format.
S370FIBw.d Format Writes integer binary (fixed-point) values, including
negative values, in IBM mainframe format.
S370FIBUw.d Format Writes unsigned integer binary (fixed-point) values in
IBM mainframe format.
S370FPDw.d Format Writes packed decimal data in IBM mainframe
format.
S370FPDUw.d Format Writes unsigned packed decimal data in IBM
mainframe format.
S370FPIBw.d Format Writes positive integer binary (fixed-point) values in
IBM mainframe format.
S370FRBw.d Format Writes real binary (floating-point) data in IBM
mainframe format.
S370FZDw.d Format Writes zoned decimal data in IBM mainframe format.
S370FZDLw.d Format Writes zoned decimal leading-sign data in IBM
mainframe format.
S370FZDSw.d Format Writes zoned decimal separate leading-sign data in
IBM mainframe format.
S370FZDTw.d Format Writes zoned decimal separate trailing-sign data in
IBM mainframe format.
S370FZDUw.d Format Writes unsigned zoned decimal data in IBM
mainframe format.
SSNw. Format Writes Social Security numbers.
VAXRBw.d Format Writes real binary (floating-point) data in VMS format.
VMSZNw.d Format Generates VMS and MicroFocus COBOL zoned
numeric data.
w.d Format Writes standard numeric data one digit per byte.
WORDFw. Format Writes numeric values as words with fractions that
are shown numerically.
WORDSw. Format Writes numeric values as words.
Zw.d Format Writes standard numeric data with leading 0s.

Você também pode gostar