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.
I have a simple CAR DM job for testing purposes to test whether I can create a custom condition based on a global variable with an RPC. The first part of the Process flow is the Data Flow that just loads CAR into a SQL table. Then there is a simple RPC, see below:
-SET &ECHO=ALL;
TABLE FILE CAR_SQL SUM CNT.CAR WHERE CAR EQ 'JAGUAR' ON TABLE HOLD AS CM FORMAT ALPHA END -RUN -READ CM &&JAGCNT.I5.
-RUN
-TYPE &&JAGCNT
-SET &&RPCCOND= IF &&JAGCNT EQ 0 THEN 0 ELSE 1234 ;
-TYPE &&RPCCOND
END
After this, I have a custom condition on the RPC to determine the path the flow takes afterwards. The custom condition is either (&&RPCCOND EQ 0) or (&&RPCCOND NE 0). The RPC passes the correct value to RPCCOND correctly when you run the RPC by itself. However when you run the entire process flow it always passes blanks which in return always gets determined as EQ 0 (True) value. After the condition, I just have 2 Email Notifications right now for testing purposes. The code built by the DMC from my custom conditions are below:
Originally posted by Tasha: TABLE FILE CAR_SQL SUM CNT.CAR COMPUTE NOTHING/A10 = ' '; <== this one WHERE CAR EQ 'JAGUAR' ON TABLE HOLD AS CM FORMAT ALPHA ON TABLE SET HOLDLIST PRINTONLY <== and this one END
Add the two lines noted above. Just in case some settings change during the run time of the process flow.
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
First, I believe CNT may be generating I9 output instrad of I5. Changing your -READ to -READ CM &&JAGCNT.I9 may fix the problem.
TABLE FILE CAR_SQL
SUM CNT.CAR
WHERE CAR EQ 'JAGUAR'
ON TABLE HOLD AS CM FORMAT ALPHA
END
-*
-RUN
-READ CM &&JAGCNT.I9.
-TYPE &&JAGCNT
-SET &&RPCCOND= IF &&JAGCNT EQ 0 THEN 0 ELSE 1234 ;
-TYPE &&RPCCOND
However, if you only need to differentiate beteween a zero and a non-zero result, this may be an easier way:
TABLE FILE CAR_SQL
COUNT CAR
WHERE CAR EQ 'JAGUAR';
ON TABLE SAVE
END
-*
-RUN
-SET &&RPCCOND = IF &LINES EQ 0 THEN 0 ELSE 1234 ;
or more simply:
-SET &&RPCCOND = &LINES ;
-TYPE &&RPCCOND
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
Dan - You were right about the I9. That fixed it, which is weird because the FF on the HOLD file showed I5. Thanks!
Also, I have to keep this scenario because I am right now just testing this theory for functionality. Eventually, I will need this for a comparison on dates.
Thanks for all the help.
-Tasha
WebFocus 7.6.10 Data Migrator 7.6.10 Windows NT Excel, PDF, HTML, AHTML