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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 570 views
  • 0 likes
  • 1 in conversation