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  iWay Software Product Forum on Focal Point    Custom Condition in Process Flow

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Custom Condition in Process Flow
 Login/Join
 
Member
posted
ALL,

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:

-IF (&&RPCCOND EQ 0) GOTO Big GrinEP_0;
-IF (&&RPCCOND NE 0) GOTO Big GrinEP_1;

DEP_0 and DEP_1 are these email notifications. Any ideas???

--Tasha


WebFocus 7.6.10
Data Migrator 7.6.10
Windows NT
Excel, PDF, HTML, AHTML
 
Posts: 11 | Registered: February 06, 2008Report This Post
Member
posted Hide Post
Our WebFOCUS is 7.6.10 now. I need to change my information. Just FYI.


WebFocus 7.6.10
Data Migrator 7.6.10
Windows NT
Excel, PDF, HTML, AHTML
 
Posts: 11 | Registered: February 06, 2008Report This Post
Virtuoso
posted Hide Post
Remove the unnecessary END statement at the bottom of your RPC and see if that makes a difference.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Member
posted Hide Post
Dan,

Didn't seem to change the outcome. Below is the log for that part of the process:

05/20/2010 10:51:14 DEP_2: procedure rpc_car_test started. baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 TABLE FILE CAR_SQL baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 SUM CNT.CAR baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 WHERE CAR EQ 'JAGUAR' baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 ON TABLE HOLD AS CM FORMAT ALPHA baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 END baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -RUN baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 0 NUMBER OF RECORDS IN TABLE= 1 LINES= 1 baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -READ CM &&JAGCNT.I5. baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -RUN baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -TYPE baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -SET &&RPCCOND= IF EQ 0 THEN 0 ELSE 1234 ; baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 -TYPE 0 baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 0 baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:14 DEP_2 rpc_car_test Return Code = 0 baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001
05/20/2010 10:51:15 DEP_0 EDAMAIL Return Code = 0 baseapp car_sql 2010-05-03-19-39-13t3cp00000163_00000001


WebFocus 7.6.10
Data Migrator 7.6.10
Windows NT
Excel, PDF, HTML, AHTML
 
Posts: 11 | Registered: February 06, 2008Report This Post
Virtuoso
posted Hide Post
quote:
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
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
dhagen - I made the changes you suggested and still get the same response.

-SET &&RPCCOND= IF EQ 0 THEN 0 ELSE 1234 ;
-TYPE 0

That is from the log. It should be 10 and then RPCCOND would be set to 1234.


WebFocus 7.6.10
Data Migrator 7.6.10
Windows NT
Excel, PDF, HTML, AHTML
 
Posts: 11 | Registered: February 06, 2008Report This Post
Virtuoso
posted Hide Post
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, 2007Report This Post
Member
posted Hide Post
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
 
Posts: 11 | Registered: February 06, 2008Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Custom Condition in Process Flow

Copyright © 1996-2020 Information Builders