Re: host arrays in calling stored procedures (ProC)
Date: Wed, 14 Mar 2001 15:49:02 -0400
Message-ID: <MPG.1519a3441f89debb989681_at_news.rdc.cl>
In article <3A9C0482.142ACEE3_at_pbi.net>, esteffl_at_pbi.net says...
> according to docs the FOR looping over host arrays should work for
> both INSERT and EXECUTE (among others). I have a WORKING example of
> insert statement that looks like this:
>
> EXEC SQL FOR :approve_reg_array_count
> INSERT INTO partner_reg_record
> (prr_regrecordid,
> ...
> prr_regstatus)
> VALUES
> (:prr_regrecordid_array,
> ...
> :prr_regstatus_array);
>
> I have tried to write similar statement using a stored procedure call
> (DOES NOT WORK):
>
> EXEC SQL FOR :approve_reg_array_count
> EXECUTE
> BEGIN
> partner_file_pkg.InsertPartnerRegRec(
> :prr_regrecordid_array,
> ...
> :retcode);
> END;
> END-EXEC;
>
> this is the error I get when trying to preprocess the above example:
>
> >make
> ...
> Pro*C/C++: Release 8.0.5.0.0 - Production on Tue Feb 27 11:15:26 2001
>
> (c) Copyright 1998 Oracle Corporation. All rights reserved.
>
> System default option values taken from:
> /usr/oracle/product/current-hoip/precomp/admin/pcscfg.cfg
>
> Semantic error at line 1544, column 13, file
> alliancePartner/CNC/incoming/process_partner_file.pc:
> BEGIN
> ............1
> PCC-S-02367, This indicator variable must be declared as type short
> Semantic error at line 1563, column 22, file
> alliancePartner/CNC/incoming/process_partner_file.pc:
> :retcode);
> .....................1
> ...
>
> any ideas how to make it work?
The retcode var was declarated in Pro*C Declaration?
EXEC SQL BEGIN DECLARE SECTION;
long retcode;
EXEC SQL END DECLARE SECTION;
Received on Wed Mar 14 2001 - 20:49:02 CET