The indicator variables are set at the time of the fetch. The values are 0 and 
1 indicating whether or not the value retrieved is a null. I just declare the 
variables like this — and I only use one for them all. I use the R:Base system 
to identify whether or not the value is null. 

SET VAR i1 INTEGER

Albert

> On Jun 28, 2017, at 7:46 AM, Stuart Hellman <[email protected]> wrote:
> 
> Dan,
>  
> Thanks for the suggestion. 
>  
> I did try your idea. I defined the indicators setting them to an initial 
> value of -9 so I would know that those values changed.  Unfortunately, the 
> FETCH  command didn’t change the indicator values. 
>  
> Stu Hellman
>  
> From: [email protected] <mailto:[email protected]> 
> [mailto:[email protected] <mailto:[email protected]>] On Behalf 
> Of Dan Goldberg
> Sent: Tuesday, June 27, 2017 12:27 PM
> To: [email protected] <mailto:[email protected]>
> Subject: RE: [RBASE-L] - Peculiar Cursor Behavior
>  
> Shouldn’t you have Indicator in your fetch command? I think the variables 
> that hold the indicators should be different as well.
>  
>  
> FETCH QteDetail  +       ßHere is where the 406 error code is returned in my 
> error variable
>     INTO vQPart# INDICATOR vInd1, vLength INDICATOR  vInd2, vUMMult INDICATOR 
>  vInd3
>  
> Dan Goldberg
>  
>  
>  
> From: [email protected] <mailto:[email protected]> 
> [mailto:[email protected] <mailto:[email protected]>] On Behalf 
> Of Stuart Hellman
> Sent: Tuesday, June 27, 2017 10:11 AM
> To: [email protected] <mailto:[email protected]>
> Subject: RE: [RBASE-L] - Peculiar Cursor Behavior
>  
> There are different sets of tables used for different processes, so that is 
> why the WHERE clause is a variable
>  
>   SET VAR vTable = 'QuoteDetail'
>   SET VAR vWhere = ('WHERE Quote# = .vQuote# AND Window = .vWindow ')
>   SET VAR vWhere = (.vWhere & 'AND CostType = .vPrimAlt')
>  
> SET VAR vWhere = +
> (.vWhere & 'AND T2.SnapShotID = .vSnapShotID AND T1.MasterPart# = 
> T2.MasterPart#')
>  
> BROWSE T1.MasterPart#, length, ummult FROM &vTable T1, snappartmast T2 &vWhere
>  
> DECLARE QteDetail CURSOR +
> FOR SELECT T1.MasterPart#, T1.Length, T2.UMMult +
> FROM &vTable T1, SnapPartMast T2 &vWhere
>  
> OPEN QteDetail
>  
>   FETCH QteDetail  +       ßHere is where the 406 error code is returned in 
> my error variable
>     INTO vQPart# vInd, vLength vInd, vUMMult vInd
>    IF SQLCODE = 100 THEN
>        GOTO EndLoop
>    ENDIF
>  
>  
>  
> From: [email protected] <mailto:[email protected]> 
> [mailto:[email protected] <mailto:[email protected]>] On Behalf 
> Of Buddy Walker
> Sent: Tuesday, June 27, 2017 9:28 AM
> To: [email protected] <mailto:[email protected]>
> Subject: RE: [RBASE-L] - Peculiar Cursor Behavior
>  
> Stuart
>   Is it possible for you to show the complete browse and declare statements.
>  
> Buddy
>  <> 
> From: [email protected] <mailto:[email protected]> 
> [mailto:[email protected] <mailto:[email protected]>] On Behalf 
> Of Stuart Hellman
> Sent: Tuesday, June 27, 2017 8:51 AM
> To: [email protected] <mailto:[email protected]>
> Subject: [RBASE-L] - Peculiar Cursor Behavior
>  
> Need some expert advice on a cursor problem I’m having.
>  
> The situation is a large form in which is using about 10, one at a time. 
> Nothing “exotic” is going on with the cursor in question. All of them work 
> except one. Data is being retrieved from 2 tables. The cursor is dropped, 
> declared, opened and then the data is to be fetched. This is the point where 
> things go south.
>  
> The SQLCode being returned is ‘100’ and the Error Variable value returned is 
> ‘406’, which means End-Of-Data. In trying to determine the cause, a BROWSE 
> was placed before the FETCH having converted the DECLARE statement. The three 
> rows expected are displayed. Put a SELECT after, again converting the DECLARE 
> statement plus adding a LIMIT = 1 clause. No problems.
>  
> Two very simple questions here:
> 1: Why is R:Base returning the End-Of-Data condition when the SELECT clause 
> is correct?
> 2: What needs to be done to fix the situation?
>  
> Thank you in advance for your  help.
>  
>  
> Stu Hellman
>  
> 
> <image001.jpg> <http://www.qmiusa.com/>
> Stuart Hellman
> Software Designer  
> Email:
>   [email protected] <mailto:[email protected]>
> Toll Free:
>   800-446-2500
> International:
>   01 630-529-7111
> Extension:
>   1029
> www.qmiusa.com <http://www.qmiusa.com/>
>  
>  
> .
> This email may contain material that is confidential, privileged and/or 
> attorney work product for the sole use of the intended recipient. Any review, 
> reliance or distribution by others or forwarding without express permission 
> is strictly prohibited. If you are not the intended recipient, please contact 
> the sender and delete all copies
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "RBASE-L" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
You received this message because you are subscribed to the Google Groups 
"RBASE-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to