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.

 

 

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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