Formats by Category


There are six categories of formats in SAS:

Category

Description

BIDI text handling instructs

SAS to write bidirectional data values from data variables

Character

instructs SAS to write character data values from character variables.

Currency Conversion

instructs SAS to convert an amount from one currency to another currency.

DBCS

instructs SAS to handle various Asian languages.

Date and Time

instructs SAS to write data values from variables that represent dates, times, and datetimes.

Hebrew text handling

instructs SAS to write Hebrew data from data variables

Numeric

instructs SAS to write numeric data values from numeric variables.

User -Defined

instructs SAS to write data values by using a format that is created with PROC FORMAT.

Storing user-defined formats is an important consideration if you associate these formats with variables in permanent SAS data sets, especially those shared with other users. For information on creating and storing user-defined formats, see 'The FORMAT Procedure' in Base SAS Procedures Guide .

The following table provides brief descriptions of the SAS formats. For more detailed descriptions, see the dictionary entry for each format.

Table 3.3: Categories and Descriptions of Formats

Category

Format

Description

BIDI text handling

'$LOGVS w . Format' on page 99

Converts character data in left-to-right logical order to visual order

 

'$LOGVSR w . Format' on page 99

Converts text in right-to-left logical order to visual order

 

'$VSLOG w . Format' on page 111

Converts data in visual order to left-to-right logical order

 

'$VSLOGR w . Format' on page 112

Converts text in visual order to right-to-left logical order

Character

'$ASCII w . Format' on page 93

Converts native format character data to ASCII representation

 

'$BIDI w . Format' on page 94

Convert a Logical ordered string to a Visually ordered string, and vice versa by reversing the order of Hebrew characters while preserving the order of Latin characters and numbers

 

'$BINARY w . Format' on page 94

Converts character data to binary representation

 

'$CHAR w . Format' on page 95

Writes standard character data

 

'$EBCDIC w . Format' on page 96

Converts native format character data to EBCDIC representation

 

'$HEX w . Format' on page 97

Converts character data to hexadecimal representation

 

'$MSGCASE w . Format' on page 99

Writes character data in uppercase when the MSGCASE system option is in effect

 

'$OCTAL w . Format' on page 100

Converts character data to octal representation

 

'$QUOTE w . Format' on page 101

Writes data values that are enclosed in double quotation marks

 

'$REVERJ w . Format' on page 103

Writes character data in reverse order and preserves blanks

 

'$REVERS w . Format' on page 103

Writes character data in reverse order and left aligns

 

'$UCS2B w . Format' on page 104

Writes a SAS value in big endian 16-bit UCS2 Unicode without a byte order mark

 

'$UCS2BE w . Format' on page 105

Writes data in the encoding of the current SAS session

 

'$UCS2L w . Format' on page 105

Writes a SAS value in 16-bit UCS2 Unicode with little-endian byte ordering

 

'$UCS2LE w . Format' on page 105

Writes data in the encoding of the current SAS session

 

'$UCS2X w . Format' on page 105

Writes 16-bit UCS2 Unicode without byte order mark

 

'$UCS2XE w . Format' on page 106

Writes data in the encoding of the current SAS session

 

'$UCS4B w . Format' on page 106

Writes a SAS value in big endian 16-bit UCS4 Unicode without a byte order mark

 

'$UCS4BE w . Format' on page 106

Writes data in the encoding of the current SAS session

 

'$UCS4L w . Format' on page 106

Writes a SAS value in 16-bit UCS4 Unicode with little-endian byte ordering

 

' $UCS4LE w . Format' on page 107

Writes data in the encoding of the current SAS session

 

'$UCS4X w . Format' on page 107

Writes a SAS value in native endian 16-bit UCS4 Unicode without a byte order mark

 

'$UCS4XE w . Format' on page 107

Writes data in the encoding of the current SAS session

 

'$UESC w . Format' on page 107

Writes a SAS value to Unicode escape representation using native encoding

 

'$UESCE w . Format' on page 108

Writes a Unicode Escapes SAS value to SAS session encoding using native encoding

 

