Cobol to java modernization Automated

Modernization Challenges – Db2 Syntaxes

A common occurrence in COBOL/DB2 programs is the coding of SQL SET assignment statement. This could be used for assigning Current Timestamp, Current Date/Time and doing various Date/Time arithmetic without coding a real SQL statement or coding complex logic in COBOL.

Some of the common SET statements we observe in customer programs include:

image-1726570348-1727416724

Some of the more complex SET statements we picked from customer programs include:

image-1726570358-1727416757

Other than the above functional SET assignments, we come across some applications that assign or refer to runtime DB2 Server, Package or Schema related information to influence the logic.

image-1726570368-1727416784

While modernizing such applications, customers assume that converting Static SQLs in COBOL to a Dynamic SQL in JDBC form will be enough for migration, but this is where the challenges lie. There is no SET statement mapping in JDBC. The above SET statements have to be parsed and converted to a SELECT SQL statement on DB2 SYSIBM.SYSDUMMY1 table.

image-1726570381-1727416809

will have to be converted as

image-1726570412-1727416832

Conclusion

CloudFrame's modernization toolkit, combined with AI, can identify and seamlessly transform programs with SET assignments. In some simple cases like getting CURRENT DATE | TIME | TIMESTAMP the code generated can map it to local Java language constructs to avoid expensive round-tripping of SQL to get this data.

Venkat Pillay
Venkat Pillay
Founder and CEO

Venkat is a true technology visionary, serial entrepreneur, strategist, deep generalist, and architect. With over 25 years of experience and a passion for innovation, his expertise ranges from Legacy to emerging technology and company building.

Related Posts

why-modernization-projects-fail-and-how-to-make-it-a-success-series-10

Why Modernization Projects Fail And How To Make It A Success – Series 10

When legacy modernization efforts turn into a battlefield between IT ambitions and business realities, the outcome is almost always the same: reality wins. Unfortunately, by the time reality prevails, ...

Read More Aug 27, 2024
why-modernization-is-hard-series-9

Why Modernization Is Hard – Series 9

Modernization should directly support your company's strategic goals. Whether it's entering new markets, improving customer experience, or enabling faster product development, the decision to moderniz ...

Read More Aug 21, 2024
why-modernization-is-hard-series-8

Why Modernization Is Hard – Series 8

COBOL programs often generate reports where field formatting is handled using the 'PICTURE' clause. This clause allows for complex numeric editing and formatting options in these legacy programs. Most ...

Read More Aug 14, 2024
why-modernization-is-hard-series-7

Why Modernization Is Hard – Series 7

Migrating mainframe COBOL DB2-based business functions to a cloud-native architecture is a daunting task. In our previous series, we discussed the various complexities involved in ensuring a smooth tr ...

Read More Aug 06, 2024