;*********************************************************************** ;Licensed Materials - Property of IBM ; ;BI and PM: UDA ; ;(C) Copyright IBM Corp. 2005, 2020 ; ;U.S. Government Users Restricted Rights - Use, duplication, or disclosure ;by GSA ADP Schedule Contract with IBM Corp. ; ;Unless specifically authorized by IBM, you may not modify any part of this ;file. Where modification is authorized, you must reproduce any copyright ;notices contained in this file and specifically identify which ;modifications have been made by your organization. YOU ARE SOLELY ;RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF ANY MODIFICATIONS TO ;THIS FILE AND ASSUME ALL RISKS ASSOCIATED WITH THE USE AND DISTRIBUTION ;OF THE MODIFIED FILE. IBM will not provide support relating to ;unauthorized changes you make to this file. ;*********************************************************************** ; $Header: //uda/main/prod/dmd/sgi/odbc35/generic_od/cogdmod_sy.ini#3 $ ; ; Module: ; cogdmsy.ini ; ; Purpose: ; This module contains the Sybase gateway information. ; ; Notes: ; Do NOT modify this file. Doing so could result in unknown behavior ; by the Sybase gateway, possibly resulting in application aborts. ; ; ************************************************************************ [Expression Results] ; ; Operations supported and results of the supported operation. ; The format is; ; [Operator ] ; =,{;,} ; ; where ; ; LHS = data type of left hand side of operation ; RHS = data type of right hand side of operation ; RES = result data type of operation ; ; LHS, RHS and RES values may be one of: ; ; Name Abbreviation DMS Data Type ; CHAR CH sqlChar ; VARCHAR VC sqlVarChar ; LVARCHAR LC sqlLongVarChar ; BINARY BN sqlBinary ; VARBINARY VB sqlVarBinary ; SMALLINT SM sqlSmallInt ; INTEGER IT sqlInteger ; QUAD QD sqlQuad ; DECIMAL DM sqlDecimal ; FLOAT FL sqlFloat ; DOUBLE DB sqlDouble ; DATE DT sqlDate ; TIME TM sqlTime ; TIMESTAMP TS sqlDateTime ; INTERVAL IV sqlInterval ; ---- NA sqlUnknownType ; [Operator Addition] Date= Time= Timestamp= Interval= [Operator Subtraction] Date= Time= Timestamp= Interval= [Operator Comparison] Date=DT,OK:TS,OK Timestamp=DT,OK:TS,OK [Exceptions Commands] Call="call " [Exceptions Clauses] [Exceptions Tables] Simple=T Derived=F Joined=F [Exceptions Tables Database:IQ Version:11.5] Derived=F [Exceptions Joins] Cross= Inner= Left_Outer=T Right_Outer=T Full_Outer= Nested_Outer=T Inner_Tbl_Restrict=T Outer_Syntax=F Optnl_Tbl_Restrict=T Outer_Tbl_List=F Left_Pre="" Left_Eql=" *= " Left_Post="" Right_Pre="" Right_Eql=" =* " Right_Post="" Left_Nested=T Right_Nested=T Optnl_Tbl_Join_Restrict=T Two_Sided_Join_Restrict=F Optnl_Tbl_Join_Filter=T Optnl_Tbl_Filter=F Full_Non_Equi_Join=F On_Condition_Set_Functions=F On_Condition_Subqueries=F On_Condition_Not_Predicate=T On_Condition_In_Predicate=T On_Condition_Between_Predicate=T On_Condition_Like_Predicate=T On_Condition_IsNull_Predicate=T Full_Syntax= Cross_Syntax= Union_Syntax= Inner_Syntax= Natural_Syntax= Full_Pre= Full_Post= Prsrv_Tbl_Join_Filter=F [Exceptions Joins Database:SY Version:12.0.0] Inner=T Inner_Syntax=" INNER JOIN " Inner_Tbl_Restrict=F Left_Eql=" LEFT OUTER JOIN " Non_Equi_Joins=T Non_Join_Expr=T Non_Join_Non_Equi_Expr=T On_Condition_Subqueries=T Optnl_Tbl_Filter=T Optnl_Tbl_Join_Restrict=F Optnl_Tbl_Restrict=F Outer_Syntax=T Prsrv_Tbl_Filter=T Prsrv_Tbl_Join_Filter=T Right_Eql=" RIGHT OUTER JOIN " [Exceptions Predicates] All="all" ; Predicates Any and All are not supported ; by Adaptive Server IQ. Although, Any and All ; are sent to SQL Server or Adaptive Server Enterprise ; and might go through without any errors, the correct ; results can not be guaranteed. ( See Adaptive ; Server IQ Administration Guide, Section "Commands ; and Functions") ; Thus now these predicates are processed locally. [Exceptions Predicates Database:IQ] All= Any= Exists="exists" [Exceptions Aggregates] Max="max" Min="min" Avg="avg" Sum="sum" Count="count" Count_star="count(*)" [Exceptions Set Operators] Distinct="distinct" Union="union" Union_All=T Order_By_Limit="16" [Exceptions Set Operators Database:SY Version:11.9.1] Order_By_Limit="31" [Exceptions Set Operators Database:SY Version:11.9.2] Order_By_Limit="31" [Exceptions Set Operators Database:SY Version:11.9.3] Order_By_Limit="31" [Exceptions Set Operators Database:SY Version:12.0.0] Order_By_Limit="31" [Exceptions Operators] Neq=" <> " [Exceptions General] Nulls_Sort_Last=F Group_By_Expr=T Multiple_Distinct=T Subquery_Column_Alias=F Count_Non_Distinct=T Count_Value_Expr=T Count_Literal=T Count_Blob=F Like_Value_Expr=T Is_Null_Value_Expr=T Subquery_In_Group_By=F Subqueries=T [Exceptions General Database:IQ Version:11.5] Group_By_Expr=F Subquery_In_Case=F [Exceptions General Database:SY Version:11.0] Subqueries=F Correlated_Subqueries=F [Exceptions General Database:SY Version:11.5.0] Subqueries=F Correlated_Subqueries=F [Exceptions General Database:SY Version:11.9.1] Subqueries=F Correlated_Subqueries=F ; ; Commented down below entry because the problem is fixed in 11.9.2 EBF 8891. ; The Sybase bug number that causes the problem is 203089: A 'Group By' query ; with an 'IN' list and an 'ISNULL' clause within a 'Case' expression returns ; results as a Cartesian product. Trakker number is 266806. [Exceptions General Database:SY Version:11.9.2] ;Group_By_Expr=F [Exceptions Value Expressions] Case=T Coalesce=T Nullif=T Extract=C Position=C Char_Length=F Octet_length=C Bit_Length=F Substring=C Upper=T Lower=T Strcat=C Cast=F ; ; Extract=C, above, indicates that SQL'92 EXTRACT functionality is [partially] ; supported by the Sybase Gateway through the use of the following function maps. ; ; EXTRACT( YEAR FROM )' maps to coguda#extract_year( ). ; Extract_Year=coguda#extract_year Extract_Month=coguda#extract_month Extract_Day=coguda#extract_day Extract_Hours=coguda#extract_hour Extract_Minutes=coguda#extract_minute Extract_Seconds=coguda#extract_second [Exceptions Value Expressions Database:SY Version:11.0] Case=F Coalesce=F Nullif=F Extract=F [Exceptions Value Expressions Database:IQ Version:11.5] ;Although Case expression is supported by Sybase IQ 11.5 it is set to ;False because the usage of CASE has a number of limitations, for example it ;cannot be used in a GROUP BY or ORDER BY clause. ( For more explanation see ;Adaptive Server IQ Language Reference ). Case=F Coalesce=T Nullif=T Extract=F [Exceptions Literals] Date_Literal=F Interval_Literal=F Time_Literal=F Timestamp_Literal=C Timestamp_Format_Str="YYYY MM DD HH MM SS FF" Timestamp_Literal_Str="convert(datetime,'%s-%s-%s %s:%s:%s.%-.3s')" Date_Add_Function_Str="dateadd(day,?2,?1)" Date_Sub_Function_Str="datediff(day,?2,?1)" Alt_Timestamp_Literal_Str="'%s-%s-%s %s:%s:%s.%-.3s'" Alt_Date_Literal_Assignment=T Alt_Date_Literal_Between=T Alt_Date_Literal_Comparison=T Alt_Date_Literal_In=T Alt_Date_Literal_Insert_Value=T [Exceptions Misc] No_And_Parentheses=F [Exceptions Delimiters] ; ; Specifies the delimiter character for each name part. ; ; If a delimiter is set to nothing, then the database does not support the ; delimiting of that name part; otherwise, the specified string is used to ; delimit the corresponding name part. ; ; NOTE: if Wholename specified and not empty then this indicates that fully ; qualified names are delimited with this character; ; For example, ; "myCatalog.mySchema.myTable.myColumn" ; ; NOTE: for a double quote (") entry, specifies "\"". ; Catalog_Delimiter= Schema_Delimiter= Table_Delimiter= Column_Delimiter= Procedure_Delimiter= Wholename_Delimiter= [Exceptions Separators] ; ; Specifies the name separator that follows the type of name. ; [][][][] ; [][][] ; Catalog_Separator="." Schema_Separator="." Table_Separator="." ; ; Sybase functions equivalent to EE functions ; ; Ignore all type information associated with the following functions. ; They will be updated in future revisions. ; str function will returns by default 10 characters length. [Builtin Functions] n:cast_decimal(%1bcdints)=convert(decimal(31, 16),%1); n:cast_float(%1bcdints)=convert(float(48),%1); n:cast_real(%1bcdints)=convert(real,%1); n:cast_smallint(%1bcdints)=convert(smallint,%1); n:cast_integer(%1bcdints)=convert(integer,%1); s:cast_timestamp(%1bcdints)=convert(datetime,%1); c:cast_char(%1bcdints)=convert(char,%1); c:cast_varchar(%1bcdints)=convert(varchar,%1); n:octet_length(%1c)=datalength(%1); n:position(%1c,%2c)=charindex(%1,%2); n:power(%1n,%2n)=power(%1,%2); c:substring(%1c,%2n,%3n)=substring(%1,%2,%3); n:ceiling(%1n)=ceiling(%1); n:floor(%1n)=floor(%1); c:coguda#concat(%1c,%2c)=%1 + %2; c:coguda#concat(%1bdints,%2bdints)=%1 + %2; n:absolute(%1n)=abs(%1); c:concat(%1c,%2c)=%1 + %2; c:downshift(%1c)=lower(%1); n:index(%1c,%2c)=charindex(%2,%1); c:leftjustify(%1c)=ltrim(%1); n:octet_length(%1c)=datalength(%1); c:reverse(%1c)=reverse(%1); n:size(%1c)=datalength(%1); c:truncate(%1c)=rtrim(%1); c:upshift(%1c)=upper(%1); n:ascii(%1c)=ascii(%1); n:round(%1n,%2n)=round(%1,%2); ; ; Business Functions for Date Calculations ; ds:_add_days(%1ds,%2n)=DATEADD( DAY, %2, %1 ); ds:_add_months(%1ds,%2n)=DATEADD( MONTH, %2, %1 ); ds:_add_years(%1ds,%2n)=DATEADD( YEAR, %2, %1 ); n:_days_between(%1ds,%2ds)=DATEDIFF( DAY, %2, %1 ); n:_months_between(%1ds,%2ds)=DATEDIFF( MONTH, %2, %1 ); n:_years_between(%1ds,%2ds)=DATEDIFF( YEAR, %2, %1 ); n:_days_to_end_of_month(%1ds)=DATEDIFF( DAY, %1, DATEADD( DAY, -1, DATEADD( MONTH, 1, DATEADD( DAY, 1 - DATEPART( DAY, %1 ), %1 ) ) ) ); n:_age(%1ds)=; ds:_first_of_month(%1ds)=DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 ); ds:_last_of_month(%1ds)=DATEADD( DAY, -1, DATEADD( MONTH, 1, DATEADD( DAY, -DATEPART( DAY, %1 ) + 1, %1 ) ) ); s:_make_timestamp(%1n,%2n,%3n)=CONVERT( DATETIME, CONVERT( VARCHAR(8), ( %1 * 10000 ) + ( %2 * 100 ) + %3 ) ); n:_ymdint_between(%1ds,%2ds)=; n:_round(%1n,%2n)=ROUND(%1,%2); ; ; Functions required by EXTRACT. ; n:coguda#extract_year(%1ds)=DATEPART(YEAR, %1); n:coguda#extract_month(%1ds)=DATEPART(MONTH, %1); n:coguda#extract_day(%1ds)=DATEPART(DAY, %1); n:coguda#extract_hour(%1ds)=DATEPART(HOUR, %1); n:coguda#extract_minute(%1ds)=DATEPART(MINUTE, %1); n:coguda#extract_second(%1ds)=DATEPART(SECOND, %1); ; ; Ignore all type information associated with the following functions. ; They will be updated in future revisions. ; [Database Functions] ; ; ***************************************** ; Sybase specific character functions ; ***************************************** ; n:sy_ascii(%1c)=ascii(%1); c:sy_char(%1n)=char(%1); n:sy_char_length(%1c)=char_length(%1); c:sy_right(%1c,%2n)=right(%1,%2); c:sy_soundex(%1c)=soundex(%1); ; ; ***************************************** ; Sybase specific Numeric functions ; ***************************************** ; n:sy_rand(%1n)=rand(%1); n:sy_round(%1n,%2n)=round(%1,%2); ; ; ; Conversion ; ; SQL Server supports several type conversions. The ones listed ; below are the ones we are interested in: ; ; - number to char ; - datetime to char ; ; - char to number ; ; - char to datetime ; - number to datetime ; bcdints:convert(%1c,%2bcdints {,%3n})=convert(%1,%2 {,%3}); c:date_to_varchar(%1s)=date_to_varchar(%1); n:hextoint(%1c)=hextoint(%1); c:inttohex(%1n)=inttohex(%1); ; ; ***************************************** ; Sybase System functions ; ***************************************** ; n:db_id({%1c})=db_id({%1}); c:db_name({%1n})=db_name({%1}); n:host_id()=host_id(); c:host_name()=host_name(); cns:isnull(%1cns,%2cns)=isnull(%^1,%2); n:proc_role(%1c)=proc_role(%1); n:rowcnt(%1n)=rowcnt(%1); c:show_role()=show_role(); n:suser_id({%1c})=suser_id({%1}); c:suser_name({%1n})=suser_name({%1}); c:sy_user()=user; n:user_id({%1c})=user_id({%1}); c:user_name({%1n})=user_name({%1}); n:valid_name(%1c)=valid_name(%1); ; Function STRING works only when ; Adaptive Server IQ accessed ; through ODBC ( the ODBC gateway uses ; this file to read database information). [Database Functions Database:IQ] n:iq_truncate(%1n,%2n)=truncate(%1,%2); n:remainder(%1n,%2n)=remainder(%1,%2); n:similar(%1c,%2c)=similar(%1,%2); c:string(%1c *{,%2c})=string(%1 *{,%2}); [Misc] ; ; If there are no entries found for 'MAXDBPROCS' and 'INACTDBPROCS' ; then the value of 'MAXDBPROCS' and 'INACTDBPROCS' will be set ; to default values, which are 25 and 5, respectively. ; ;The 'MAXDBPROCS' entry indicates to DB-Library to set the maximum ;number of simultaneously open DBPROCESSes to the 'MAXDBPROCS' value. ; MAXDBPROCS=25 ; ;The 'INACTDPROCS' entry indicates to the Sybase SGI Gateway to ;mark the open DBPROCESS as 'inactive' to the maximum value given ;by 'INACTDBPROCS' value. DBPROCESS exceeds the 'maximum value' will ;be closed at 'close' time, unless it is necessary to keep the ;DBPROCESS alive for later use, for example at 'commit' time. ; INACTDBPROCS=5 ; ; The entry 'Convert Money To Decimal' is used to changed Sybase's money ; datatype to sqlDecimal precision 19 and scale 4. This entry by default ; is set to 0, only for application that can not handle quad datatype ; this entry can be changed to 1. This entry is only supported in the ; code of Sybase gateway from r94c version and up. Convert Money To Decimal=0 ; ; Optimizer hints to set in Attach time. ; ; This attribute can take values 0 ( server decides the join order ) ; or 1 ( joins are processed as in the query). 0 is the default. ;SQL_ATTRIB_DB_JOIN_ORDER=1 ; use this maximum worker threads. If doesn't exist, system default is used. ;SQL_ATTRIB_DB_DOP=1 ; Maximum length of aliases. MaximumNameLength=30 [UDA USER OPTIONS] Attach=