Jessica Hampton

Analytics Professional

Skip to content
  • About
  • Blog
  • Certifications
  • Education
  • Work History
  • White Papers
    • ACA and the New Individual Segment: MEPS 2010 and SAS Survey Procedures
    • Text Analysis and Readability Statistics in Base SAS
    • 10 Steps to Easier SAS Code Maintenance
    • SQL Pass-Through
    • Proc SurveyCorr
  • Resume
  • Contact

Creating AutoExec Code in SAS Enterprise Guide 4.3

For some users, metadata is already set up by their system administrator in Enterprise Guide so that libraries are automatically assigned; others are not so lucky. If you get tired of having to copy and paste or re-type your libname statement to manually connect to your libraries in Enterprise Guide all the time, you can create an “ad hoc” library in EG. This makes your life easier since every time you open EG, your ad hoc library is automatically assigned. You can also set system options, macros, or other code to run automatically every time you start the application.

To do this quickly and easily, follow these steps:

  • In SAS EG, go to the toolbar
  • Select Tools >> Options >> SAS Programs (left side of screen)
  • Click the check box for “Submit SAS code when server is connected”
  • Select “Edit” (same line as the check box above)
  • When the Edit box pops up, copy and paste the syntax below to automatically connect to your Oracle library (you must enter your own username, password, and schema):
  • libname mylib oracle user=xxxx orapw=xxxxx schema=xxxx path=pathname.com;
    options sastrace=’,,,d’ sastraceloc=saslog mprint symbolgen fullstimer;

    The next time you open EG, look for your “mylib” in the list of libraries on the left side of the EG screen. The above syntax sets up some system options that you may find useful, but you can modify to add additional libname statements, system options, and any other code that you want to run automatically on startup. See my previous post for more about some of these system options.

    This entry was posted in SAS Tips and tagged autoexec, Enterprise Guide, libname, metadata, SAS on September 5, 2013 by jessica.hampton@gmail.com.

    Post navigation

    ← Simple Random Sampling with Proc SurveySelect SAS Withdraws Funding for Regional User Groups →

    Pages

    • About
    • Blog
    • Certifications
    • Contact
    • Education
    • Resume
    • White Papers
      • 10 Steps to Easier SAS Code Maintenance
      • ACA and the New Individual Segment: MEPS 2010 and SAS Survey Procedures
      • Proc SurveyCorr
      • SQL Pass-Through
      • Text Analysis and Readability Statistics in Base SAS
    • Work History

    Meta

    • Log in
    • Entries feed
    • Comments feed
    • WordPress.org

    Categories

    • R (2)
    • SAS Certification (2)
    • SAS Tips (27)
    • SAS User Groups (9)
    • Uncategorized (6)
    Proudly powered by WordPress