Informix 4GL to Microsoft SQL Server T-SQL Conversion

SQL Server

Migrate from Informix 4GL to Microsoft SQL Server T-SQL with the help of our Ispirer Migration and Modernization Toolkit! It supports Informix 4GL to Microsoft SQL Server T-SQL conversion of any complexity and can be easily customized according to the particular requirements of any migration project.

Why Ispirer MnMTK 2017 for Informix 4GL to MS SQL Server T-SQL Conversion?

The main purpose of Ispirer Systems is to carry out a high-grade and top-of-the-line database migration. We personalize our migration tool Ispirer MnMTK in such a way that a customized version can fully satisfy a client's business requirements.

Our main advantages:

  • High quality and experience technical support: our technical team has a tremendous experience in migration projects of different levels of complexity.
  • Customer-oriented approach and Fast Customization: we personalize our migration tool in such a way that a customized version can fully satisfy our client’s business needs, custom conversions and optimizations are made within 1-2 business days;
  • Pre-Sales Engagement: we demonstrate a full conversion during the evaluation before you make a decision.
  • Flexible pricing: we can offer you a wide range of options, among which you will definitely find the one which suits you;
  • Optimized Conversion: after the conversion you get an intelligent and maintainable code, without using any Ispirer's middleware.

Assessment Process

The assessment of your migration project could definitely help to weigh up efforts and the approximate cost of your migration. In order to facilitate the process, you're welcome to fill in our:

Estimate Now!

Ispirer Migration Solution

Informix 4GL to MS SQL Server

Conversion Features

Informix database to Microsoft SQL Server database:

  • Tables and Data
    • Converts columns definitions - data types, default values, NOT NULL constraints
    • Converts integrity constraints - primary and foreign keys, unique and check constraints
    • Converts comments
    • Resolves reserved words and identifiers conflicts
    • Transfers data
  • Indexes and Views
  • Stored Procedures, Functions and Triggers
    • Converts overloaded procedures and functions
    • Converts global variables
    • Converts Informix OUTER JOIN syntax
    • Converts exceptions processing
    • Converts dynamic SQL

Informix 4GL code to Microsoft T-SQL Conversion

  • Converts Informix 4GL functions (*.4gl) to T-SQL functions/procedures (*.sql)
Informix 4GLMicrosoft SQL Server T-SQL
  1. function sample_func(s_char)
  2. #-------------------#
  3. define
  4. s_char char(100),
  5. i smallint,
  6. j smallint,
  7. r_char char(100)
  8.  
  9. let r_char = " "
  10.  
  11. for i = 1 to 100
  12. if (s_char[i,i] = " ") then
  13. continue for
  14. else
  15. let r_char = s_char[i,100]
  16. exit for
  17. end if
  18. end for
  19.  
  20. return r_char
  21.  
  22. end function
  1. FUNCTION sample_func(@s_char CHAR(2000))
  2. ---------------------#
  3. RETURNS CHAR(2000)
  4. BEGIN
  5. DECLARE @i INT = 0
  6. DECLARE @j INT = 0
  7. DECLARE @r_char CHAR(100) = ' '
  8. DECLARE @SWR_i INT
  9. SET @r_char = SUBSTRB(' ',1,100)
  10. SET @SWR_i = 1
  11. while (@SWR_i <= 100)
  12. BEGIN
  13. SET @i = @SWR_i
  14. IF(SUBSTRB(@s_char,@i,1))
  15. continue
  16. ELSE
  17. BEGIN
  18. SET @r_char = SUBSTRB(SUBSTRB(@s_char,@i,101 -@i),1,100)
  19. BREAK
  20. END
  21. SET @SWR_i = @SWR_i+1
  22. END
  23. RETURN @r_char
  24. END
  • Converts comments:
Informix 4GLMicrosoft SQL Server T-SQL
  1.  
  2. #Single line comments
  3.  
  4. {
  5. Multiline comments
  6. }
  7.  
  1.  
  2. --Single line comments
  3.  
  4. /*
  5.   Multiline comments
  6.   */
  7.  
  • Convert data types
Informix 4GL typeMicrosoft T-SQL data type
char(length)CHAR(length)
smallintINT
integerINT
dateDATETIME
decimal(n,m)DECIMAL(n,m)

  • Converts records to table type variables
Informix 4GLMicrosoft SQL Server T-SQL
  1.  
  2. define c0 record like ctl_f0.*
  3.  
  1.  
  2. DECLARE @c0 TABLE (ctl_f0_id INT, ctl_f0_name VARCHAR(100), ctl_f0_description VARCHAR(1000))
  3.  
  • Converts built-in functions, expressions and predicates
Informix 4GL typeMicrosoft T-SQL data type
Ascii functionlet a = ascii 223SET a = CHAR(223)
Clipped functionlet a = b clippedSET a = RTRIM(b)
Date functionlet a = date(b)SET a = CONVERT(DATETIME, b)
Day functionlet a = day(b)SET a = DATEPART(DAY, b)
Mdy functionlet a = mdy(b,c,d)SET a = CONVERT(DATETIME,STR(b) + '-' + STR(c) + '-' + STR(d))
Month functionlet a = month(b)SET a = month(b)
Upshift functionlet a = upshift(b)SET a = UPPER(b)
Using functionlet a = b using "######&"SET a = STR(b,[’9999990’])
Year functionlet a = year(b)SET a = year(b)
Concat expressionlet a = b, “cd”,dSET a = b + [“cd”] + d
Mod expressionlet a = b mod 2SET a = b%2
Substring expressionlet a = b[2,2]SET a = substr(b,2,1)
True/False expressionlet a = true
let a = false
SET a = true
SET a = false
Matches predicateif (n not matches "[0123456789]") thenif (not regexp_like(n,'[0123456789]')) then

  • Converts statements of business logic

For example,

For range loop

Informix 4GLMicrosoft SQL Server T-SQL
  1. for i = 1 to 10
  2. end for
  3.  
  4.  
  5.  
  1. SET @i = 1
  2. while (@i <= 10)
  3. BEGIN
  4. SET @i = @i+1
  5. END

Case statement

Informix 4GLMicrosoft SQL Server T-SQL
  1. case a
  2. when 1
  3. when 2
  4. otherwise
  5. end case
  1. IF @a = 1
  2. ELSE IF @a = 2
  3. ELSE
  4. END
  5.  

Declare cursor

Informix 4GLMicrosoft SQL Server T-SQL
  1. declare cur_n0 cursor for
  2. select n0_ch from nkin_a
  3. where (n0_kau_no = s_kau_no)
  4. and (n0_cd = s_cd)
  1. DECLARE CUR_N0 cursor FOR SELECT n0_ch FROM nkin_a
  2. WHERE (n0_kau_no = s_kau_no)
  3. AND (n0_cd = s_cd)
  4.  

Get in touch with us!

Have questions about migration from Informix 4GL to MS SQL Server?

Contact us