SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Calling SAS from vbscript

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Calling SAS from vbscript
Author Message
Victor Neto



Joined: 03 Nov 2004
Posts: 17

Post Calling SAS from vbscript Reply with quote

Hi

I currently have a batch file that I use to call
a SAS program.

I would like to convert the batch file into
VBSCRIPT file.

When I call the SAS program from the batch file
I supply the following information on one line:

c:\program files\sas\sas 9.1\sas.exe
-sysin "c:\mypgmlib\prodexec.sas"
-autoexec "c:\mypgmlib\autoexec.sas"
-sysparm "%applib% %appcode% %pgmname%"
-nosplash
-icon

Everything is hard-coded except for the following parameters.
that I pass to the batch file:

%applib% = COMSCAT
%appcode% = RPT
%pgmname% = RPT12000

Can Vbscript be used to call the SAS program in a similar fashion?

I would like to start a vbscript file using 24X7 one
the command line. Is this possible?

c:\mylib\startpgm.vbs comscat rpt rpt12000


Thu Dec 30, 2004 2:30 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Calling SAS from vbscript Reply with quote

It is sure possible. In both batch files and .VBS files you can access command line parameters. In a batch file you can refer to them by parameter position like %1, %2, etc... in a .VBS file you can use the WScript.Arguments.Unnamed method, example below

Set objArgs = WScript.Arguments.Unnamed
For I = 0 to objArgs.Count - 1
msg = msg+objArgs(I)+" "
Next
WScript.Echo msg

: Hi

: I currently have a batch file that I use to call
: a SAS program.

: I would like to convert the batch file into
: VBSCRIPT file.

: When I call the SAS program from the batch file
: I supply the following information on one line: c:\program files\sas\sas
: 9.1\sas.exe
: -sysin "c:\mypgmlib\prodexec.sas"
: -autoexec "c:\mypgmlib\autoexec.sas"
: -sysparm "%applib% %appcode% %pgmname%"
: -nosplash
: -icon

: Everything is hard-coded except for the following parameters.
: that I pass to the batch file: %applib% = COMSCAT
: %appcode% = RPT
: %pgmname% = RPT12000

: Can Vbscript be used to call the SAS program in a similar fashion?

: I would like to start a vbscript file using 24X7 one
: the command line. Is this possible?

: c:\mylib\startpgm.vbs comscat rpt rpt12000

Thu Dec 30, 2004 4:51 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.