Conversion Automation
Automation will definitely facilitate the conversion, the manual work after the process will be significantly reduced.
Delivering you an intelligent and high quality result in due time!
Do you need to convert your Informix 4GL application to Microsoft T-SQL? In this case, Ispirer products will be the perfect solution for your project!
Human-written code in each project has its own specifics. It may seem difficult to obtain a high level of automated conversion. With Ispirer it will be a smooth transition. The main advantage of Ispirer Toolkit is the personalization for your conversion project. As a result, you will replace the old technology with all its downsides. The outcome will be a new application without any middleware used afterwards.
Automated conversion of Informix 4GL to Microsoft T-SQL with the help of our tool makes it possible to significantly reduce the time and expenses as compared to manual rewriting of the application. The following approach allows to ensure high quality of automated conversion:
Our experienced team can provide you with a turnkey migration service and convert your entire Informix 4GL application to Microsoft T-SQL, delivering you a ready-to-use application in due time. Our responsibilities include not only professional analysis, assessment, performance and testing of your migration, but also services such as adding new or changing existing functionality of the application.
If you want to get an intermediate result of the converted Informix 4GL code in the Microsoft T-SQL language, the Ispirer team will be glad to provide you with a basic migration service. As a result, you will get code that is optimized to the compilable level. Further, you will have to independently bring the application to a fully functional state in accordance with your requirements.
You are free to choose a preferred option. Nevertheless, we can provide an estimate of both the Tool and the Service, and give professional advice.
function sample_func(s_char) #-------------------# define s_char char(100), i smallint, j smallint, r_char char(100) let r_char = " " for i = 1 to 100 if (s_char[i,i] = " ") then continue for else let r_char = s_char[i,100] exit for end if end for return r_char end function
FUNCTION sample_func(@s_char CHAR(2000)) ---------------------# RETURNS CHAR(2000) BEGIN DECLARE @i INT = 0 DECLARE @j INT = 0 DECLARE @r_char CHAR(100) = ' ' DECLARE @SWR_i INT SET @r_char = SUBSTRB(' ',1,100) SET @SWR_i = 1 while (@SWR_i <= 100) begin SET @i = @SWR_i if(SUBSTRB(@s_char,@i,1)) continue else begin SET @r_char = SUBSTRB(SUBSTRB(@s_char,@i,101 -@i),1,100) BREAK end SET @SWR_i = @SWR_i+1 end return @r_char end
#Single line comments { Multiline comments }
--Single line comments /* Multiline comments */
Informix 4GL type | Microsoft T-SQL data type |
---|---|
char(length) | CHAR(length) |
smallint | INT |
integer | INT |
date | DATETIME |
decimal(n,m) | DECIMAL(n,m) |
define c0 record like ctl_f0.*
Declare @c0 Table (ctl_f0_id INT, ctl_f0_name VARCHAR(100), ctl_f0_description VARCHAR(1000))
Informix 4GL type | Microsoft T-SQL data type | |
---|---|---|
Ascii function | let a = ascii 223 | SET a = CHAR(223) |
Clipped function | let a = b clipped | SET a = RTRIM(b) |
Date function | let a = date(b) | SET a = CONVERT(DATETIME, b) |
Day function | let a = day(b) | SET a = DATEPART(DAY, b) |
Mdy function | let a = mdy(b,c,d) | SET a = CONVERT(DATETIME,STR(b) + '-' + STR(c) + '-' + STR(d)) |
Month function | let a = month(b) | SET a = month(b) |
Upshift function | let a = upshift(b) | SET a = UPPER(b) |
Using function | let a = b using "######&" | SET a = STR(b,[’9999990’]) |
Year function | let a = year(b) | SET a = year(b) |
Concat expression | let a = b, “cd”,d | SET a = b + [“cd”] + d |
Mod expression | let a = b mod 2 | SET a = b%2 |
Substring expression | let a = b[2,2] | SET a = substr(b,2,1) |
True/False expression | let a = true let a = false | SET a = true SET a = false |
Matches predicate | if (n not matches "[0123456789]") then | if (not regexp_like(n,'[0123456789]')) then |
For example,
For range loop
for i = 1 to 10 … end for
SET @i = 1 while (@i <= 10) begin … SET @i = @i+1 end
Case statement
case a when 1 … when 2 … otherwise … end case
IF @a = 1 … ELSE IF @a = 2 … ELSE … END
Declare cursor
declare cur_n0 cursor for select n0_ch from nkin_a where (n0_kau_no = s_kau_no) and (n0_cd = s_cd)
DECLARE CUR_N0 cursor FOR select n0_ch from nkin_a where (n0_kau_no = s_kau_no) and (n0_cd = s_cd)
Along with converting Informix 4GL to SQL Server Transact-SQL, Ispirer solutions can automate the entire migration of your Informix database objects, including tables, data, as well as SQL business logic, to any other technology. As a result, you get a fully functioning database system. Choosing Ispirer's comprehensive migration solution, you will be able to eliminate most of associated risks and considerably reduce internal efforts. Click here to learn more about Informix migration.
Informix 4GL code to Microsoft T-SQL Conversion
function sample_func(s_char) #-------------------# define s_char char(100), i smallint, j smallint, r_char char(100) let r_char = " " for i = 1 to 100 if (s_char[i,i] = " ") then continue for else let r_char = s_char[i,100] exit for end if end for return r_char end function
FUNCTION sample_func(@s_char CHAR(2000)) ---------------------# RETURNS CHAR(2000) BEGIN DECLARE @i INT = 0 DECLARE @j INT = 0 DECLARE @r_char CHAR(100) = ' ' DECLARE @SWR_i INT SET @r_char = SUBSTRB(' ',1,100) SET @SWR_i = 1 while (@SWR_i <= 100) begin SET @i = @SWR_i if(SUBSTRB(@s_char,@i,1)) continue else begin SET @r_char = SUBSTRB(SUBSTRB(@s_char,@i,101 -@i),1,100) BREAK end SET @SWR_i = @SWR_i+1 end return @r_char end
#Single line comments { Multiline comments }
--Single line comments /* Multiline comments */
Informix 4GL type | Microsoft T-SQL data type |
---|---|
char(length) | CHAR(length) |
smallint | INT |
integer | INT |
date | DATETIME |
decimal(n,m) | DECIMAL(n,m) |
define c0 record like ctl_f0.*
Declare @c0 Table (ctl_f0_id INT, ctl_f0_name VARCHAR(100), ctl_f0_description VARCHAR(1000))
Informix 4GL type | Microsoft T-SQL data type | |
---|---|---|
Ascii function | let a = ascii 223 | SET a = CHAR(223) |
Clipped function | let a = b clipped | SET a = RTRIM(b) |
Date function | let a = date(b) | SET a = CONVERT(DATETIME, b) |
Day function | let a = day(b) | SET a = DATEPART(DAY, b) |
Mdy function | let a = mdy(b,c,d) | SET a = CONVERT(DATETIME,STR(b) + '-' + STR(c) + '-' + STR(d)) |
Month function | let a = month(b) | SET a = month(b) |
Upshift function | let a = upshift(b) | SET a = UPPER(b) |
Using function | let a = b using "######&" | SET a = STR(b,[’9999990’]) |
Year function | let a = year(b) | SET a = year(b) |
Concat expression | let a = b, “cd”,d | SET a = b + [“cd”] + d |
Mod expression | let a = b mod 2 | SET a = b%2 |
Substring expression | let a = b[2,2] | SET a = substr(b,2,1) |
True/False expression | let a = true let a = false | SET a = true SET a = false |
Matches predicate | if (n not matches "[0123456789]") then | if (not regexp_like(n,'[0123456789]')) then |
For example,
For range loop
for i = 1 to 10 … end for
SET @i = 1 while (@i <= 10) begin … SET @i = @i+1 end
Case statement
case a when 1 … when 2 … otherwise … end case
IF @a = 1 … ELSE IF @a = 2 … ELSE … END
Declare cursor
declare cur_n0 cursor for select n0_ch from nkin_a where (n0_kau_no = s_kau_no) and (n0_cd = s_cd)
DECLARE CUR_N0 cursor FOR select n0_ch from nkin_a where (n0_kau_no = s_kau_no) and (n0_cd = s_cd)