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.
How do I pass parameters into another procedure. Here is the code for the procedure that will contain four values...
TABLE FILE DW_DIM_TM PRINT DW_DIM_TM.DW_DIM_TM.CALDTEI AS 'DST,DW_DIM_TM.DW_DIM_TM.CALDTEI' WHERE DW_DIM_TM.DW_DIM_TM.CALDTEI EQ &PICKDATE; ON TABLE HOLD AS HOLDINGFAST END
TABLE FILE HOLDINGFAST PRINT COMPUTE STARTWEEK/YYMD = HOLDINGFAST.HOLDINGF.CALDTEI - 56; COMPUTE ENDWEEK/YYMD = HOLDINGFAST.HOLDINGF.CALDTEI - 7; ON TABLE HOLD AS BASEAPP/WEEKS END
JOIN INNER WEEKS.WEEKS.STARTWEEK IN WEEKS TO MULTIPLE DW_DIM_TM.DW_DIM_TM.CALDTEI IN DW_DIM_TM TAG J0 AS J0 END
JOIN INNER WEEKS.WEEKS.ENDWEEK IN WEEKS TO MULTIPLE DW_DIM_TM.DW_DIM_TM.CALDTEI IN DW_DIM_TM TAG J1 AS J1 END
TABLE FILE WEEKS PRINT J0.DW_DIM_TM.CALFSYR AS 'BEGINYEAR' J0.DW_DIM_TM.CALFSWK AS 'BEGINWEEK' ON TABLE HOLD AS BASEAPP/STARTCOMPUTE END
TABLE FILE WEEKS PRINT J1.DW_DIM_TM.CALFSYR AS 'ENDYEAR' J1.DW_DIM_TM.CALFSWK AS 'ENDWEEK' ON TABLE HOLD AS BASEAPP/ENDCOMPUTE END
Here is the code that needs those values (2 year values i.e. 2015, 2016 & 2 week of the year values i.e. 51, 6) passed to...
TABLE FILE PWCS_WJEMPWKF SUM PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEHRST PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJECSET COMPUTE CasesPickedOnAvgPerWeek/D12.2 = PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJECSET / PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEHRST; AS 'CasesPickedOnAvgPerWeek' BY LOWEST PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEYRN BY LOWEST PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWKN BY LOWEST PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJECDE BY LOWEST PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJECVWDS WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJECDE CONTAINS '101' OR '201' OR '203' OR '217' OR '209' OR '501' OR '509'; WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWH EQ ' 1' OR ' 7'; -*WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEYRN GE BEGINYEAR; -*WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWKN GE BEGINWEEK; -*WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEYRN LE ENDYEAR; -*WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWKN LE ENDWEEK; ENDThis message has been edited. Last edited by: <Emily McAllister>,
I have tried several variations to get this working. Like using INCLUDE with READ and defining the READ. JOINS will not work in this case. Any help would be appreciated.
I don't understand the problem. The only variable (parameter) you specify is &PICKDATE.
This will get the column values into variables that you can use in the WHERE statements:
...
SET ASNAMES=ON
SET HOLDLIST=PRINTONLY
-RUN
TABLE FILE WEEKS
PRINT
J0.DW_DIM_TM.CALFSYR AS 'BEGINYEAR'
J0.DW_DIM_TM.CALFSWK AS 'BEGINWEEK'
ON TABLE HOLD AS HSTARTCOMPUTE
END
-RUN
-READFILE HSTARTCOMPUTE
TABLE FILE WEEKS
PRINT
J1.DW_DIM_TM.CALFSYR AS 'ENDYEAR'
J1.DW_DIM_TM.CALFSWK AS 'ENDWEEK'
ON TABLE HOLD AS HENDCOMPUTE
END
-RUN
-READFILE HENDCOMPUTE
...
WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWH EQ ' 1' OR ' 7';
WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEYRN GE &BEGINYEAR;
WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWKN GE &BEGINWEEK;
WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEYRN LE &ENDYEAR;
WHERE PWCS_WJEMPWKF.PWCS_WJEMPWKF.WJEWKN LE &ENDWEEK;
...
This will work if the second part of the code you posted is either in the same program as the top part, or is in a fex that is included.
-READFILE reads one row of data and turns each column into a variable containing the value.
Depending on the format of your PWCS_WJEMPWKF columns, you may or may not have to include quotes around the variables.
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