'$UNCR w . Format' on page 108

Writes a SAS value in National characters, uascii (/ uXXYY), uparen (<uXXYY>) to NCR (Numeric Character Reference)

 

'$UNCRE w . Format' on page 108

Writes a SAS value in NCR (Numeric Character Reference) to Native encoding

 

'$UPAREN w . Format' on page 108

Writes a SAS value to Unicode format using native encoding

 

'$UPARENE w . Format' on page 109

Writes a SAS value to Unicode format using native encoding

 

'$UPCASE w . Format' on page 109

Converts character data to uppercase

 

'$UTF8X w . Format' on page 110

Writes character data in Unicode Transformation Format (UTF-8) encoding

 

'$VARYING w . Format' on page 110

Writes character data of varying length

 

'$ w . Format' on page 112

Writes standard character data

Currency Conversion

'EURFRATS w . d Format' on page 139

Converts an amount from Austrian schillings to euros

 

'EURFRBEF w . d Format' on page 139

Converts an amount from Belgian francs to euros

 

'EURFRCHF w . d Format' on page 140

Converts an amount from Swiss francs to euros

 

'EURFRCZK w . d Format' on page 140

Converts an amount from Czech koruny to euros

 

'EURFRDEM w . d Format' on page 140

Converts an amount from Deutsche marks to euros

 

'EURFRDKK w . d Format' on page 140

Converts an amount from Danish kroner to euros

 

'EURFRESP w . d Format' on page 140

Converts an amount from Spanish pesetas to euros

 

'EURFRFIM w . d Format' on page 141

Converts an amount from Finnish markkaa to euros

 

'EURFRFRF w . d Format' on page 141

Converts an amount from French francs to euros

 

'EURFRGBP w . d Format' on page 141

Converts an amount from British pounds to euros

 

'EURFRGRD w . d Format' on page 141

Converts an amount from Greek drachmas to euros

 

'EURFRHUF w . d Format' on page 142

Converts an amount from Hungarian forints to euros

 

'EURFRIEP w . d Format' on page 142

Converts an amount from Irish pounds to euros

 

'EURFRITL w . d Format' on page 142

Converts an amount from Italian lire to euros

 

'EURFRLUF w . d Format' on page 142

Converts an amount from Luxembourg francs to euros

 

'EURFRNLG w . d Format' on page 142

Converts an amount from Dutch guilders to euros

 

'EURFRNOK w . d Format' on page 143

Converts an amount from Norwegian krone to euros

 

'EURFRPLZ w . d Format' on page 143

Converts an amount from Polish zlotys to euros

 

'EURFRPTE w . d Format' on page 143

Converts an amount from Portuguese escudos to euros

 

'EURFRROL w . d Format' on page 143

Converts an amount from Romanian lei to euros

 

'EURFRRUR w . d Format' on page 144

Converts an amount from Russian rubles to euros

 

'EURFRSEK w . d Format' on page 144

Converts an amount from Swedish kronor to euros

 

'EURFRSIT w . d Format' on page 144

Converts an amount from Slovenian tolars to euros

 

'EURFRTRL w . d Format' on page 144

Converts an amount from Turkish liras to euros

 

'EURFRYUD w . d Format' on page 144

Converts an amount from Yugoslavian dinars to euros

 

'EURTOATS w . d Format' on page 145

Converts an amount in euros to Austrian schillings

 

'EURTOBEF w . d Format' on page 145

Converts an amount in euros to Belgian francs

 

'EURTOCHF w . d Format' on page 146

Converts an amount in euros to Swiss francs

 

'EURTOCZK w . d Format' on page 146

Converts an amount in euros to Czech koruny

 

'EURTODEM w . d Format' on page 146

Converts an amount in euros to Deutsche marks

 

'EURTODKK w . d Format' on page 146

Converts an amount in euros to Danish kroner

 

'EURTOESP w . d Format' on page 146

Converts an amount in euros to Spanish pesetas

 

'EURTOFIM w . d Format' on page 147

