SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Passing parameters between JAL and VBS

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Passing parameters between JAL and VBS
Author Message
klwong



Joined: 07 Mar 2009
Posts: 22
Country: Australia

Post Passing parameters between JAL and VBS Reply with quote
Do anybody know if it is possible to pass parameters between JAL and VBS ?
Wed Jul 01, 2009 5:52 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Do you mean passing parameters when invoking VBS code from JAL code or passing parameters between jobs of different types?

In the first case, the script is executed dynamically as a text. You can build it anything you want and concatenate parameter values as needed. In the second case you can save values to INI files, other text files, database, etc.. and read it from another job.

If you need more help, please post specific example and describe where you got stuck.
Wed Jul 01, 2009 8:59 am View user's profile Send private message
klwong



Joined: 07 Mar 2009
Posts: 22
Country: Australia

Post Reply with quote
Yes, would like to pass parameter to VBS via JAL. Basically I would like to pass a parameter called 'username' to the vbs, then capture the return 'value' from vbs.

JAL code
DIM (global.value,string)
DIM (global.username,string)
SET (global.username,"KLWONG")
VBScriptexecute "C:\KLTEST.VBS"
Messagebox (global.value)

VBS code (file C:\KLTEST.VBS)
Sub main()
If username = "KLWONG" Then value = "TRUE"
End Sub

Try to run and the JAL job disabled. I suspect is the way I pass the parameter and appreciate any help.
Thu Jul 02, 2009 5:47 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
VBScriptExecute statement requires the actual code to be executed, not a file name of an external VBScript file. The code is executed internally by VBScript engine running within 24x7 instance.
Forr example

Code:
Dim vb, string
ContactEx( "Sub Main()\r\nIf  \"", username, "\" = "KWONG" Then\r\n", ...and so on..., vb )
VBSCriptExecute( vb )


Note that concatenation of username parameter.

Now, how about using ProcessKill statement in JAL instead of all this mess? Or using KillProcess utility http://www.softtreetech.com/24x7/archive/49.htm which can be invoked using Run or RunAndWait?
Thu Jul 02, 2009 8:10 am View user's profile Send private message
klwong



Joined: 07 Mar 2009
Posts: 22
Country: Australia

Post Reply with quote
I see, thanks for the clarification.

By the way you also mentioned about the 'ProcessKill' in your respond. Do I need to use this under the scenario ? Just in case I missed something.
Thu Jul 02, 2009 8:18 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Sorry, I don't get your question. In which schenario?
Thu Jul 02, 2009 8:23 am View user's profile Send private message
klwong



Joined: 07 Mar 2009
Posts: 22
Country: Australia

Post Reply with quote
Your reply say
"Now, how about using ProcessKill statement in JAL instead of all this mess? Or using KillProcess utility http://www.softtreetech.com/24x7/archive/49.htm which can be invoked using Run or RunAndWait?"

I was wondering what this is for ??
Thu Jul 02, 2009 8:35 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7949

Post Reply with quote
Sorry, I misread your initial question. I read KLTEST.VBS as KILLTEST.VBS. Killing processes is a common question on this board. Please disregard the ProcessKill reference.
Thu Jul 02, 2009 8:49 am 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.