BookmarkSubscribeRSS Feed
SassyExcelGuru
Calcite | Level 5

Currently using SAS 9.2, and migrating existing code into SAS EG 5.1. Please help.

1. What is the address to call an EG program? In SAS 9.2 you can use %include statement to call a sub function / macro. How do you do this in SAS EG? Note: The % include statement is being used in a looped program. (and is called multiple times)

2. As well in SAS EG how do you save log files externally to EG file, or save logfiles as different filename withing EG file when running multiple versions of the same program. (without fisically copying and pasting logfile externally) Want to be able to save logfiles as program progresses over time. ex. in SAS 9.2 , Proc Printto Log = filename new

3. When importing an external logfile into SAS EG, it imports the file as a text file. Note formating (colours) for a text file appear differently than for a logfile. How to properly import as a logfile?

4. How to make directories to save information in SAS EG. Example SAS 9.2 code, doesnt work in EG.

options noxwait;

  data _null_;

    call system("cd Location1");

    call system("mkdir Folder1");

  run; */

1 REPLY 1
yoanbolduc
Calcite | Level 5

Hi SEG,

     I think we would need a little more details about where you execute your code. If you are executing it on a Workspace server, your SAS administrator should be able to activate logging on that workspace server so that your session activity is logged on the server.

     Other than that, any Base SAS code that you write should run without problem. You simply have to make sure that you include it in a "Code node". There is one exception it's what we call X commands and this is what you are trying to do in the code you copied in your post. X Commands have to be allowed for the Workspace server that you are working on for any calls to the system function or the X statement to work. Your administrator will most probably object to change this setting so you may have so arguing to do to convince him that it is required to make your program work.

If you are NOT working on a workspace server, which means you are running your code locally and using EG to submit SAS to a local SAS installation. Then any Base SAS code should run fine in a code node.

For the log part, I am sorry I don't have enough experience using EG on a daily basis to help you with that aspect.

Yoan

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 974 views
  • 0 likes
  • 2 in conversation