Converts an amount in euros to Finnish markkaa

 

'EURTOFRF w . d Format' on page 147

Converts an amount in euros to French francs

 

'EURTOGBP w . d Format' on page 147

Converts an amount in euros to British pounds

 

'EURTOGRD w . d Format' on page 147

Converts an amount in euros to Greek drachmas

 

'EURTOHUF w . d Format' on page 148

Converts an amount in euros to Hungarian forints

 

'EURTOIEP w . d Format' on page 148

Converts an amount in euros to Irish pounds

 

'EURTOITL w . d Format' on page 148

Converts an amount in euros to Italian lire

 

'EURTOLUF w . d Format' on page 148

Converts an amount in euros to Luxembourg francs

 

'EURTONLG w . d Format' on page 148

Converts an amount in euros to Dutch guilders

 

'EURTONOK w . d Format' on page 149

Converts an amount in euros to Norwegian krone

 

'EURTOPLZ w . d Format' on page 149

Converts an amount in euros to Polish zlotys

 

'EURTOPTE w . d Format' on page 149

Converts an amount in euros to Portuguese escudos

 

'EURTOROL w . d Format' on page 149

Converts an amount in euros to Romanian lei

 

'EURTORUR w . d Format' on page 150

Converts an amount in euros to Russian rubles

 

'EURTOSEK w . d Format' on page 150

Converts an amount in euros to Swedish kronor

 

'EURTOSIT w . d Format' on page 150

Converts an amount in euros to Slovenian tolars

 

'EURTOTRL w . d Format' on page 150

Converts an amount in euros to Turkish liras

 

'EURTOYUD w . d Format' on page 150

Converts an amount in euros to Yugoslavian dinars

DBCS

'$KANJI w . Format' on page 98

Adds shift-code data to DBCS data

 

'$KANJIX w . Format' on page 99

Removes shift code data from DBCS data

Date and Time

'DATE w . Format' on page 118

Writes date values in the form ddmmmyy or ddmmmyyyy

 

'DATEAMPM w . d Format' on page 120

Writes datetime values in the form ddmmmyy:hh:mm:ss.ss with AM or PM

 

'DATETIME w . d Format' on page 121

Writes datetime values in the form ddmmmyy:hh:mm:ss.ss

 

'DAY w . Format' on page 123

Writes date values as the day of the month

 

'DDMMYY w . Format' on page 124

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

 

'DDMMYY xw . Format' on page 125

Writes date values in the form ddmm < yy > yy or dd X mm X< yy > yy , where X represents a specified separator and the year appears as either 2 or 4 digits

 

'DOWNAME w . Format' on page 130

Writes date values as the name of the day of the week

 

'DTDATE w . Format' on page 130

Expects a datetime value as input and writes date values in the form ddmmmyy or ddmmmyyyy

 

'DTMONYY w . Format' on page 132

Writes the date part of a datetime value as the month and year in the form mmmyy or mmmyyyy

 

'DTWKDATX w . Format' on page 133

Writes the date part of a date time value as the day of the week and the date in the form day-of-week , dd month-name yy (or yyyy )

 

'DTYEAR w . Format' on page 134

Writes the date part of a datetime value as the year in the form yy or yyyy

 

'DTYYQC w . Format' on page 135

Writes the date part of a datetime value as the year and the quarter and separates them with a colon (:)

 

'EURDFDD w . Format' on page 137

Writes international datevalues in the form dd.mm.yy or dd.mm.yyyy

 

'EURDFDE w . Format' on page 137

Writes international date values in the form ddmmmyy or ddmmmyyyy

 

'EURDFDN w . Format' on page 138

Writes international date values as the day of the week

 

'EURDFDT w . d Format' on page 138

Writes international datetime values in the form ddmmmyy:hh:mm:ss.ss or ddmmmyyyy hh:mm:ss.ss

 

'EURDFDWN w . Format' on page 138

Writes international date values as the name of the day

 

'EURDFMN w . Format' on page 138

Writes international date values as the name of the month

 

'EURDFMY w . Format' on page 138

