Tre tekniker som gör din programmering effektivare

TRE TEKNIKER SOM GÖR DIN
PROGRAMMERING EFFEKTIVARE
ANDERS NILSSON
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
NY KURS:
SAS® ADVANCED DATA STEP
AND MACRO TECHNIQUES
Kurstillfällen:
7-9 oktober
7-9 december
 SAS PROGRAMMING 3: ADVANCED TECHNIQUES AND EFFICIENCIES
 SAS MACRO LANGUAGE 2: ADVANCED TECHNIQUES
Benchmark computer resource usage
Control memory, I/O, and CPU resources
SAS DATA step processing
Create and use indexes
Create and use SAS data views
Combine data horizontally with multidimensional Arrays
Use hash and hiter DATA step component objects and arrays as lookup tables
Compress SAS data sets
Safely reduce the length of numeric variables
Create user-defined functions and informats
Macro storage
Exploit macro quoting functions
Generate data-driven macro calls
Exploit SAS I/O functions in macros
Exploit external file functions in macros
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
TIPS 1: MINIMERA I/O
Exempel
• Läs och skriv bara det datat som behövs
• Where, drop/keep, if
• Vyer
• Minimera lagringsutrymmet för variabler
• Komprimera tabeller
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
TIPS 2: UTNYTTJA MINNET
Exempel
• Sasfile
• Memlib
• Format
• Arrayer
• Macrovariabler
• Hashobjekt
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
TIPS 3: CALL EXECUTE
Kompilator
Generera kod:
Macro
Datasteg med put
Call execute
Word scanner
Inputstacken
Saskod
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .
NY KURS:
SAS® ADVANCED DATA STEP
AND MACRO TECHNIQUES
Kurstillfällen:
7-9 oktober
7-9 december
Kursanmälan:
[email protected]
C op yr i g h t © 2 0 1 5 , S A S I n s t i t u t e I n c . A l l r i g h t s r es er v e d .