Hi,
While trying to convert a reasonably big VMS application (mainly COBOL)
from SYBASE to RDB, I do encounter problems dealing with SYBASE
hash-tables (aka #tables).
Styding the doc for RDB suggest using "DECLARE LOCAL TEM****ARY TABLE
MODULE.tablename". This works well in straightforward SQL (tables are
realy scratch-mode, no two processes can see each other tables,
automatic drop after disconnect, etc.).
But alas, as the doc says, it is not usuable in precompiled programs
(Cobol). I tried using a CONTEXT file ( $SQLPRE blablabla.sco
context_file /whatever), and this basically returns :
declare local tem****ary TABLE module.SUPP_SERV_STATUS
1
%SQL-F-NO_DMLPLAN, (1) You can only use DECLARE statements in a context
file.
declare local tem****ary TABLE module.SUPP_SERV_STATUS
2
%SQL-E-INV_TBL_DCL, (2) Invalid use of declared local tem****ary table
SUPP_SERV_STATUS
(declare statement comes the from context files, not from the .SCO)
Although the message NO_DMLPLAN is slightly confusing (other DECLAREs
are accepted), this is really the same error I get when trying to put
the DECLARE inside the .SCO
Using CREATE LOCAL TEM****ARY TABLE ... from inside the .SCO is not good
enough, because two processes can see each other (tem****ary) tables,
and I already experienced some nasty locking when two temp tables are
about to be created/used by separated processes.
Any takers ?
advTHANKSance,
f.


|