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 am writing a report for my business which uses a connection to a Postgres database (a view) and displays the results out. It uses an SQLOUT file. Now, I have placed the following code right after the query is pulled out from postgre so I can see the data types and the length of columns
Now, I want to change the data type for business_id so use a compute statement to convert it from an I11 to an A11. Now, how and where can I place the ?FF SQLOUT to see these changes. These are for my testing purposes as I will have to carry out data conversions.
My Code is executed as follows (please note: the initial like of ?FF SQLOUT is commented out as this is the first time when I want to see the data types.) The one placed at the end AFTER the COMPUTE returns an error
CODE
-DEFAULT &VIEW_NAME = 'business_test'; SET EMPTYREPORT=ON ENGINE SQLPSTGR SET DEFAULT_CONNECTION reports ENGINE SQLPSTGR SET VARCHAR OFF SQL SQLPSTGR PREPARE SQLOUT FOR
SELECT * FROM &VIEW_NAME limit 30; END -RUN -*?FF SQLOUT -*-EXIT
TABLE FILE SQLOUT PRINT COMPUTE ID2/A11 = TRIM('B',FPRINT(business_id, 'I11', 'A11'), 11, ' ', 1, 'A11'); AS 'Businessid' name address state voice_telephone email
?FF SQLOUT -EXIT
ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML END
Note that I have placed the ?FF SQLOUT after the query has been manipulated. The error is (FOC003) THE FIELDNAME IS NOT RECOGNIZED: SET BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
Any help on this? Thanks,This message has been edited. Last edited by: touch,
You're putting a ?FF command before the END statement of a TABLE command - no good.
?FF is a command that provides info on the columns in a Master, be it a HOLD file or not. In your case it's a HOLD file called SQLOUT. The COMPUTE operates on the HOLD file - having a second ?FF SQLOUT statement in the correct place will not provide new info. You need to add ON TABLE HOLD AS hold-file-name to the TABLE FILE SQLOUT command and then do a ?FF hold-file-name after the END statement.
But you can easily predict that ID2 is A11.
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
Did you ever consider the use of a master file against the sqlview? It would give you much more flexibility, you can do the field descriptions and computes in the master and from that point all the reporting can be done in against that master file instead against the SQL script
Frank
prod: WF 7.6.10 platform Windows, databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7 test: WF 7.6.10 on the same platform and databases,IE7
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006