SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
JAL parameter characters

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
JAL parameter characters
Author Message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post JAL parameter characters Reply with quote
According to the manual JAL doesn't need commas or anything to delimit parameters in a statement and can use a space. This is both helpful and annoying....

Is there a way to supply a parameter string to a command, ie runandwait, that combines string literal and one or more variables without collecting and concatenating them first?

ie supplying parameters to an external program from JAL variables

dim GLOBAL.count, 10
dim configini, "xxxx.ini"

RunAndWait "d:\\poc\\action.exe" configini GLOBAL.count, "d:\\poc", 0, process_id


Thanks!
Wed May 30, 2007 11:41 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
Quote:
RunAndWait "d:\\poc\\action.exe" configini GLOBAL.count, "d:\\poc", 0, process_id


Here you have 6 parameters specified for RunAndWait. How do you want it to know that first 3 are really 1 parameter?
Why not use a simple

ConcatEx( "d:\\poc\\action.exe ", configini, " ", GLOBAL.count, command )
then call
RunAndWait( command, "", 0, process_id )


By the way, while parenthesis and commas are optional elements, it is highly recommended that you use them. These elements may become required in future versions as the JAL language develops and evolves from a simple batch language to a full fledged scripting language.
Wed May 30, 2007 11:59 pm View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
Also can you dim or set a global variable creating the name from another variable?

so can I go something like

dim processname, string, "dosomething"
dim GLOBAL.dosomething, number, 1
Thu May 31, 2007 12:08 am View user's profile Send private message
LeeD



Joined: 17 May 2007
Posts: 311
Country: New Zealand

Post Reply with quote
Thanks for the first answer concatex will at least do it in less code than concat.

Cheers
Lee
Thu May 31, 2007 12:09 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7847

Post Reply with quote
No. You cannot do it directly. "dosomething" is a value, not a variable. Not sure what you are after. In your example 2 have 2 correct definitions of 2 variables with correct value initialization.


By the way, you can create dynamic off-line file-based scripts from other scripts and then execute them dynamically using @SCRIPT macro, for example, in a job code

Code:
FileSave( "c:\\scripts\\script1.jal", "Dim my_var, number, 55\r\nMessageBox( my_var )" )
JobRun( "dynamic script job" )


The code for the dynamic job cane be like
Code:
@SCRIPT:c:\scripts\script1.jal


In essence the first job creates dynamic script then calls another job that loads that script and executes it.

You can also update on-line job scripts, like in the following example, but this is trickier and could create problems when multiple people work with the scheduler concurrently.

Code:
JobModify( "dynamic script job", "SCRIPT",  "Dim my_var, number, 55\r\nMessageBox( my_var )")
JobRun( "dynamic script job" )

Thu May 31, 2007 1:24 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.