SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Environment Variables for JAL launched process

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Environment Variables for JAL launched process
Author Message
Bill Richardson



Joined: 06 Dec 2002
Posts: 8

Post Environment Variables for JAL launched processes Reply with quote

I am trying to use 24x7 to schedule a program that
needs to have a certain environment variable set in
order to work correctly. The program runs against
an Oracle database on a server where Terminal Services
are enabled and this causes problems if SESSIONNAME is
not set to blank.

I can run a .bat file:

set SESSIONNAME=
MAKEFILE PA 00001234 >RepSummary.txt

and this works.

How can I do this within a JAL script?

Fri Dec 06, 2002 12:07 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7963

Post Re: Environment Variables for JAL launched process Reply with quote

Just run your batch file from the script
If command line parameters need to be calculated, create butch file dynamically like in the following example:

Dim commands, string, "set SESSIONNAME=\r\n"
Dim parameter, string

// calculate parameter (your business logic goes here)
// Set parameter, @T"mm/dd/yyyy"

// finish and write the batch file
ConcatEx commands, "MAKEFILE PA ", parameter, " >RepSummary.txt\r\n", commands
FileSave "c:\\work_dir\\my_batch.bat", commands

// run it
Dim process_id, number
RunAndWait "c:\\work_dir\\my_batch.bat", "", 0, process_id

// if wanted, delete the batch file
FileDelete "c:\\work_dir\\my_batch.bat"

: I am trying to use 24x7 to schedule a program that
: needs to have a certain environment variable set in
: order to work correctly. The program runs against
: an Oracle database on a server where Terminal Services
: are enabled and this causes problems if SESSIONNAME is
: not set to blank.

: I can run a .bat file: set SESSIONNAME=
: MAKEFILE PA 00001234 >RepSummary.txt

: and this works.

: How can I do this within a JAL script?

Fri Dec 06, 2002 12:27 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.