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  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL Report running forever
Page 1 2 

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] SQL Report running forever
 Login/Join
 
Gold member
posted Hide Post
What happens if you separate your query step from the reporting step? That is, put the results of the query in a hold file, then report on the hold file. I modified your code below to do it that way.

It also might help with debugging. You can determine if the issue is with the query step or the template step.

-* File: IBFS:/Dev/WFC/Repository/TonyTest/WrvusDeptDivProv/Report2.fex Created by WebFOCUS AppStudio
SET WEBARCHIVE=ON
ENGINE DB2 SET DEFAULT_CONNECTION UABHS
SQL
SELECT
	'Visit Encounters' AS DEPTID,
	PSTPDFY,
	POSTPERIOD,
	FYMTH,
	RPTPERIOD.FYFM,
	DEPARTMENT.DEPTNUM,
	DEPARTMENT.DEPTDESC,
	DIVNUM,
	DIVDESC,
	DEPARTMENT_1.DEPTDESC AS LOCCAT2,
	PROVNUM,
	PROVNAME,
	CPTCODE,
	SUM( QTY ) AS "SumWrvu"
FROM
	WAREFOCUS.RPTPERIOD RPTPERIOD,
	WAREFOCUS.RVUSUMMARY RVUSUMMARY,
	WAREHOUSE.DEPARTMENT DEPARTMENT,
	WAREHOUSE.DIVISIONS DIVISIONS,
	WAREHOUSE.PROVIDERS PROVIDERS,
	WAREHOUSE.LOCATIONS LOCATIONS,
	WAREHOUSE.DEPARTMENT DEPARTMENT_1
WHERE
	RPTPERIOD.VPOSTPER >= RVUSUMMARY.POSTPERIOD
	AND RVUSUMMARY.DEPARTMENT = DEPARTMENT.DEPTNUM
	AND RVUSUMMARY.DIVISION = DIVISIONS.DIVNUM
	AND RVUSUMMARY.BILPROV = PROVIDERS.PROVNUM
	AND RVUSUMMARY.LOCATION = LOCATIONS.LOCNUM
	AND LOCATIONS.LOCCAT2 = DEPARTMENT_1.DEPTNUM
	AND ( MSOGRPNUM IN( 3 )
	AND PSTPDFY >= 2015
	AND CPTCODE BETWEEN '99400' AND '99499')

GROUP BY
	PSTPDFY,
	POSTPERIOD,
	FYMTH,
	RPTPERIOD.FYFM,
	DEPARTMENT.DEPTNUM,
	DEPARTMENT.DEPTDESC,
	DIVNUM,
	DIVDESC,
	DEPARTMENT_1.DEPTDESC,
	PROVNUM,
	PROVNAME,
	CPTCODE
;
TABLE
ON TABLE HOLD AS PONDOG
END
-RUN

TABLE FILE PONDOG
PRINT
     DEPTID AS 'Metric'
     PSTPDFY AS 'FY'
     POSTPERIOD AS 'POST PERIOD'
     FYMTH AS 'Post Month'
     FYFM AS 'FY Period'
     DEPTNUM AS 'Dpt#'
     DEPTDESC AS 'Department'
     DIVNUM AS 'Div#'
     DIVDESC AS 'Division'
     LOCCAT2 AS 'Location Category'
     PROVNUM AS 'Prv#'
     PROVNAME AS 'Provider Name'
     CPTCODE AS 'CPT'
     SumWrvu AS 'Amt'
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET ASNAMES ON
ON TABLE NOTOTAL
ON TABLE HOLD FORMAT XLSX TEMPLATE 'wrvuS_bydept_div_prov.xltm' SHEETNUMBER 2
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     INCLUDE = IBFS:/EDA/EDASERVE/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Report This Post
Platinum Member
posted Hide Post
Hey JRLewis,
I've gone back and made the advised code adjustments and received the following error:
 alponder
 (FOC14152) COLUMN NUMBER 6 (DEPARTMENT.DEPTNUM) IS AN AMBIGUOUS REFERENCE
 (FOC14152) COLUMN NUMBER 7 (DEPARTMENT.DEPTDESC) IS AN AMBIGUOUS REFERENCE
 (FOC14152) COLUMN NUMBER 11 (PROVNUM) IS AN AMBIGUOUS REFERENCE
 (FOC14152) COLUMN NUMBER 12 (PROVNAME) IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED DEPARTMENT.DEPTNUM IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED PROVIDERS.PROVNUM IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED LOCATIONS.LOCNUM IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED LOCATIONS.LOCCAT2 IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED PROVNAME IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED PROVNUM IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED DEPARTMENT.DEPTDESC IS AN AMBIGUOUS REFERENCE
 (FOC14012) THE COLUMN NAMED DEPARTMENT.DEPTNUM IS AN AMBIGUOUS REFERENCE
 0 ERROR AT OR NEAR LINE    160  IN PROCEDURE ADHOCRQ FOCEXEC *
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: PONDOG
 BYPASSING TO END OF COMMAND
  


I'll go back and see if I can get it to run with just one SQL query and work my way back to using all three. Thanks for providing another possibility.

As a note; I contacted my local tech manager and he said to open up a case, so I did. I'll keep you posted.

Pondog


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015Report This Post
Platinum Member
posted Hide Post
Resolution:

After opening a case we were able to resolve the issue by placing the following in the fex;

SET EXCELSERVURL=''
-RUN   


We initially had it in the code but didn't have the "-RUN" command.

I also did some research to figure out how to make the range in my pivot table templates dynamic. Over all a pretty good learning experience.


WebFOCUS 8.1.05
Windows, All Outputs
 
Posts: 116 | Location: Birmingham, Al | Registered: July 23, 2015Report This Post
  Powered by Social Strata Page 1 2  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] SQL Report running forever

Copyright © 1996-2020 Information Builders