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.
one thing i expected to have automatically with Dev Studio was automatic syntax checking on all code syntax.
There are currently lines of code you can enter that won't be checked for syntax and therefore if mistyped can produce the wrong result.
The code I'm referring to is:
ENGINE SQLORA SET DEFAULT CONNECTION ....
I had mistyped 'connection' but instead of informing me of this it used the existing default connection. The point of declaring a new default connection is to override the existing default so i would expect syntax checking to be carried out on this line of code, so for a while i was scratching my head as rtoi why i wasn't getting the right data.
has anyone experienced this? or got any opinion on whether this should be fixed or not?
im just checking that 765 has the same problem...
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
Posts: 285 | Location: UK | Registered: October 26, 2007
Syntax checking is done at run time. To ensure that the program does not continue to run despite errors, I always add the following (or a variation of) after every complete command:
Thanks for your reply i will definitely have to start utilising my own error checking to catch this, also thanks for the xretrieval code- very very useful!!!
do you think then that this line shouldn't be included in any WF syntax checking as its parsed? it seemed odd to me that it has been set up to ignore checking these statements but thats not to say there isn't a good reason for it....
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
Posts: 285 | Location: UK | Registered: October 26, 2007
The line is most likely not ignored - I'm sure you get an error if the syntax is wrong. What will happen though, is that the program will continue running the rest of the code, unless you trap the error.
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
(FOC1400) SQLCODE IS 195 (HEX: 000000C3) XOPEN: 42000
: Microsoft OLE DB Provider for SQL Server: [42000] 'CONNNECTION_ATTRIBUTES' is not a recognized SET statement.
(FOC1414) EXECUTE IMMEDIATE ERROR.
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
The line is most likely not ignored - I'm sure you get an error if the syntax is wrong
Francis hit the target on this one- WF is always going to try to complete the code as much as possible. Sometimes the error it gives are warnings like PRINTPLUS DISABLED, but still continues to process if it is able. If you -SET &ECHO=ALL; you would see the error message you are looking for, but it doesn't stop WF from trying to complete the stacked code. I've had instances where DEFINE syntax was incorrect, but I hadn't used that field yet in the table request, so I can see the error, but my code still completes. If I add the incorrectly defined field to the table request, the code crashes and the errors become obvious.
Part of my testing ALWAYS includes a complete review of the processed code using the ECHO command or the Message Viewer (although I've found that the DS Message Viewer sometimes leaves out code - especially when fields are inserted into HEADING, SUBHEADING, FOOTING, SUBFOOT, etc.)
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
I've discovered, through experimentation, that DEFINEs are ignored unless the DEFINEd column is actually mentioned as a PRINT/SUM column. WF is interpreted and compiled dynamically 'on the fly'. It's efficient to not process unmentioned definitions. Similarly, I suspect simple syntax errors in *.mas are ignored unless the field is actually used in the *.fex.
Chris
WIN/2K running WF 7.6.4 Development via DevStudio 7.6.4, MRE, TextEditor. Data is Oracle, MS-SQL.
Posts: 154 | Location: NY | Registered: October 27, 2005
The line is most likely not ignored - I'm sure you get an error if the syntax is wrong. What will happen though, is that the program will continue running the rest of the code, unless you trap the error.
Francis
The line i used that didn't get picked up was
default_connetcion instead of default_connection, rather than throwing upo an error it used the existing default and gave me the wrong (or right, depending on how you look at it) data.
must test this with 765
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
Posts: 285 | Location: UK | Registered: October 26, 2007
The line is most likely not ignored - I'm sure you get an error if the syntax is wrong
Francis hit the target on this one- WF is always going to try to complete the code as much as possible. Sometimes the error it gives are warnings like PRINTPLUS DISABLED, but still continues to process if it is able. If you -SET &ECHO=ALL; you would see the error message you are looking for, but it doesn't stop WF from trying to complete the stacked code. I've had instances where DEFINE syntax was incorrect, but I hadn't used that field yet in the table request, so I can see the error, but my code still completes. If I add the incorrectly defined field to the table request, the code crashes and the errors become obvious.
Part of my testing ALWAYS includes a complete review of the processed code using the ECHO command or the Message Viewer (although I've found that the DS Message Viewer sometimes leaves out code - especially when fields are inserted into HEADING, SUBHEADING, FOOTING, SUBFOOT, etc.)
i think using francis' idea is what ill have to use as spotting a one letter typo is sometimes hard with pages of code, using my own syntax check to make sure WF is reading my code properly should give me back the functionality i require...
cheers all
Developer Studio 7.64 Win XP Output: mostly HTML, also Excel and PDF
"Never attribute to malice that which can be adequately explained by stupidity." - Heinlein's Razor
Posts: 285 | Location: UK | Registered: October 26, 2007
As in many languages, there are several levels of errors such as warning and critical to name but two. Generally warnings will allow processing to continue with messages or error codes set (i.e. FOC401), where as critical errors would cause the processing to be stopped immediately (i.e. FOC205).
I'm sure that Leah and Ginny ? could recount how, on mainframes, and using languages such as Cobol, program runs had an acceptable error code value, beyond which the process would be aborted.
I would hazard a guess, from what you've mentioned, that you have a "standard" default connection set in the server profile or somewhere. Therefore I would envisage that because a default connection is in force, your coded one would have just been ignored (with an error code set somewhere?) and processing would have been allowed to progress? Francis' error checking is based upon events such as this.
I know that the trend nowadays is to skimp on the error vetting code within programs but the base language will only be written to do internal error checking, to establish if processing should continue or not depending upon whether all required configuration etc. is available.
I know that I am guilty of not always using error checking, but hopefully I include it where absolutely necessary
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Yes, Tony, you are correct. COBOL compilers always gave 3 types of messages, W for warning, C for caution, and E for error. If you had E's, the program couldn't be linked so there was no executable. One strove for only W's.
As for Nubi's problem, if there is an error in a connect string as he states, often the error shows up somewhere later in the program. For instance, if the program was creating a hold file for further reporting and the initial query failed because of the connect string error, you would get a file not found on the hold file and the program would fail. It sometimes takes a little detective work to figure out what the 'real' error is.