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.
Is there a way to pass a field from one request to another to use in the WHERE statement (all in the same procedure)?
TABLE FILE DIM_PERIOD PRINT AGT_TERM_DT WHERE AGT_NBR EQ '01234'; END -* TABLE FILE DIM_PERIOD SUM NET_SALES BY ACCT_NBR WHERE INV_DT EQ (AGT_TERM_DT from above); END
Thanks!!
Krysti
WF 767
Posts: 34 | Location: Chicago, IL | Registered: September 02, 2004
TABLE FILE DIM_PERIOD
PRINT
AGT_TERM_DT
WHERE AGT_NBR EQ '01234';
-**************************
ON TABLE SAVE
END
-RUN
-READ SAVE &AGT_TERM_DT.A8. (If AGT_TERM_DT format is YYYYMMDD: 20071023)
OR &AGT_TERM_DT.A10. (If AGT_TERM_DT format is YYYY/MM/DD: 2007/10/23)
-**************************
TABLE FILE DIM_PERIOD
SUM
NET_SALES
BY ACCT_NBR
-**************************
WHERE INV_DT EQ &AGT_TERM_DT;
-**************************
END
-RUN
Edit: Typo'sThis message has been edited. Last edited by: Tom Flynn,
I presume that you expect a single value to be PRINTed by the first process. In that case, try WRITEing it to a text file, then READing it back into an AmberVariable and using the AmberVariable in the second process's WHERE statement.
There are many FocalPoint threads explaining the WRITE then READ code needed to convert table row-column(s) into an &var(s).
WIN/2K running WF 7.6.4 Development via DevStudio 7.6.4, MRE, TextEditor. Data is Oracle, MS-SQL.
Posts: 154 | Location: NY | Registered: October 27, 2005
TABLE FILE DIM_PERIOD
PRINT
AGT_TERM_DT
WHERE AGT_NBR EQ '01234';
ON TABLE HOLD AS H001 FORMAT ALPHA
END
-*
TABLE FILE DIM_PERIOD
SUM
NET_SALES
BY ACCT_NBR
WHERE INV_DT IN FILE H001
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
You can do either (1) TABLE/SAVE and then -READ it in or if you are hardocding the value do a (2) filedef then -write it out, and then -read it in
(1) TABLE FILE CAR PRINT CAR BY COUNTRY WHERE COUNTRY EQ 'ITALY' ON TABLE SAVE AS THESAVE END -RUN -READ THESAVE &COUNTRY.A10.&CAR.A16. TABLE FILE CAR PRINT CAR BY COUNTRY WHERE COUNTRY EQ '&COUNTRY' END -EXIT
(2) -PART2 FILEDEF XXX DISK MYSAVE.DAT (LRECL 10 -SET &KOUNTRY = ' '; -RUN -SET &KOUNTRY = 'ITALY'; -WRITE XXX &KOUNTRY.A10. -TYPE THE VALUE FOR COUNTRY IS &KOUNTRY -RUN TABLE FILE CAR PRINT MODEL RCOST DCOST AND COMPUTE PRRFIT/D12.2 = RCOST - DCOST; BY COUNTRY BY CAR WHERE COUNTRY EQ '&KOUNTRY' END -EXIT
ira 5.3.6 aixThis message has been edited. Last edited by: ira,
SET ASNAMES=ON
TABLE FILE DIM_PERIOD
PRINT
AGT_TERM_DT AS NEWTIME
WHERE AGT_NBR EQ '01234';
ON TABLE HOLD AS H_TIME FORMAT FOCUS INDEX AGT_TERM_DT
END
-*
Now create an inner join over the two tables DIM_PERIOD and H_TIME
-*
-*
TABLE FILE DIM_PERIOD
SUM
NET_SALES
BY ACCT_NBR
WHERE INV_DT EQ NEWTIME;
END
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006
SET ASNAMES=ON
TABLE FILE DIM_PERIOD
PRINT AGT_TERM_DT
WHERE AGT_NBR EQ '01234';
ON TABLE HOLD AS H_TIME FORMAT ALPHA
END
-RUN
-*
-*
DEFINE FILE DIM_PERIOD
SELDATA/I1=DECODE AGT_TERM_DT(H_TIME ELSE 1);
END
-*
TABLE FILE DIM_PERIOD
SUM NET_SALES
BY ACCT_NBR
WHERE SELDATA EQ 0;
END
Nice program WebFocus....
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006