SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Global Variables / Functions

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Global Variables / Functions
Author Message
Michael Tuszynski



Joined: 07 May 2004
Posts: 30

Post Global Variables / Functions Reply with quote

In JAL, I would like to setup some global values and global functions:

For example, a global receipient list so that if I have to add another person,
I need only modify 1 value instead of 90.

Also, there is a great deal of commonality in the jobs that are run. Is there a way
write a subroutine or function so that I can simply pass the different parameters
and reuse code.

For example, I always want to check whether a file received is of zero length or not.
This is done numerous different ways in different jobs. I would rather have one
'zeroByteLength' function that I can call in each script to do the check.

Thanks

Fri May 07, 2004 12:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7954

Post Re: Global Variables / Functions Reply with quote

Global functions can be defined in Tools/Script Library
Global variables can be defined in any script as
Dim GLOBAL.myvariable, datatype, [initial value]
or
Dim( GLOBAL.myvariable, datatype, [initial value] )

It is a good idea to create a job which will run on the scheduler startup and initialize global variables with some useful values.
For more info please see "Global variables" topic " in the on-line help.

: In JAL, I would like to setup some global values and global functions: For
: example, a global receipient list so that if I have to add another person,
: I need only modify 1 value instead of 90.

: Also, there is a great deal of commonality in the jobs that are run. Is there
: a way
: write a subroutine or function so that I can simply pass the different
: parameters
: and reuse code.

: For example, I always want to check whether a file received is of zero length
: or not.
: This is done numerous different ways in different jobs. I would rather have
: one
: 'zeroByteLength' function that I can call in each script to do the check.

: Thanks

Fri May 07, 2004 2:27 pm View user's profile Send private message
Brent



Joined: 20 Feb 2002
Posts: 57

Post Re: Global Variables / Functions Reply with quote

In a previous topic, you talk about version 4 running all script type jobs as detached. How are you planning to take care of globals?

: Global functions can be defined in Tools/Script Library
: Global variables can be defined in any script as
: Dim GLOBAL.myvariable, datatype, [initial value]
: or
: Dim( GLOBAL.myvariable, datatype, [initial value] )

: It is a good idea to create a job which will run on the scheduler startup and
: initialize global variables with some useful values.
: For more info please see "Global variables" topic " in the
: on-line help.

Fri May 07, 2004 4:43 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7954

Post Re: Global Variables / Functions Reply with quote

Global variables will be saved in a cache file on the disk. Every time a reference to global variable is made its value will be read/written from/to the cache file. I assume there could be some performance hit if many global variables are created. On the other hand it should be 100% backward compatible with all previous versions.

: In a previous topic, you talk about version 4 running all script type jobs as
: detached. How are you planning to take care of globals?

Fri May 07, 2004 5:07 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.