SAS 9.4 Functions and CALL Routines, 3rd Edition

Book description

Provides comprehensive information about the Base SAS functions and CALL routines.

Table of contents

  1. Contents
  2. About This Book
    1. Syntax Conventions for the SAS Language
      1. Overview of Syntax Conventions for the SAS Language
      2. Syntax Components
      3. Style Conventions
      4. Special Characters
      5. References to SAS Libraries and External Files
  3. What's New in SAS 9.4 Functions and CALL Routines
    1. Overview
    2. New Functions and CALL Routines
    3. Enhancements to Existing Functions
  4. Recommended Reading
  5. SAS Functions and CALL Routines
    1. Definitions of Functions and CALL Routines
      1. Definition of Functions
      2. Definition of CALL Routines
    2. Syntax
      1. Syntax of Functions
      2. Syntax of CALL Routines
    3. Using Functions and CALL Routines
      1. Restrictions Affecting Function Arguments
      2. Using the OF Operator with Temporary Arrays
      3. Characteristics of Target Variables
      4. Notes about Descriptive Statistic Functions
      5. Notes about Financial Functions
      6. Using DATA Step Functions within Macro Functions
      7. Using CALL Routines and the %SYSCALL Macro Statement
      8. Using Functions to Manipulate Files
    4. Function Compatibility with SBCS, DBCS, and MBCS Character Sets
      1. Overview
      2. I18N Level 0
      3. I18N Level 1
      4. I18N Level 2
    5. Using Random-Number Functions and CALL Routines
      1. Types of Random-Number Functions
      2. Seed Values
      3. Understanding How Functions Generate a Random-Number Stream
      4. Comparison of Seed Values in Random-Number Functions and CALL Routines
      5. Generating Multiple Streams from Multiple Seeds in Random-Number CALL Routines
      6. Generating Multiple Variables from One Seed in Random-Number Functions
      7. Using the RAND Function as an Alternative
      8. Effectively Using the Random-Number CALL Routines
      9. Comparison of Changing the Seed in a CALL Routine and in a Function
    6. Using SYSRANDOM and SYSRANEND Macro Variables to Produce Random Number Streams
      1. Overview of the SYSRANDOM and SYSRANEND Macro Variables
      2. The SYSRANDOM Macro Variable
      3. The SYSRANEND Macro Variable
      4. Example: Reproducing Results
      5. Example: Creating a Reproducible Random Number Stream
    7. Date and Time Intervals
      1. Definition of a Date and Time Interval
      2. Interval Names and SAS Dates
      3. Incrementing Dates and Times By Using Multipliers and By Shifting Intervals
      4. Commonly Used Time Intervals
      5. Retail Calendar Intervals: ISO 8601 Compliant
      6. Custom Time Intervals
      7. Best Practices for Custom Interval Names
    8. Pattern Matching Using Perl Regular Expressions (PRX)
      1. Definition of Pattern Matching
      2. Definition of Perl Regular Expression (PRX) Functions and CALL Routines
      3. Benefits of Using Perl Regular Expressions in the DATA Step
    9. Using Perl Regular Expressions in the DATA Step
      1. Syntax of Perl Regular Expressions
      2. Example 1: Validating Data
      3. Example 2: Matching and Replacing Text
      4. Example 3: Extracting a Substring from a String
      5. Example 4: Another Example of Extracting a Substring from a String
    10. Writing Perl Debug Output to the SAS Log
    11. Perl Artistic License Compliance
    12. Base SAS Functions for Web Applications
  6. Dictionary of SAS Functions and CALL Routines (1/2)
  7. Dictionary of SAS Functions and CALL Routines (2/2)
    1. SAS Functions and CALL Routines Documented in Other SAS Publications
    2. SAS Functions and CALL Routines by Category
    3. Dictionary
      1. ABS Function
      2. ADDR Function
      3. ADDRLONG Function
      4. AIRY Function
      5. ALLCOMB Function
      6. ALLPERM Function
      7. ANYALNUM Function
      8. ANYALPHA Function
      9. ANYCNTRL Function
      10. ANYDIGIT Function
      11. ANYFIRST Function
      12. ANYGRAPH Function
      13. ANYLOWER Function
      14. ANYNAME Function
      15. ANYPRINT Function
      16. ANYPUNCT Function
      17. ANYSPACE Function
      18. ANYUPPER Function
      19. ANYXDIGIT Function
      20. ARCOS Function
      21. ARCOSH Function
      22. ARSIN Function
      23. ARSINH Function
      24. ARTANH Function
      25. ATAN Function
      26. ATAN2 Function
      27. ATTRC Function
      28. ATTRN Function
      29. BAND Function
      30. BETA Function
      31. BETAINV Function
      32. BLACKCLPRC Function
      33. BLACKPTPRC Function
      34. BLKSHCLPRC Function
      35. BLKSHPTPRC Function
      36. BLSHIFT Function
      37. BNOT Function
      38. BOR Function
      39. BRSHIFT Function
      40. BXOR Function
      41. BYTE Function
      42. CALL ALLCOMB Routine
      43. CALL ALLCOMBI Routine
      44. CALL ALLPERM Routine
      45. CALL CATS Routine
      46. CALL CATT Routine
      47. CALL CATX Routine
      48. CALL COMPCOST Routine
      49. CALL EXECUTE Routine
      50. CALL GRAYCODE Routine
      51. CALL IS8601_CONVERT Routine (1/2)
      52. CALL IS8601_CONVERT Routine (2/2)
      53. CALL LABEL Routine
      54. CALL LEXCOMB Routine
      55. CALL LEXCOMBI Routine
      56. CALL LEXPERK Routine
      57. CALL LEXPERM Routine
      58. CALL LOGISTIC Routine
      59. CALL MISSING Routine
      60. CALL MODULE Routine
      61. CALL POKE Routine
      62. CALL POKELONG Routine
      63. CALL PRXCHANGE Routine
      64. CALL PRXDEBUG Routine
      65. CALL PRXFREE Routine
      66. CALL PRXNEXT Routine
      67. CALL PRXPOSN Routine
      68. CALL PRXSUBSTR Routine
      69. CALL RANBIN Routine
      70. CALL RANCAU Routine
      71. CALL RANCOMB Routine
      72. CALL RANEXP Routine
      73. CALL RANGAM Routine
      74. CALL RANNOR Routine
      75. CALL RANPERK Routine
      76. CALL RANPERM Routine
      77. CALL RANPOI Routine
      78. CALL RANTBL Routine
      79. CALL RANTRI Routine
      80. CALL RANUNI Routine
      81. CALL SCAN Routine (1/2)
      82. CALL SCAN Routine (2/2)
      83. CALL SET Routine
      84. CALL SLEEP Routine
      85. CALL SOFTMAX Routine
      86. CALL SORTC Routine
      87. CALL SORTN Routine
      88. CALL STDIZE Routine
      89. CALL STREAMINIT Routine
      90. CALL SYMPUT Routine
      91. CALL SYMPUTX Routine
      92. CALL SYSTEM Routine
      93. CALL TANH Routine
      94. CALL VNAME Routine
      95. CALL VNEXT Routine
      96. CAT Function
      97. CATQ Function
      98. CATS Function
      99. CATT Function
      100. CATX Function
      101. CDF Function (1/4)
      102. CDF Function (2/4)
      103. CDF Function (3/4)
      104. CDF Function (4/4)
      105. CEIL Function
      106. CEILZ Function
      107. CEXIST Function
      108. CHAR Function
      109. CHOOSEC Function
      110. CHOOSEN Function
      111. CINV Function
      112. CLOSE Function
      113. CMISS Function
      114. CNONCT Function
      115. COALESCE Function
      116. COALESCEC Function
      117. COLLATE Function
      118. COMB Function
      119. COMPARE Function
      120. COMPBL Function
      121. COMPFUZZ Function
      122. COMPGED Function (1/2)
      123. COMPGED Function (2/2)
      124. COMPLEV Function
      125. COMPOUND Function
      126. COMPRESS Function
      127. CONSTANT Function
      128. CONVX Function
      129. CONVXP Function
      130. COS Function
      131. COSH Function
      132. COT Function
      133. COUNT Function
      134. COUNTC Function
      135. COUNTW Function
      136. CSC Function
      137. CSS Function
      138. CUMIPMT Function
      139. CUMPRINC Function
      140. CUROBS Function
      141. CV Function
      142. DACCDB Function
      143. DACCDBSL Function
      144. DACCSL Function
      145. DACCSYD Function
      146. DACCTAB Function
      147. DAIRY Function
      148. DATDIF Function
      149. DATE Function
      150. DATEJUL Function
      151. DATEPART Function
      152. DATETIME Function
      153. DAY Function
      154. DCLOSE Function
      155. DCREATE Function
      156. DEPDB Function
      157. DEPDBSL Function
      158. DEPSL Function
      159. DEPSYD Function
      160. DEPTAB Function
      161. DEQUOTE Function
      162. DEVIANCE Function
      163. DHMS Function
      164. DIF Function
      165. DIGAMMA Function
      166. DIM Function
      167. DINFO Function
      168. DIVIDE Function
      169. DNUM Function
      170. DOPEN Function
      171. DOPTNAME Function
      172. DOPTNUM Function
      173. DOSUBL Function
      174. DREAD Function
      175. DROPNOTE Function
      176. DSNAME Function
      177. DUR Function
      178. DURP Function
      179. EFFRATE Function
      180. ENVLEN Function
      181. ERF Function
      182. ERFC Function
      183. EUCLID Function
      184. EXIST Function
      185. EXP Function
      186. FACT Function
      187. FAPPEND Function
      188. FCLOSE Function
      189. FCOL Function
      190. FCOPY Function
      191. FDELETE Function
      192. FETCH Function
      193. FETCHOBS Function
      194. FEXIST Function
      195. FGET Function
      196. FILEEXIST Function
      197. FILENAME Function
      198. FILEREF Function
      199. FINANCE Function (1/9)
      200. FINANCE Function (2/9)
      201. FINANCE Function (3/9)
      202. FINANCE Function (4/9)
      203. FINANCE Function (5/9)
      204. FINANCE Function (6/9)
      205. FINANCE Function (7/9)
      206. FINANCE Function (8/9)
      207. FINANCE Function (9/9)
      208. FIND Function
      209. FINDC Function (1/2)
      210. FINDC Function (2/2)
      211. FINDW Function
      212. FINFO Function
      213. FINV Function
      214. FIPNAME Function
      215. FIPNAMEL Function
      216. FIPSTATE Function
      217. FIRST Function
      218. FLOOR Function
      219. FLOORZ Function
      220. FNONCT Function
      221. FNOTE Function
      222. FOPEN Function
      223. FOPTNAME Function
      224. FOPTNUM Function
      225. FPOINT Function
      226. FPOS Function
      227. FPUT Function
      228. FREAD Function
      229. FREWIND Function
      230. FRLEN Function
      231. FSEP Function
      232. FUZZ Function
      233. FWRITE Function
      234. GAMINV Function
      235. GAMMA Function
      236. GARKHCLPRC Function
      237. GARKHPTPRC Function
      238. GCD Function
      239. GEODIST Function
      240. GEOMEAN Function
      241. GEOMEANZ Function
      242. GETOPTION Function (1/2)
      243. GETOPTION Function (2/2)
      244. GETVARC Function
      245. GETVARN Function
      246. GRAYCODE Function
      247. HARMEAN Function
      248. HARMEANZ Function
      249. HBOUND Function
      250. HMS Function
      251. HOLIDAY Function
      252. HOUR Function
      253. HTMLDECODE Function
      254. HTMLENCODE Function
      255. IBESSEL Function
      256. IFC Function
      257. IFN Function
      258. INDEX Function
      259. INDEXC Function
      260. INDEXW Function
      261. INPUT Function
      262. INPUTC Function
      263. INPUTN Function
      264. INT Function
      265. INTCINDEX Function
      266. INTCK Function (1/2)
      267. INTCK Function (2/2)
      268. INTCYCLE Function
      269. INTFIT Function
      270. INTFMT Function
      271. INTGET Function
      272. INTINDEX Function (1/2)
      273. INTINDEX Function (2/2)
      274. INTNX Function (1/2)
      275. INTNX Function (2/2)
      276. INTRR Function
      277. INTSEAS Function
      278. INTSHIFT Function
      279. INTTEST Function
      280. INTZ Function
      281. IORCMSG Function
      282. IPMT Function
      283. IQR Function
      284. IRR Function
      285. JBESSEL Function
      286. JULDATE Function
      287. JULDATE7 Function
      288. KURTOSIS Function
      289. LAG Function (1/2)
      290. LAG Function (2/2)
      291. LARGEST Function
      292. LBOUND Function
      293. LCM Function
      294. LCOMB Function
      295. LEFT Function
      296. LENGTH Function
      297. LENGTHC Function
      298. LENGTHM Function
      299. LENGTHN Function
      300. LEXCOMB Function
      301. LEXCOMBI Function
      302. LEXPERK Function
      303. LEXPERM Function
      304. LFACT Function
      305. LGAMMA Function
      306. LIBNAME Function
      307. LIBREF Function
      308. LOG Function
      309. LOG1PX Function
      310. LOG10 Function
      311. LOG2 Function
      312. LOGBETA Function
      313. LOGCDF Function
      314. LOGISTIC Function
      315. LOGPDF Function
      316. LOGSDF Function
      317. LOWCASE Function
      318. LPERM Function
      319. LPNORM Function
      320. MAD Function
      321. MARGRCLPRC Function
      322. MARGRPTPRC Function
      323. MAX Function
      324. MD5 Function
      325. MDY Function
      326. MEAN Function
      327. MEDIAN Function
      328. MIN Function
      329. MINUTE Function
      330. MISSING Function
      331. MOD Function
      332. MODEXIST Function
      333. MODULEC Function
      334. MODULEN Function
      335. MODZ Function
      336. MONTH Function
      337. MOPEN Function
      338. MORT Function
      339. MSPLINT Function
      340. MVALID Function
      341. N Function
      342. NETPV Function
      343. NLITERAL Function
      344. NMISS Function
      345. NOMRATE Function
      346. NORMAL Function
      347. NOTALNUM Function
      348. NOTALPHA Function
      349. NOTCNTRL Function
      350. NOTDIGIT Function
      351. NOTE Function
      352. NOTFIRST Function
      353. NOTGRAPH Function
      354. NOTLOWER Function
      355. NOTNAME Function
      356. NOTPRINT Function
      357. NOTPUNCT Function
      358. NOTSPACE Function
      359. NOTUPPER Function
      360. NOTXDIGIT Function
      361. NPV Function
      362. NVALID Function
      363. NWKDOM Function
      364. OPEN Function
      365. ORDINAL Function
      366. PATHNAME Function
      367. PCTL Function
      368. PDF Function (1/4)
      369. PDF Function (2/4)
      370. PDF Function (3/4)
      371. PDF Function (4/4)
      372. PEEK Function
      373. PEEKC Function
      374. PEEKCLONG Function
      375. PEEKLONG Function
      376. PERM Function
      377. PMT Function
      378. POINT Function
      379. POISSON Function
      380. PPMT Function
      381. PROBBETA Function
      382. PROBBNML Function
      383. PROBBNRM Function
      384. PROBCHI Function
      385. PROBF Function
      386. PROBGAM Function
      387. PROBHYPR Function
      388. PROBIT Function
      389. PROBMC Function (1/3)
      390. PROBMC Function (2/3)
      391. PROBMC Function (3/3)
      392. PROBNEGB Function
      393. PROBNORM Function
      394. PROBT Function
      395. PROPCASE Function
      396. PRXCHANGE Function (1/2)
      397. PRXCHANGE Function (2/2)
      398. PRXMATCH Function
      399. PRXPAREN Function
      400. PRXPARSE Function
      401. PRXPOSN Function
      402. PTRLONGADD Function
      403. PUT Function
      404. PUTC Function
      405. PUTN Function
      406. PVP Function
      407. QTR Function
      408. QUANTILE Function
      409. QUOTE Function
      410. RANBIN Function
      411. RANCAU Function
      412. RAND Function (1/3)
      413. RAND Function (2/3)
      414. RAND Function (3/3)
      415. RANEXP Function
      416. RANGAM Function
      417. RANGE Function
      418. RANK Function
      419. RANNOR Function
      420. RANPOI Function
      421. RANTBL Function
      422. RANTRI Function
      423. RANUNI Function
      424. RENAME Function
      425. REPEAT Function
      426. RESOLVE Function
      427. REVERSE Function
      428. REWIND Function
      429. RIGHT Function
      430. RMS Function
      431. ROUND Function (1/2)
      432. ROUND Function (2/2)
      433. ROUNDE Function
      434. ROUNDZ Function
      435. SAVING Function
      436. SAVINGS Function
      437. SCAN Function (1/2)
      438. SCAN Function (2/2)
      439. SDF Function
      440. SEC Function
      441. SECOND Function
      442. SHA256 Function
      443. SIGN Function
      444. SIN Function
      445. SINH Function
      446. SKEWNESS Function
      447. SLEEP Function
      448. SMALLEST Function
      449. SOAPWEB Function
      450. SOAPWEBMETA Function
      451. SOAPWIPSERVICE Function
      452. SOAPWIPSRS Function
      453. SOAPWS Function
      454. SOAPWSMETA Function
      455. SOUNDEX Function
      456. SPEDIS Function
      457. SQRT Function
      458. SQUANTILE Function
      459. STD Function
      460. STDERR Function
      461. STFIPS Function
      462. STNAME Function
      463. STNAMEL Function
      464. STRIP Function
      465. SUBPAD Function
      466. SUBSTR (left of =) Function
      467. SUBSTR (right of =) Function
      468. SUBSTRN Function
      469. SUM Function
      470. SUMABS Function
      471. SYMEXIST Function
      472. SYMGET Function
      473. SYMGLOBL Function
      474. SYMLOCAL Function
      475. SYSEXIST Function
      476. SYSGET Function
      477. SYSMSG Function
      478. SYSPARM Function
      479. SYSPROCESSID Function
      480. SYSPROCESSNAME Function
      481. SYSPROD Function
      482. SYSRC Function
      483. SYSTEM Function
      484. TAN Function
      485. TANH Function
      486. TIME Function
      487. TIMEPART Function
      488. TIMEVALUE Function
      489. TINV Function
      490. TNONCT Function
      491. TODAY Function
      492. TRANSLATE Function
      493. TRANSTRN Function
      494. TRANWRD Function
      495. TRIGAMMA Function
      496. TRIM Function
      497. TRIMN Function
      498. TRUNC Function
      499. TYPEOF Function
      500. TZONEID Function
      501. TZONENAME Function
      502. TZONEOFF Function
      503. TZONES2U Function
      504. TZONEU2S Function
      505. UNIFORM Function
      506. UPCASE Function
      507. URLDECODE Function
      508. URLENCODE Function
      509. USS Function
      510. UUIDGEN Function
      511. VAR Function
      512. VARFMT Function
      513. VARINFMT Function
      514. VARLABEL Function
      515. VARLEN Function
      516. VARNAME Function
      517. VARNUM Function
      518. VARRAY Function
      519. VARRAYX Function
      520. VARTYPE Function
      521. VERIFY Function
      522. VFORMAT Function
      523. VFORMATD Function
      524. VFORMATDX Function
      525. VFORMATN Function
      526. VFORMATNX Function
      527. VFORMATW Function
      528. VFORMATWX Function
      529. VFORMATX Function
      530. VINARRAY Function
      531. VINARRAYX Function
      532. VINFORMAT Function
      533. VINFORMATD Function
      534. VINFORMATDX Function
      535. VINFORMATN Function
      536. VINFORMATNX Function
      537. VINFORMATW Function
      538. VINFORMATWX Function
      539. VINFORMATX Function
      540. VLABEL Function
      541. VLABELX Function
      542. VLENGTH Function
      543. VLENGTHX Function
      544. VNAME Function
      545. VNAMEX Function
      546. VTYPE Function
      547. VTYPEX Function
      548. VVALUE Function
      549. VVALUEX Function
      550. WEEK Function
      551. WEEKDAY Function
      552. WHICHC Function
      553. WHICHN Function
      554. YEAR Function
      555. YIELDP Function
      556. YRDIF Function
      557. YYQ Function
      558. ZIPCITY Function
      559. ZIPCITYDISTANCE Function
      560. ZIPFIPS Function
      561. ZIPNAME Function
      562. ZIPNAMEL Function
      563. ZIPSTATE Function
  8. References
    1. References
  9. Tables of Perl Regular Expression (PRX) Metacharacters (1/2)
  10. Tables of Perl Regular Expression (PRX) Metacharacters (2/2)
  11. Index (1/4)
  12. Index (2/4)
  13. Index (3/4)
  14. Index (4/4)

Product information

  • Title: SAS 9.4 Functions and CALL Routines, 3rd Edition
  • Author(s): SAS Documentation
  • Release date: August 2014
  • Publisher(s): SAS Institute
  • ISBN: 9781629593142