Logo

Some useful SAS macros, UNIX scripts and DOS scripts




SAS Macros
  1. readrtf.sas: Convert RTF file (table, listing, etc.) into SAS dataset
  2. cmp_dsn.sas: Proc compare two datasets.
  3. ck_dups.sas: Check if dataset has duplicate records.
  4. cmp_vars.sas: Checks if variables exist in two datasets
  5. ck_empty_vars.sas: Find all empty varibles in a dataset
  6. ck_maxlen.sas: Compare length of a char variable to longest string in that variable
  7. cklogs.sas: Scan SAS log file(s) for ERROR, WARNING, NOTE messages.
  8. delnpsc.sas: Delete or replace the non printable/special characters from dataset
  9. water_fall_graph.sas: A simple water fall graph using proc gchart ( output )
  10. ck_vst_order.sas: Check if SDTM visits are in chronological order.
  11. nullreport.sas: Create empty output with custome message.
  12. getnobs.sas: Count observations of a dataset into macro variable.
  13. get_datadate.sas: Get date/time of a dataset as macro variable.
  14. assign_attrib.sas: Assign data attributes using excel file.
  15. sdtm_split.sas: Create SUPP domain.
  16. suppjoin.sas: Join parent and SUPP domain.
  17. aocflag.sas: Create AOCxxFL variables in ADCM.
  18. mksmall.sas: Adjust the lenght of char variables based on max length.
  19. mkxpt.sas: Convert SAS dataset to XPT.
  20. proccontents.sas: Simple proc contents macro.
  21. pm.sas: Simple proc means macro.
  22. pf.sas: Simple proc freq macro.
  23. dirlist.sas: Get list of files from a directory into SAS dataset.
  24. list_macros.sas: Get list of macros from log file.
  25. crt_dynamic_fmt.sas: Create format from dataset.
  26. fill_format.sas: Create label and rows based on format.
  27. f_swimlane.sas: Create swimlane graph with response colors.
  28. Kaplan-Meir graphs.
    gsetup.sas Setup markers and colors, gsurvplot.sas Generate graph as PNG file and gengraph.sas: Create rtf file


UNIX Scripts (top)
  1. check: Scan SAS log file for ERROR, WARNING, NOTE messages.
  2. scanlog: Scan LOG files. Also uses wildcards and scan multiple LOG files. (Note: check script required)
  3. dos: Scan current dir for DOS files. Files with ^M characters.
  4. checklst: Scan proc compare output in LST file.
  5. cl: Scan proc compare output in LST file. Also uses wildcards and scan multiple LST files. (Note: checklst script required)
  6. msas: Run SAS program and diplay seconds and total time.
  7. pc: Command line SAS proc contents output. (example: pc adsl)
  8. pf: Command line SAS proc freq output. (example: pf adsl "trt01a*sex")
  9. pp: Command line SAS proc print output. (example: pp adsl usubjid age sex)
  10. useful commands: Command syntax for various useful commands


DOS Scripts (top)
  1. check.bat: Scan SAS log file for ERROR, WARNING, NOTE messages.
  2. cl.bat: Scan SAS LST file for proc compare results.
  3. cmp_files.bat: Compare same file text in two different locations.
  4. restart_explorer.bat: Re-start explorer.exe (taskbar)
  5. msas.bat: Command to run SAS program
  6. dosputty.bat: Putty like window to run aliases and SAS from command line (Example alias.bat file)
  7. pc.bat: Command line SAS proc contents output. (example: pc adsl)
  8. showdesktop.scf: Minimize all windows. (Note: Save this file in QuickLinks folder)
  9. shutdown.bat: Shutdown PC
  10. outlook_domain_check.txt: MS Outlook VB macro checks if To and From addesses are from different domains
  11. Book1.xlsm: Excel VB macro to avoid auto lock the screen (Note: Enable Editing, Enable Content and Save File.)
  12. wmp.bat: Another way to avoid auto lock the screen (Note: Create playlist and save as plist1. song1 song2 song3 )
  13. startup.txt:Start up folders location
  14. remove_pinned_icons.bat: Remove pinned icons
  15. batch-candid-adam.bat: CANDID batch run ADaM
  16. batch-candid-tfl.bat: CANDID batch run TFLs


PC SAS settings (top)
  1. pcsas.txt:PC SAS Shortcut and start up files
  2. multi_sessions.txt: PC SAS Multiple Sessions with Same Settings


R (top)
  1. R_Local_Installation.pdf: Set-up R, RStudio and run KM analysis.


Publication (top)
  1. PC and UNIX SAS® Reunited:


Software (top)
  1. Notepad++ is a free (as in "free speech" and also as in "free beer") source code editor and Notepad replacement that supports several languages.
    Downlaod SAS syntax highlighting file. Save it in "userDefineLangs" folder
    Downlaod TextFX menu for some useful text function. Save it in /plugins folder.
    Compare two files: Plugins → Plugin Manager → Show Plugin Manager, select 'Compare' and click Install
  2. Microsoft SyncToy is a free application that synchronizes files and folders between locations.
  3. PuTTY is a free implementation of SSH and Telnet for Windows and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham. (Enable Auto login in Putty using ssh keys: Instructions )
  4. TmQS Team quick support
  5. Any Desk: exe zip


Links (top)
  1. Statistics: Exact Binomial and Poisson Confidence Intervals
  2. Statistics: Exact Binomial P-values


CDISC (top)
  1. SDTMIG: v3.2, v3.3, v3.4
  2. ADaMIG: v1.1, v1.2, v1.3
  3. RECIST 1.1


visitors since Oct 26, 2008




© 2024 sastricks.com All Rights Reserved