|
Alastair -
Why don't you just
RUN .vOutPutFile
?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sami
Aaron Software Management
Specialists 913-915-1971 From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alastair Burr Sent: Tuesday, January 11, 2005 12:08 PM To: RBG7-L Mailing List Subject: [RBG7-L] - Fw: [RBG7-L] - Unload/Input problem (Bug #71799) W98SE Just following up on this problem:
I have reduced the code to this:
CLS
CHDRV c: CHDIR \RBTI\RBG7\SAMPLES\DATABASES DISCONNECT SET VAR vDBList TEXT =
NULL
SET VAR vItemName TEXT = NULL SET VAR vCycle1 INTEGER = NULL SET VAR vDBList = 'ConComp,RRBYW1'
SET VAR vCount = (ITEMCNT(.vDBList)) SET VAR vCycle1 = 0 WHILE vCycle1 < .vCount THEN SET VAR vCycle1 = (.vCycle1 + 1) SET VAR vItemName = NULL SET VAR vItemName = (SSUB(.vDBList, .vCycle1)) SET VAR vOutPutFile = (.vItemName + '.RLD') SET VAR vOutPutLob = (.vItemName + '.LOB') SET VAR vCurrFiles = (.vItemName + '.RB?') SET VAR vRenFiles = (.vItemName + '._B?') CHDIR .vItemName CONNECT .vItemName OUT .vOutPutFile UNLOAD ALL OUT SCREEN DISCONNECT RENAME .vCurrFiles .vRenFiles INPUT .vOutPutFile DISCONNECT DEL .vOutPutFile DEL .vOutPutLob DEL .vRenFiles CHDIR \DBFILES ENDWHILE RETURN
I still get the error message:
Access violation at address 0101A515 in module 'RBENGINE.DLL'. Read of
address FFFFFFFF
after the end of the input command. It seems that the INPUT command does not like anything
to follow it - if using a variable???
This works at the R:> INPUT
ConComp.RLD
This also works at the R:> INPUT
.vOutPutFile
This fails at the R:> INPUT .vOutPutFile;
DISCONNECT
Can anybody confirm this, please?
Thanks & regards,
Alastair.
----- Original Message -----
From: Alastair Burr
Sent: Monday, January 03, 2005 9:16 AM
Subject: [RBG7-L] - Unload/Input problem Please can anybody see what I am doing wrong
here:
I have a program which appears to be written correctly -
but remember that RStyle does not report any errors for v7.x under W98SE so I am
not 100% sure. Nevertheless, I cannot find anything wrong and it seems to do
everything correctly.
However, right at the end of the input file I get this
error message:
Access violation at address 0101A515 in module
'RBENGINE.DLL'. Read of address FFFFFFFF
It apparently fails after the last command in the input
file before returning to my program. I don't know if it's relevant but the
violation address has changed with the installation of the latest beta
(31/12/04).
After exiting from R:Base the new database appears to
have been created without any errors and the last command, a rule definition,
has been applied.
I reported this as a bug a few weeks ago but RBTI/RDCC
could not replicate it. If I create a very simple version on my program and use
it on ConComp neither can I replicate it.
This is that short version:
SET VAR vDBtoReload TEXT = Reload.FLE
CONNECT CONCOMP
SET EOFCHAR ON
OUTPUT .vDBtoReload UNLOAD ALL SET VAR vError = .vErrVar OUTPUT SCREEN DISCONNECT RENAME CONCOMP.RB? CONCOLD.RB?
INPUT &vDBtoReload
SET VAR vError = .vErrVar DISCONNECT RETURN
This is my much longer program. The various called files are used in many
other places are I am 100% sure that they work correctly. Pause_Sub.CMD command
produces a pause display while SetOwner.CMD forces entry of the owner password
and quits if it is not entered. Some variables are always available so are not
re-defined here:
*( FileName: UnLoad_ReLoad.CMD ... ... Date of last
amendment: 03/01/2005 )
*( Recreates the databases from UnLoad files. ) -- This line extends to 78 characters - - - - - - - - - - - - - - - - - - - -> -- TRACE D:\DBCOPY\SOURCE\MULTIDAT\UnLoad_ReLoad.CMD SET VAR vCaption = +
'MultiDat Database - Maintenance: UnLoad and Input ALL Databases' SET CAPTION .vCaption SET VAR vCurrDB_Name TEXT = NULL
SET VAR vCurrDB_ShortName TEXT = NULL SET VAR vCurrDB_DataPath TEXT = NULL SET VAR vCurrDB_SourcePath TEXT = NULL SET VAR vBackDestination TEXT = NULL
SET VAR vLocal_DataPath TEXT = NULL SET VAR
vDBList TEXT =
NULL
SET VAR vDbtoReload TEXT = NULL SET VAR vItemName TEXT = NULL SET VAR vCycle1 INTEGER =
NULL
SET VAR vDelFiles TEXT = NULL --
---------------------------------------------------------------------------
-- Set user as supervisor: -- --------------------------------------------------------------------------- RUN D:\DBCOPY\SOURCE\MULTIDAT\SetOwner.CMD --
---------------------------------------------------------------------------
-- Start of main application: -- --------------------------------------------------------------------------- SET MULTI OFF CONNECT .vControlDB SELECT (LISTOF(Name_DataBase)) INTO vDBList FROM MultiDataBase + WHERE RBG_Version = .vVersion ORDER BY Name_DataBase DISCONNECT SET VAR vCount = (ITEMCNT(.vDBList)) CHDIR \DBFILES\MULTIDAT
SET VAR vCycle1 = 0
WHILE vCycle1 < .vCount THEN SET VAR vCycle1 = (.vCycle1 + 1) SET VAR vItemName = NULL SET VAR vItemName = (SSUB(.vDBList, .vCycle1)) CONNECT .vControlDB
SET VAR vCurrDB_Name = .vItemName
SELECT ShortName INTO vCurrDB_ShortName FROM MultiDatabase + WHERE Name_DataBase = .vCurrDB_Name SELECT FileLocation INTO vCurrDB_DataPath FROM UserDirectories + WHERE Name_DataBase = .vCurrDB_Name AND DirectoryType = 'Data' DISCONNECT
SET VAR vLocal_DataPath = (.vCurrDB_DataPath + '\'
+ .vCurrDB_Name)
SET VAR vDBtoReload = (.vCurrDB_DataPath + '\' + .vCurrDB_ShortName + '_COPY.FLE') SET VAR vDelFiles = (.vCurrDB_DataPath + '\' + .vCurrDB_ShortName + '_COPY.LOB') SET VAR vCurrDB_SourcePath = (.vLocal_DataPath + '.RB*') SET VAR vBackDestination = ('ORIG_' + .vCurrDB_ShortName + '.RB*') SET VAR vMessage = ('Reloading' & .vCurrDB_Name & 'to new database') SET VAR vCaption = 'Please wait...' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 3 INFO 0 --
---------------------------------------------------------------------------
-- Connect to database: -- --------------------------------------------------------------------------- CHDIR .vCurrDB_DataPath CONNECT .vCurrDB_Name SET VAR vError = .vErrVar IF vError <> 0 THEN DISCONNECT SET VAR vMessage = ('Error connecting to database:' & .vLocal_DataPath) SET VAR vCaption = 'ERROR!' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 3 ERROR 0 GOTO lEnd ENDIF SET NULL -0- --
---------------------------------------------------------------------------
-- Delete any old files: -- --------------------------------------------------------------------------- SET ERROR MESSAGE 2077 OFF -- file not found ERASE &vDelFiles SET VAR vDelFiles = .vDBtoReload ERASE &vDelFiles SET VAR vDelFiles = .vBackDestination ERASE &vDelFiles SET ERROR MESSAGE 2077 ON --
---------------------------------------------------------------------------
-- Unload to file: -- --------------------------------------------------------------------------- SET EOFCHAR ON -- R:Base default is ON so ensure default set. OUTPUT .vDBtoReload UNLOAD ALL SET VAR vError = .vErrVar OUTPUT SCREEN DISCONNECT IF vError <> 0 THEN DISCONNECT SET VAR vMessage = ('Error creating UnLoad file for database:' & .vDBtoReload) SET VAR vCaption = 'ERROR!' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 3 ERROR 0 GOTO lEnd ENDIF --
---------------------------------------------------------------------------
-- Rename current database: -- --------------------------------------------------------------------------- RENAME &vCurrDB_SourcePath &vBackDestination SET VAR vError = .vErrVar IF vError <> 0 THEN DISCONNECT SET VAR vMessage = + ('Error renaming current database:' & .vCurrDB_SourcePath & 'to:' & .vBackDestination) SET VAR vCaption = 'ERROR!' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 3 ERROR 0 GOTO lEnd ENDIF --
---------------------------------------------------------------------------
-- Create new database: -- --------------------------------------------------------------------------- INPUT &vDBtoReload -- Access violation at address 0101A515 in module 'RBENGINE.DLL'. Read of address FFFFFFFF -- Apparently fails after the last command in the file before returning here. SET VAR vError = .vErrVar DISCONNECT IF vError <> 0 THEN DISCONNECT SET VAR vMessage = ('Error loading data to new database:' & .vDBtoReload) SET VAR vCaption = 'ERROR!' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 3 ERROR 0 GOTO lEnd ENDIF SET VAR vMessage = (.vCurrDB_Name & 'Database created
successfully')
SET VAR vCaption = 'Multi-Database Reload:' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 0 INFO 3 CLS ENDWHILE SET ERROR MESSAGES OFF
GOTO lSkip RETURN LABEL lEnd
SET VAR vMessage = ('Error Encountered:' & .vMessage) SET VAR vCaption = 'ERROR!' SET VAR vButton = 'Continue...' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 1 ERROR 0 SET VAR vButton = 'Press any key to exit...' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 1 ERROR 0 EXIT LABEL lSkip
DISCONNECT SET VAR vFirstRun = 'Yes' SET VAR vMessage = 'All reloads successful!' SET VAR vCaption = 'Multi-Database Reload:' SET VAR vButton = 'Press any key to continue...' RUN D:\DBCOPY\SOURCE\MultiDat\Pause_Sub.CMD USING 1 INFO 0 QUIT TO D:\DBFILES\MULTIDAT\v7_MultiDat.APP RETURN *( End of program ) Thanks in advance for any insights,
Regards,
Alastair. ----------------------------------
A D B Burr, St. Albans, UK. ---------------------------------- [EMAIL PROTECTED] ---------------------------------- |
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug #717... Sami Aaron
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... MikeB
- [RBG7-L] - RE: Fw: [RBG7-L] - Unload/Input problem (Bug... Alastair Burr
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... Alastair Burr
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... MikeB
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... Alastair Burr
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... MikeB
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... MikeB
- [RBG7-L] - Re: Fw: [RBG7-L] - Unload/Input problem (Bug... Alastair Burr
