Desktop productivity for business analysts and programmers

Need help with coding/syntax In SAS Enterprise Guide, more details inside.

Not applicable
Posts: 1

Need help with coding/syntax In SAS Enterprise Guide, more details inside.

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; */

Occasional Contributor
Posts: 11

Re: Need help with coding/syntax In SAS Enterprise Guide, more details inside.

Posted in reply to SassyExcelGuru


     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.


Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation