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     WebFocus : Define File Conditions outside of Defined Table

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WebFocus : Define File Conditions outside of Defined Table
 Login/Join
 
Gold member
posted
Hello Everyone,

I was trying to create a Define Field in a WebFocus Procedure, however I realized that one of the conditions invovled would have to check if a certain column's value is inside a separate table.

Example:
DEFINE FILE TABLE1
TROUBLED_FLAG/A1 = IF COLUMN-A "INSIDE (TABLE FILE TABLE2 PRINT COLUMN-A END)" THEN 'Y' ELSE 'N';
END
 
Posts: 68 | Registered: March 15, 2006Report This Post
Expert
posted Hide Post
can you JOIN some key field in TABLE1 to same key field in TABLE2?




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Gold member
posted Hide Post
I have tried the joins but it has been giving me this error:

(FOC1070) VALUE FOR JOIN 'FROM' FIELD OUT OF SEQUENCE. RETRIEVAL ENDED
 
Posts: 68 | Registered: March 15, 2006Report This Post
Virtuoso
posted Hide Post
Here is an example of the code that the MRE assistant generated for a define based join. In this case, the school is not in any order in the RBHS..., however RBHS... is in the main key order of student. You may have to extract and hold then join to get the files in an order that FOCUS will accept.
[code begins]
JOIN
RTRTTBL_UNO_PROD.RTRTTBL.RT005_RTRT AND RTRTTBL_UNO_PROD.RTRTTBL.RT010_RTRT
IN RTRTTBL_UNO_PROD
TO MULTIPLE RTPGTBL_UNO_PROD.RTPGTBL.RT005_RTPG AND RTPGTBL_UNO_PROD.RTPGTBL.RT010_RTPG
IN RTPGTBL_UNO_PROD TAG J001
AS J001
END
JOIN
J001.RTPGTBL.RT010_RTPG
IN RTRTTBL_UNO_PROD
TO MULTIPLE RBHSTBL_UNO_PROD.RBHSTBL.RB005_RBHS
IN RBHSTBL_UNO_PROD TAG J002
AS J002
END
JOIN
SCHOOL WITH RB110
IN RTRTTBL_UNO_PROD
TO MULTIPLE AIRTTBL_UNO_PROD.AIRTTBL.AI010_AIRT
IN AIRTTBL_UNO_PROD TAG J003
AS J003
END
DEFINE FILE RTRTTBL_UNO_PROD
-* DEFINE BEGIN SCHOOL
SCHOOL/A7 = EDIT (RB110,'$$9999999');
-* DEFINE END SCHOOL
END
TABLE FILE RTRTTBL_UNO_PROD
[code ends]


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Gold member
posted Hide Post
Thanks. That helped.
 
Posts: 68 | Registered: March 15, 2006Report This Post
Expert
posted Hide Post
Ben,

Another method of achieving this is to use a decode against a file. The downside is that there is a limitation of about 32000 chars (I think) in the external file, but it might prove useful for you -

SET HOLDLIST = PRINTONLY
TABLE FILE CAR
BY CAR
WHERE COUNTRY EQ 'W GERMANY'
   OR COUNTRY EQ 'ENGLAND'
   ON TABLE SAVE
END
-RUN

DEFINE FILE CAR
  WANT_IT/A1 = DECODE CAR(SAVE ELSE 'N');
END
TABLE FILE CAR
SUM RCOST
    DCOST
    WANT_IT
 BY COUNTRY
 BY CAR
 BY MODEL
-*WHERE WANT_IT NE 'N'
END
-RUN


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     WebFocus : Define File Conditions outside of Defined Table

Copyright © 1996-2020 Information Builders