SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
CD Effects

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
CD Effects
Author Message
Ken Wyatt



Joined: 11 May 2000
Posts: 4

Post CD Effects Reply with quote

I would like to request a fix. When I use the CD statement in a JAL script and then run that script in debug mode to check out the script the next time I save the changes to the script they appear to go into the directory that I pointed to with the CD statement in the JAL script. The default directory for 24x7 should not change when I run debug. 24x7 should point back to its default directories when debug is terminated so when you go into edit to make any changes and then save those changes they go to 24x7 directory insted of some server out in never never land.

Tue May 30, 2000 7:57 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7907

Post Re: CD Effects Reply with quote

It can happen both in debug and normal mode. Every time you open or save files in another directory Windows changes the current directory to the last used one.
By Windows design one application can have only one current directory. If you are running some jobs in background you should be very careful when opening and saving files because Windows can change the current directory and this may affect the background jobs.
That's why using the CD statement is not a good idea. Consider two jobs A and B running simultaneously. Job A uses CD (Current Directory) to set current directory to c:\abc and prepares to execute the next statement. In this moment job B uses CD to set current directory to c:\bcd and this may cause job A to fail. Please whenever possible use full file names to make your jobs directory independent.

: I would like to request a fix. When I use the CD statement in a JAL script
: and then run that script in debug mode to check out the script the next
: time I save the changes to the script they appear to go into the directory
: that I pointed to with the CD statement in the JAL script. The default
: directory for 24x7 should not change when I run debug. 24x7 should point
: back to its default directories when debug is terminated so when you go
: into edit to make any changes and then save those changes they go to 24x7
: directory insted of some server out in never never land.

Wed May 31, 2000 10:47 am View user's profile Send private message
Ken Wyatt



Joined: 11 May 2000
Posts: 4

Post Re: CD Effects Reply with quote

If you created your own CD command you could accomplish this without effecting other processes. Your own CD Statement could store the current scripts directory in memory and append this to subsequent directory and file commands. When that script has terminated the memory slot would be freed up for other scripts. Using a global that is created by 24x7 using the JAL script name or process ID as part of the global name could accomplish this. If you built this into 24x7 the CD statement would be harmless to other processes and your customers could could use CD statement to their hearts content.

: It can happen both in debug and normal mode. Every time you open or save
: files in another directory Windows changes the current directory to the
: last used one.
: By Windows design one application can have only one current directory. If you
: are running some jobs in background you should be very careful when
: opening and saving files because Windows can change the current directory
: and this may affect the background jobs.
: That's why using the CD statement is not a good idea. Consider two jobs A and
: B running simultaneously. Job A uses CD (Current Directory) to set current
: directory to c:\abc and prepares to execute the next statement. In this
: moment job B uses CD to set current directory to c:\bcd and this may cause
: job A to fail. Please whenever possible use full file names to make your
: jobs directory independent.

Wed May 31, 2000 12:08 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.