Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Maintain Copy with Where

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Maintain Copy with Where
 Login/Join
 
Gold member
posted
Hello,

The function below is supposed to only copy records into the GetClientsStack WHERE SBH EQ searchHank. It seems that the WHERE clause is being ignored, because all records are being copied. I've tried with STACK COPY and FOR ALL COPY. When I tried to use just COPY I got an error saying a COPY with a WHERE requires a FOR. I'm really stumped...hopefully someone will be able to enlighten me on what I'm doing wrong.
 CASE SearchClientsByHank
REPOSITION fow_clients.FOW_CLIENTS.HFCCID ;
STACK CLEAR GetClientsStack ;
STACK CLEAR SearchClientsStack;
FOR ALL NEXT fow_clients.FOW_CLIENTS.HFCCID INTO SearchClientsStack;
REPEAT SearchClientsStack.FOCCOUNT; i = 1;
	COMPUTE SearchClientsStack(i).SBH/D7L = ATODBL(SearchClientsStack(i).HFCCID, '07', SearchClientsStack(i).SBH);
	COMPUTE i = i + 1;
ENDREPEAT
STACK COPY FROM SearchClientsStack INTO GetClientsStack WHERE (SearchClientsStack.SBH EQ searchHank);
COMPUTE searchHank="";
ENDCASE 

This message has been edited. Last edited by: brjohnson,


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Virtuoso
posted Hide Post
quote:
STACK COPY FROM SearchClientsStack INTO GetClientsStack WHERE (SearchClientsStack.SBH EQ searchHank);


In the WHERE clause, remove the stack-name qualification and the parentheses.
-- Documentation specifies the first operand is an unqualified 'field', which is implicity qualified by the origin stack-name.
-- The syntax does not allow for surrounding parentheses (although they may occur within the 'expression' for the second operand).

Also, verify the values that ATODBL is producing. If not as expected, it may help to use scalars as the operands.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Thanks Jack!!!!!

That worked perfectly. Did you find these rules in the standard help files, or did you find them somewhere else? I didn't see anything like what you recommended in the help files.


Bryan Johnson
WebFOCUS 7.7.03
Maintain
Win 7
Excel, PDF, HTML
 
Posts: 54 | Registered: January 16, 2008Report This Post
Virtuoso
posted Hide Post
I had my suspicions. Searching techsupport for "STACK COPY" and "WHERE", I found these:

1. This document gives syntax, with examples that make clear that stack-name qualification is not required. (Since the syntax of "WHERE ..." is restrictive -- the left operand must name an element of the source stack -- and does not indicate that the condition may be parenthesized, it is prudent to suppress the impulse to parenthesize.

2. This article explains what can go wrong when you include qualification.


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Maintain Copy with Where

Copyright © 1996-2020 Information Builders