Writes international date values in the form mmmyy or mmmyyyy

 

'EURDFWDX w . Format' on page 139

Writes international date values as the name of the month, the day, and the year in the form ddmonth-name yy (or yyyy )

 

'EURDFWKX w . Format' on page 139

Writes international date values as the name of the day and date in the form day-of-week , dd month-name yy (or yyyy )

 

'HDATE w . Format' on page 153

Writes date values in the form yyyy mmmmm dd where dd is the day-of-the-month, mmmmm represents the month's name in Hebrew, and yyyy is the year

 

'HEBDATE w . Format' on page 153

Writes date values according to the Jewish calendar

 

'HHMM w . d Format' on page 155

Writes time values as hours and minutes in the form hh:mm

 

' HOUR w . d Format' on page 156

Writes time values as hours and decimal fractions of hours

 

'JULDAY w . Format' on page 161

Writes date values as the Julian day of the year

 

'JULIAN w . Format' on page 162

Writes date values as Julian dates in the form yyddd or yyyyddd

 

'MINGUO w . Format' on page 163

Writes date values as Taiwanese dates in the form yyymmdd

 

'MMDDYY w . Format' on page 163

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

 

'MMDDYY xw . Format' on page 165

Writes date values in the form mmdd < yy > yy or mm X dd X< yy > yy , where X represents a specified separator and the year appears as either 2 or 4 digits

 

'MMSS w . d Format' on page 167

Writes time values as the number of minutes and seconds since midnight

 

'MMYY w . Format' on page 168

Writes date values in the form mm M< yy > yy , where M is the separator and the year appears as either 2 or 4 digits

 

'MMYY xw . Format' on page 169

Writes date values in the form mm < yy > yy or mm X< yy > yy , where X represents a specified separator and the year appears as either 2 or 4 digits

 

'MONNAME w . Format' on page 171

Writes date values as the name of the month

 

'MONTH w . Format' on page 172

Writes date values as the month of the year

 

'MONYY w . Format' on page 173

Writes date values as the month and the year in the form mmmyy or mmmyyyy

 

'NENGO w . Format' on page 175

Writes date values as Japanese dates in the form e.yymmdd

 

'NLDATE w . Format' on page 176

Converts SAS date values to the locale sensitive date string

 

'NLDATEMN w . Format' on page 176

Converts SAS date values to the locale sensitive date string as the day of the month.

 

'NLDATEW w . Format' on page 176

Converts SAS date values to the locale sensitive date string as the day of the week and the date

 

'NLDATEWN w . Format' on page 176

Converts SAS date values to the locale sensitive date string as the name of the day of the week

 

'NLDATM w . Format' on page 176

Converts SAS datetime values to the locale sensitive datetime string

 

'NLDATMAP w . Format' on page 177

Converts SAS datetime values to the locale sensitive datetime string with AM or PM

 

'NLDATMTM w . Format' on page 177

Converts the time portion of SAS datetime values to the locale sensitive datetime string

 

'NLDATMW w . Format' on page 177

Converts SAS date values to the locale sensitive datetime string as the day of the week and the datetime

 

'NLTIMAP w . Format' on page 178

Converts SAS time values to the locale sensitive time string with AM or PM

 

'NLTIME w . Format' on page 179

Converts SAS time values to the locale sensitive time string

 

'PDJULG w . Format' on page 182

Writes packed Julian date values in the hexadecimal format yyyyddd F for IBM

 

'PDJULI w . Format' on page 183

Writes packed Julian date values in the hexadecimal format ccyyddd F for IBM

 

'QTR w . Format' on page 191

Writes date values as the quarter of the year

 

'QTRR w . Format' on page 192

Writes date values as the quarter of the year in Roman numerals

 

'TIME w . d Format' on page 210

Writes time values as hours, minutes, and seconds in the form hh:mm:ss.ss

 

'TIMEAMPM w . d Format' on page 212

Writes time values as hours, minutes, and seconds in the form hh:mm:ss.ss with AM or PM

 

'TOD w.d Format' on page 213

