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.
We are migrating from DB2 database to SQL Server, actually to Azure SQL through MSODBC adapter. An issue we are facing is that our sql passthru behaves differently in column names. Often our sql passthru is written in lower case, like
SQL DB2
select column1 from table1
;
TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS HOLD000
END
-RUN
With DB2 passthru we could afterwards give an uppercase TABLE request:
TABLE FILE HOLD000
PRINT COLUMN1
END
Changing it to MSODBC it now gives error (FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: COLUMN1
If I change it to lowercase column1 it works. It would be quite a work changing the sql passthru everywhere to uppercase, so I wondered is there somewhere an adapter setting to arrange that it returns upper case column names, or at least as an alias? Or would someone have a different (easy) solution
Martin.This message has been edited. Last edited by: FP Mod Chuck,
WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
For DB2 the ?FF HOLD000 gives: FILENAME= HOLD000 COLUMN1 E01 A20
For MSODBC the ?FF HOLD000 gives: FILENAME= HOLD000 column1 E01 A20
I think I also know the reason. It does not have to do with WebFocus and adapter settings. But DB2 is not case sensitive (at least not our installation) and in SQL Server we do use a case sensitive collation. And especially in migrating our database views, which are mainly defined in lower case create view scripts, SQL server has created column names in lower cases, whereas DB2 had made them uppercase column names.
Nevertheless is there some setting I can tell WebFocus or the MSODBC adapter that with sql passthru it should Always return upper case field names?
WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
Yeah I just tested it in SQL Server and the default is to create the hold master files with mixed case column names. I don't see any settings in the adapter manual that'll let you change that. Is creating the SQL Server tables with uppercase column names an option? I know that's a crazy question but if this is a migration from one system to another, then wouldn't it be reasonable to have identical DDLs for all the SQL tables in the target platform so you don't have to remediate all the code?
WebFOCUS 8206, Unix, Windows
Posts: 1853 | Location: New York City | Registered: December 30, 2015
I haven't tested this but maybe you could work around the problem using SET ASNAME. Check out the doc for the behaviors you can get out of it. Might be worth a test.
Originally posted by Martin vK: in SQL Server we do use a case sensitive collation.
Apparently, in SQL server, identifier case sensitivity is an optional server feature and this can be queried. Possibly, the WF adapter uses that information to decide how to behave.
If possible, test what happens if you turn off SQL server's case sensitivity.
quote:
SQL server has created column names in lower cases, whereas DB2 had made them uppercase column names.
That's not entirely accurate. DB2 column names are case insensitive. They "fold" to upper case when presented, but you can address them in any case, upper, lower or mixed.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
I can not change the case sensitivity in SQL Server, that is not my decision, I have to live with that.
We did find a way to get around it, preventing we have to change all our sql passthru. We made following standard routine to add define's in upper case.
-DEFAULTH &SQLOUT_HOLDFILE = 'HOLD000';
CHECK FILE &SQLOUT_HOLDFILE HOLD AS TEMPHOLD
FILEDEF INCLUDE_DEFINE DISK include_define.fex (APPEND
-RUN
-WRITE INCLUDE_DEFINE DEFINE FILE &SQLOUT_HOLDFILE ADD
TABLE FILE TEMPHOLD
PRINT
COMPUTE LINE/A1200 = UPPER(FIELDNAME) || '/' || FORMAT || '=' || FIELDNAME || ';' ;
ON TABLE HOLD AS INCLUDE_DEFINE FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
-WRITE INCLUDE_DEFINE END
-RUN
-INCLUDE include_define
We can include this fex where we need it.
WebFocus 8206M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster