Razzak:
'Customer' is a valid table.
Right off the bat I notice six (6) code changes:
1. Individual "SET VAR" statements;
2. INTEGER variable set to '0' not NULL;
3. SET VAR vTargetTable = (.vImportTable) [use of parentheses];
4. Fewer continuation character breaks;
5. 'COUNT(*)' not 'COUNT<sp>(*)' [my bad];
6. 'INDIC' not 'IND';
The SELECT COUNT(*) routine intends to determine the presence of the 'import table' PKSIMPORT, which would exist at this point only if a cleanup routine failed in an earlier session. I wonder whether its the absence of the table, or my coding, that produces the burp.
Great catch.
Thanks!
Bruce
-------- Original Message --------
Subject: [RBASE-L] - Re: Error Source Mystery
From: "A. Razzak Memon" <[email protected]>
Date: Sun, September 02, 2012 11:47 am
To: [email protected] (RBASE-L Mailing List)
At 02:19 PM 9/2/2012, Bruce Chitiea wrote:
>I'm up and running, so this is for understanding only.
>
>For reasons obscure and unclear, the following code produces two errors,
>interrupting TRACE processing:
>
>SET VAR +
> vimporttable TEXT = NULL, +
> vtargettable TEXT = NULL, +
> vsystablecount INTEGER = NULL
>
>SET VAR +
> vimporttable = 'pksimport', +
> vtargettable = .vimporttable
>
>SELECT COUNT (*) +
>INTO vsystablecount IND iv1 +
>FROM sys_tables +
>WHERE sys_table_name = .vtargettable
>
>"ERROR-I/O Problems-Check for a full disk. (2009)"
>"ERROR-Database files are out of sync. (2520)"
Bruce,
Without knowing further details and state of your database and the
development environment, try the following "simple test" on RRBYW17
database and see what you find. Simply copy and paste the code.
-- Start here ...
-- TestThis.RMD
-- A. Razzak Memon
-- September 2, 2012
IF (CVAL('DATABASE')) <> 'RRBYW17' OR (CVAL('DATABASE')) IS NULL THEN
CONNECT RRBYW17 IDENTIFIED BY NONE
ENDIF
SET VAR vImportTable TEXT = NULL
SET VAR vTargetTable TEXT = NULL
SET VAR vSysTableCount INTEGER = 0
SET VAR vImportTable = 'Customer'
SET VAR vTargetTable = (.vImportTable)
SELECT COUNT(*) INTO vSysTableCount INDIC iv1 +
FROM Sys_Tables WHERE Sys_Table_Name = .vTargetTable
IF vSysTableCount = 0 THEN
CLS
PAUSE 2 USING 'Invalid Target Table Name!' +
CAPTION 'Test This' ICON WARNING +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR RED +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Longhorn
GOTO Done
ELSE
CLS
PAUSE 2 USING 'Valid Target Table Name!' +
CAPTION 'Test This' ICON CONFIRM +
OPTION MESSAGE_FONT_NAME Tahoma +
|MESSAGE_FONT_COLOR GREEN +
|MESSAGE_FONT_SIZE 11 +
|THEMENAME Longhorn
ENDIF
-- Do what you have to do here ...
LABEL Done
CLEAR VARIABLES vImportTable,vTargetTable,vSysTableCount,iv1
RETURN
-- End here ...
Hope that provides you with some blue's clues ...
Very Best R:egards,
Razzak.
www.rbase.com
www.facebook.com/rbase