Writes the time portion of datetime values in the form hh:mm:ss.ss

 

'WEEKDATE w . Format' on page 217

Writes date values as the day of the week and the date in the form day-of-week , month-name dd , yy (or yyyy )

 

'WEEKDATX w . Format' on page 218

Writes date values as the day of the week and date in the form day-of-week , dd month-name yy (or yyyy )

 

'WEEKDAY w . Format' on page 220

Writes date values as the day of the week

 

'WEEKU w . Format' on page 221

Writes a week number

 

'WEEKV w . Format' on page 221

Writes a week number

 

'WEEKW w . Format' on page 221

Writes a week number

 

'WORDDATE w . Format' on page 221

Writes date values as the name of the month, the day, and the year in the form month-name dd , yyyy

 

'WORDDATX w . Format' on page 222

Writes date values as the day, the name of the month, and the year in the form dd month-name yyyy

 

'YEAR w . Format' on page 226

Writes date values as the year

 

'YYMM w . Format' on page 227

Writes date values in the form < yy > yy M mm , where M is the separator and the year appears as either 2 or 4 digits

 

'YYMM xw . Format' on page 228

Writes date values in the form < yy > yymm or < yy > yy X mm , where X represents a specified separator and the year appears as either 2 or 4 digits

 

'YYMMDD w . Format' on page 230

Writes date values in the form < yy > yymmdd or < yy > yy - mm - dd , where a dash is the separator and the year appears as either 2 or 4 digits

 

'YYMMDD xw . Format' on page 231

Writes date values in the form < yy > yymmdd or < yy > yy X mm X dd , where X represents a specified separator and the year appears as either 2 or 4 digits

 

'YYMON w . Format' on page 233

Writes date values in the form yymmm or yyyymmm

 

'YYQ w . Format' on page 234

Writes date valuesin the form < yy > yy Q q , where Q is the separator, the year appears as either 2 or 4 digits, and q is the quarter of the year

 

'YYQ xw . Format' on page 235

Writes date values in the form < yy > yyq or < yy > yy X q , where X represents a specified separator, the year appears as either 2 or 4 digits, and q is the quarter of the year

 

'YYQR w . Format' on page 237

Writes date values in the form < yy > yy Q 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

 

'YYQR xw . Format' on page 238

Writes date values in the form < yy > yy qr or < yy > yy X qr , where X represents a specified separator, the year appears as either 2 or 4 digits, and qr is the quarter of the year expressed in Roman numerals

Hebrew text handling

'$CPTDW w . Format' on page 96

Converts text in Hebrew DOS encoding (cp862) to Windows (cp1255) encoding

 

'$CPTWD w . Format' on page 96

Converts text in Windows (cp1255) encoding to Hebrew DOS encoding (cp862)

Numeric

'BEST w . Format' on page 113

SAS chooses the best notation

 

'BINARY w . Format' on page 114

Converts numeric values to binary representation

 

'COMMA w . d Format' on page 115

Writes numeric values with a comma that separates every three digits and a period that separates the decimal fraction

 

'COMMAX w . d Format' on page 116

Writes numeric values with a period that separates every three digits and a comma that separates the decimal fraction

 

'D w . s Format' on page 117

Prints variables, possibly with a great range of values, lining up decimal places for values of similar magnitude

 

'DOLLAR w . d Format' on page 127

Writes numeric values with a leading dollar sign, a comma that separates every three digits, and a period that separates the decimal fraction

 

'DOLLARX w . d Format' on page 128

Writes numeric values with a leading dollar sign, a period that separates every three digits, and a comma that separates the decimal fraction

 

'E w . Format' on page 136

Writes numeric values in scientific notation

 

'EURO w . d Format' on page 145

Writes numeric values with a leading euro symbol (E), a comma that separates every three digits, and a period that separates the decimal fraction

 

'EUROX w . d Format' on page 145

Writes numeric values with a leading euro symbol (E), a period that separates every three digits, and a comma that separates the decimal fraction

 

'FLOAT w . d Format' on page 151

