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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
misc
 Login/Join
 
Gold member
posted
Hi,

I have the following requirement.I execute a database stored procedure that processes data from the database and inserts a single record in a table say XYZ with the field COUNT updated to the no. of records processed.There are cases when there is no data to process in the database.In such a case the SP inserts a single record in the XYZ table as usual and updates COUNT to 0.

Now depending upon the count i want to display the user an appropriate screen(i.e when the COUNT is not zero i want to proceed to some other screen as i am doing right now but when the COUNT is zero i want to take the user to the error page).The following is my present code.The DB_PROC_1 procedure is the one that processes the data and inserts a single record in the XYZ table and updates COUNT to an appropiate value.

Now i want to know how to fire a second query(i.e select COUNT from XYZ where DATA_KEY=(the one returned by DB_PROC_1)) to check the value of COUNT variable in database and go ahead with the processing.

-INCLUDE db_connection_file

EX DB_PROC_1 param1,param2...,paramN;

TABLE FILE SQLOUT
PRINT
COMPUTE PR_NO/A15 = FTOA(DATA_KEY, '(F4)', PR_NO);
    COMPUTE OPTION1/A100 =
     '<option value="' || PR_NO || '">' || PR_NO || '</option>' ;
  ON TABLE HOLD AS REPORT FORMAT ALPHA
END
-RUN

-HTMLFORM BEGIN
<HTML>
<BODY>
<select name="REPNO">
  !IBI.FIL.REPORT;
</select>
<BODY>
</HTML>
 
Posts: 84 | Registered: June 05, 2006Report This Post
Master
posted Hide Post
do a simple
-IF someamper EQ '0' then goto my_ref_for0s else goto non_0;
-my_ref_for0s
some -htmlform that will auto redirect to your error page.

-non_0
some -htmlform that will auto redirect to your non-error page.


Prod: Single Windows 2008 Server running Webfocus 7.7.03 Reporting server Web server IIS6/Tomcat, AS400 DB2 database.
 
Posts: 611 | Registered: January 04, 2007Report This Post
Platinum Member
posted Hide Post
Hi Aditya

Jason K is right you need to use Dialog manager Code -IF to make condintional jump like:-

TABLE FILE XYZ
PRINT *
WHERE COUNT EQ 0
ON TABLE HOLD
END
-RUN
-IF &RECORDS EQ 0 GOTO -ERRORMSG ELSEL GOTO -DISPLAYMSG
-RUN
-ERRORMSG
-HTMLFORM BEGIN


ERROR Message
-HTMLFORM END
-EXIT
-DISPLAYMSG
-HTMLFORM BEGIN


Your Message where Count Greater than 0
-HTMLFORM END
-EXIT

Hope this will help


WF 7.7.0.3HF3 / WinXP- WF-Client & Apache / DevStd 7.7.0.3HF3 win XP.
 
Posts: 118 | Registered: February 08, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders