Nevermind on this one... I found that for some reason it was
one of two reasons... Either the session of RBase I was running
had corrupted for all the tests I was doing, and OR -- the
commands like SET ERROR MESSAGES 2926 OFF was making the DOS
version crazy... Any time through this code I was seeing the
directory RBase was working out of being set to Scratch directory
set here... After I rebooted all seems OK now... go figure..
I had originally had no test for the version of RBase that I have
in now to test for either dos or windows... I was getting errors
for all the SET ERROR MESSAGES #num# off/on so I put in the code
as show below... and rebooted... One or the other fixed the problem.
Thanks anyway..
If anyone wonders why I am going through all this is cause we don't
let a lot of users have rights to delete/create files in the same
directories that RBase is installed on the server so I have to set
the TEMP/SCRATCH directory to a local dir, or at least one they have
access to.
Jim
--- Jim Limburg <[EMAIL PROTECTED]> wrote:
> Am I seeing something different... or am I just clueless on how RBase and
> it's
> Scratch/temporary directory interact? I am using this in RBDOS65 with latest
> patches..
>
> I am using the following code...at least attempting to.
> SET VAR vm_doswin = (CVAL('version'))
> SET VAR vm_sloc1 = (SLOC(.vm_doswin,'DOS'))
> SET VAR vg_tmpdir TEXT
> SET VAR vm_temp TEXT = NULL
> SET VAR vm_temp = (ENVVAL('TEMP')) --See if TEMP is defined in Environment
> IF vm_temp IS NOT NULL THEN
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> ENDIF
> &delfiles
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> ENDIF
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ELSE
> SET VAR vm_dir INTEGER = (CHKFILE('C:\WINNT\TEMP'))
> IF vm_dir = 1 THEN
> SET VAR vm_temp TEXT = 'C:\WINNT\TEMP'
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> ENDIF
> &delfiles
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> ENDIF
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ELSE --c:\winnt\temp does not exist, try another route.
> SET VAR vm_dir INTEGER = (CHKFILE('C:\WINDOWS\TEMP'))
> IF vm_dir = 1 THEN
> SET VAR vm_temp TEXT = 'C:\WINDOWS\TEMP'
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> ENDIF
> &delfiles
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> ENDIF
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ELSE
> SET VAR vm_dir INTEGER = (CHKFILE('C:\TEMP'))
> IF vm_dir = 1 THEN
> SET VAR vm_temp TEXT = 'C:\TEMP'
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> ENDIF
> &delfiles
> IF vm_sloc1 = 0 THEN
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> ENDIF
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ELSE
> *(If the process gets this far then it has not found
> and has not set the SCRATCH setting to any temporary
> place for RBase to work. Attempt to create C:\TEMP and
> use it. If this fails then use the current directory
> it is in and hope the user has the proper Read/Write/
> File Scan/Create/Delete access. )
> --Record the directory the user is in now so we can
> --return to it after our other work.
> SET VAR vm_tmpcurrhold = (CVAL('CURRDIR'))
> CHDRV c:
> CHDIR c:\
> MKDIR TEMP
> SET VAR vm_dir INTEGER = (CHKFILE('C:\TEMP'))
> IF vm_dir = 1 THEN
> SET VAR vm_temp TEXT = 'C:\TEMP'
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> &delfiles
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ELSE
> SET VAR vm_temp = (CVAL('CURRDIR'))
> -- will be the directory the database
> -- is in since we are connneted
> SET SCRATCH .vm_temp
> SET VAR delfiles TEXT = ('ERASE ' + .vm_temp + '\' + '*.$$$')
> SET ERROR MESSAGES 2926 OFF
> SET ERROR MESSAGES 2077 OFF
> &delfiles
> SET ERROR MESSAGES 2077 ON
> SET ERROR MESSAGES 2926 ON
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ENDIF
> SET VAR vm_olddrv TEXT = NULL
> SET VAR vm_olddrv = (SGET(.vm_tmpcurrhold,2,1))
> IF vm_olddrv IS NOT NULL THEN
> CHDRV &vm_olddrv
> SET VAR vm_olddrv = (.vm_olddrv + '\')
> CHDIR &vm_olddrv
> CHDIR &vm_tmpcurrhold
> SET VAR vm_mycurdir = (CVAL('currdir'))
> ENDIF
> ENDIF
> ENDIF
> ENDIF
> SET VAR vg_tmpdir TEXT = .vm_temp
> CLEAR VAR vm_%
> ENDIF
> SET VAR vm_mycurdir = (CVAL('currdir'))
>
> The problem I am having is that once the SCRATCH directory is
> set then this seems to be the directory that RBase is defaulting
> to now.. Is this the standard way that the SCRATCH setting a RBase
> is to interact?
>
> I can work around this, but it seems to me that it didn't use to
> work in this manner.
>
> __________________________________________________
> Do You Yahoo!?
> Try FREE Yahoo! Mail - the world's greatest free email!
> http://mail.yahoo.com/
> ================================================
> TO SEE MESSAGE POSTING GUIDELINES:
> Send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: INTRO rbase-l
> ================================================
> TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
> In the message body, put just two words: UNSUBSCRIBE rbase-l
> ================================================
> TO SEARCH ARCHIVES:
> http://www.mail-archive.com/rbase-l%40sonetmail.com/
__________________________________________________
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: INTRO rbase-l
================================================
TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED]
In the message body, put just two words: UNSUBSCRIBE rbase-l
================================================
TO SEARCH ARCHIVES:
http://www.mail-archive.com/rbase-l%40sonetmail.com/