Generates a native single-precision, floating-point value by multiplying a number by 10 raised to the d th power

 

'FRACT w . Format' on page 152

Converts numeric values to fractions

 

'HEX w . Format' on page 153

Converts real binary (floating-point) values to hexadecimal representation

 

'IB w . d Format' on page 157

Writes native integer binary (fixed-point) values, including negative values

 

'IBR w . d Format' on page 159

Writes integer binary (fixed-point) values in Intel and DEC formats

 

'IEEE w . d Format'on page 160

Generates an IEEE floating-point value by multiplying a number by 10 raised to the d th power

 

'NEGPAREN w . d Format' on page 174

Writes negative numeric values in parentheses

 

'NLMNY w . d Format' on page 177

Returns the locale specific monetary format

 

'NLMNYI w . d Format' on page 177

Returns the locale specific monetary format

 

'NLNUM w . d Format' on page 178

Returns the locale specific numeric format

 

'NLNUMI w . d Format' on page 178

Returns the locale specific numeric format

 

'NLPCT w . d Format' on page 178

Returns the locale specific percentage

 

'NLPCTI w . d Format' on page 178

Returns the locale specific percentage

 

'NUMX w . d Format' on page 179

Writes numeric values with a comma in place of the decimal point

 

'OCTAL w . Format' on page 180

Converts numeric values to octal representation

 

'PD w . d Format' on page 181

Writes data in packed decimal format

 

'PERCENT w . d Format' on page 185

Writes numeric values as percentages

 

'PIB w . d Format' on page 186

Writes positive integer binary (fixed-point) values

 

'PIBR w . d Format' on page 187

Writes positive integer binary (fixed-point) values in Intel and DEC formats

 

'PK w . d Format' on page 189

Writes data in unsigned packed decimal format

 

'PVALUE w . d Format' on page 190

Writes p -values

 

'RB w . d Format' on page 193

Writes real binary data (floating-point) in real binary format

 

'ROMAN w . Format' on page 194

Writes numeric values as Roman numerals

 

'S370FF w . d Format' on page 195

Writes native standard numeric data in IBM mainframe format

 

'S370FIB w . d Format' on page 196

Writes integer binary (fixed-point) values, including negative values, in IBM mainframe format

 

'S370FIBU w . d Format' on page 197

Writes unsigned integer binary (fixed-point) values in IBM mainframe format

 

'S370FPD w . d Format' on page 199

Writes packed decimal data in IBM mainframe format

 

'S370FPDU w . d Format' on page 200

Writes unsigned packed decimal data in IBM mainframe format

 

'S370FPIB w . d Format' on page 201

Writes positive integer binary (fixed-point) values in IBM mainframe format

 

'S370FRB w . d Format' on page 203

Writes real binary (floating-point) data in IBM mainframe format

 

'S370FZD w . d Format' on page 204

Writes zoned decimal data in IBM mainframe format

 

'S370FZDL w . d Format' on page 205

Writes zoned decimal leading-sign data in IBM mainframe format

 

'S370FZDS w . d Format' on page 206

Writes zoned decimal separate leading-sign data in IBM mainframe format

 

'S370FZDT w . d Format' on page 207

Writes zoned decimal separate trailing-sign data in IBM mainframe format

 

'S370FZDU w . d Format' on page 208

Writes unsigned zoned decimal data in IBM mainframe format

 

'SSN w . Format' on page 209

Writes Social Security numbers

 

'VAXRB w . d Format' on page 214

Writes real binary (floating-point) data in VMS format

 

' w . d Format' on page 215

Writes standard numeric data one digit per byte

 

'WORDF w . Format' on page 224

Writes numeric values as words with fractions that are shown numerically

 

'WORDS w . Format' on page 225

Writes numeric values as words

 

'YEN w . d Format' on page 227

Writes numeric values with yen signs, commas, and decimal points

 

'Z w . d Format' on page 240

Writes standard numeric data with leading 0s

 

'ZD w . d Format' on page 241

Writes numeric data in zoned decimal format




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net