BookmarkSubscribeRSS Feed
data_null__
Jade | Level 19

 

I can open a SAS program from the windows file explorer by right clicking and selecting open in EG 

data_null___1-1695067786550.png

I will get this, where the program in the process flow has the program name.

data_null___0-1695067573710.png

I want to emulate this behavior in a VBS program.  Something like Chris does here
https://github.com/cjdinger/sas-eg-automation/blob/master/vbscript/BatchProject.vbs

 

I can modify BatchProject.vbs example to copy a file and load it using code.text.  

strSASfile = ".....\example.sas"

Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strSASFile, ForReading)
strContents = objFile.ReadAll
objFile.Close

But I need to associate the program path.

I want the program (however it gets there) to have the name as it does when I open with right click.  So that when I submit _SASPROGRAMFILE will have the program path name.

 

%LET _SASPROGRAMFILE='<path-to-file>\example.sas';

I have very little experience with object oriented programing and I can't figure the syntax. I have this document 

Assembly:  SASEGScripting (in SASEGScripting.dll) Version: 4.2.0.0 (4.2.0.0)

but I don't know what I'm looking for.

 

 

 

I'm new to EG other than the most basic Open with EG and hit RUN.

 

 

 

 

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 0 replies
  • 418 views
  • 0 likes
  • 1 in conversation