www.semanticdesigns.com
Open in
urlscan Pro
64.183.221.50
Public Scan
Submitted URL: https://convert-cobol-to-net.com/
Effective URL: https://www.semanticdesigns.com/Products/Services/COBOLMigration.html?site=Convert-COBOL-to-Net.com
Submission: On December 19 via api from US — Scanned from US
Effective URL: https://www.semanticdesigns.com/Products/Services/COBOLMigration.html?site=Convert-COBOL-to-Net.com
Submission: On December 19 via api from US — Scanned from US
Form analysis
3 forms found in the DOMName: FreeAssessment — POST FreeConsultation.jsp
<form name="FreeAssessment" action="FreeConsultation.jsp" method="post">
<div class="block block-categories">
<ul>
<li class="free-consultation">
<a class="free-consultation" href="/Contact/FreeConsultation.jsp">
Request a Free Migration Consultation
</a>
</li>
</ul>
</div>
</form>
Name: SDSearch — GET http://www.google.com/search
<form name="SDSearch" action="http://www.google.com/search" method="get" onsubmit="SDSiteSearch(this)" id="SDSearch">
<input id="hiddenquery" type="hidden" name="q"> <input name="qfront" type="text" style="width: 150px" value=""> <input type="submit" value="Search SD"><br>
<script type="text/javascript">
//Enter domain of site to search.
var domainroot = "www.semanticdesigns.com"
function SDSiteSearch(curobj) {
document.getElementById("hiddenquery").value = "site:www.semanticdesigns.com " + curobj.qfront.value
}
</script>
</form>
Name: drops — POST http://semanticdesigns.com
<form name="drops" method="post" action="http://semanticdesigns.com" id="drops"> Language:<br>
<select name="language" size="1" onchange="changeList(this)">
<option value="PHPProducts">PHP</option>
<option value="PLSQLProducts">PL/SQL</option>
<option value="PythonProducts">Python</option>
<option value="SystemCProducts">SystemC</option>
<option value="SystemVerilogProducts">SystemVerilog</option>
<option value="VisualBasicProducts">Visual Basic</option>
<option value="VerilogProducts">Verilog</option>
<option value="VHDLProducts">VHDL</option>
<option value="XMLProducts">XML</option>
<option value="AnyProducts">Any</option>
<option value="AdaProducts">Ada</option>
<option value="CProducts">C</option>
<option value="CppProducts">C++</option>
<option value="CSharpProducts">C#</option>
<option value="COBOLProducts">COBOL</option>
<option value="ECMAScriptProducts">ECMA/Java script</option>
<option value="EGLProducts">EGL</option>
<option value="FORTRANProducts">FORTRAN</option>
<option value="HTMLProducts">HTML</option>
<option value="JavaProducts">Java</option>
<option value="JOVIALProducts">JOVIAL</option>
<option value="MUMPSProducts">MUMPS</option>
<option value="NaturalProducts">Natural</option>
<option value="ObjectPascalProducts">Object Pascal</option>
<option value="PerlProducts">Perl</option>
</select><br> Product:<br>
<select name="product" size="1">
<option>Custom Transformation</option>
<option value="/Products/LanguageTools/PHPTools.html?Home=DropDown">All</option>
<option value="/Products/Formatters/PHPFormatter.html?Home=DropDown">Formatter</option>
<option value="/Products/Obfuscators/PHPObfuscator.jsp?Home=DropDown">Obfuscator</option>
<option value="/Products/Profilers/PHPProfiler.html?Home=DropDown">Profiler</option>
<option value="/Products/TestCoverage/PHPTestCoverage.jsp?Home=DropDown">Test Coverage</option>
<option value="/Products/SmartDifferencer/PHPSmartDifferencer.html?Home=DropDown">Smart Differencer</option>
<option value="/Products/FrontEnds/PHPFrontEnd.html?Home=DropDown">Front End</option>
<option value="/Products/Clone/PHPCloneDR.html?Home=DropDown">Clone Detector</option>
</select> <input type="button" onclick="location = ''+document.drops.product.options[document.drops.product.selectedIndex].value;" value="Go!">
</form>
Text Content
Semantic DesignsSM Automated Tools for Software Engineering Code Search (Find, Follow), Analysis (Metrics, Static, Dynamic, Bugs) and Change (Modernization, Migration, Generation, Optimization, Rearchitecting) * Home * Services * Automated Migration ► * COBOL Migration * HLASM Migration * PL/1 Migration * Natural Migration * SAS Migration * SabreTalk Migration * ColdFusion Migration * C/C++ Migration * Custom Analysis and Transformation * Custom Development Toolkit * Application Modernization * Software Quality Analysis * Understanding Software Structure * Code Refactoring * DMS Licensing and Training * Products * DMS® * By Language ► * C * C++ * Java * COBOL * C#/.Net * PHP * VHDL * Verilog * More... * By Tool ► * Search Engine * Clone Detection * Test Coverage * Formatters * Obfuscators * Metrics * Profilers * Smart Differencer * More... * By Application ► * Hogan (Banking) Analysis * More Effective Testing * Detecting Infringement * Agile Testing * Why Buy * Prices * Register * Downloads * Company * About SD * Success Stories * News and Events * Partners * Customers * Careers * Papers * Visions * Support * Support Policies * Register * Downloads * Contact COBOL MIGRATION TO JAVA OR C#/.NET Migrating COBOL to new languages such as Java or C#/.Net promises the following nice properties: * removing the stranglehold of the legacy hardware and the cost of the lease/licensing costs, * making the application more maintainable, and * providing the organization with access to more easily found software engineers. The first concern is, What will translated code look like? Weak translators convert code blindly line-by-line, with virtually no understanding of how the context of the code should shape its translation. Such translated code preserves the properties of the original COBOL, sometime the point of even preserving the syntax. Even if such code works, it not be maintainable and will ultimately cost the organization sorely. (You can see here the results of weak translator, not from SD, to compare to the results you see on this page). Semantic Designs translators parse the original code with tools that have the same understanding as the original compilers; (for example, see our COBOL Front End). SD tools know the types of variables, where and how they are used ("the context"), and can thus produce extremely good translations. Because SD also customizes the tools to the specific needs of the customer, the code reflects those needs properly. Semantic Designs has extended its COBOL tanslator to handle HP NonStop COBOL and SCOBOL, in addition to other COBOL dialects (including IBM Enterprise, Fujitsu NetCOBOL, and MicroFocus Visual COBOL, etc.) A COBOL PROGRAM TRANSLATION Here we show you a small sample of COBOL translated by SD's tools to C# and another to Java. We present them in this order to make a point about code translation that depends on language features. A SIMPLE COBOL PROGRAM We have chosen to provide a small COBOL program to prevent the reader from being overwhelmed with an 8000 line example. IDENTIFICATION DIVISION. PROGRAM-ID. ORDER-DISCOUNT. DATA DIVISION. WORKING-STORAGE SECTION. 01 COMPANY. 05 COMPANY-NAME PIC X(60) VALUE "Semantic Designs". 05 COMPANY-ADDRESS. 10 STREET PIC X(80) VALUE "8101 Asmara Dr.". 10 CITY. 15 CITY-NAME PIC X(40) VALUE "Austin". 15 FILLER PIC XX VALUE ", ". 15 CITY-STATE PIC XX VALUE "TX". 15 ZIP. 20 ZIP-5 PIC 9(5) VALUE 78750. 01 LINE-ITEM. 05 ITEM PIC X(20) VALUE "Blue widget". 05 QUANTITY PIC 999 VALUE 217. 05 PRICE PIC 9999V99 VALUE 24.95. 77 TOTAL-AMOUNT PIC 999999V99. 77 DISCOUNT-THRESHOLD PIC 999999V99 VALUE 1111.11. 77 DISCOUNT-PERCENT PIC 99 VALUE 20. 77 DISCOUNT-AMOUNT PIC 99999999V99. 77 TOTAL-FOR-OUTPUT PIC $$$$$$9.99. PROCEDURE DIVISION. PERFORM-TASK. PERFORM COMPUTE-TOTAL. PERFORM DISPLAY-TOTAL. STOP RUN. COMPUTE-TOTAL. MULTIPLY QUANTITY BY PRICE GIVING TOTAL-AMOUNT. IF TOTAL-AMOUNT > DISCOUNT-THRESHOLD MULTIPLY TOTAL-AMOUNT BY DISCOUNT-PERCENT GIVING DISCOUNT-AMOUNT DIVIDE 100 INTO DISCOUNT-AMOUNT SUBTRACT DISCOUNT-AMOUNT FROM TOTAL-AMOUNT. DISPLAY-TOTAL. DISPLAY COMPANY-NAME. MOVE TOTAL-AMOUNT TO TOTAL-FOR-OUTPUT. DISPLAY "Total: ", TOTAL-FOR-OUTPUT. COBOL PROGRAM AUTOMATICALLY TRANSLATED TO C# Here we present the translation of the simple COBOL program above to C#. One should note that the translator has chosen data types compatible with their declaration in the original program, but with a different representation better suited for C#. Note the different choice of C# integer types based on the sizes of the values being stored. In particular, note the choice of the C# built-in decimal data type, used where decimal data with fractional parts is necessary. Note that paragraphs have been converted to methods, which provides a clean way to translate PERFORM A THRU B. This output is reproduced exactly as the translator generated it. The translator produces nicely formatted code as a standard by-product. using System; using System.Diagnostics; using SemanticDesigns; using static SemanticDesigns.SDCSC; public class OrderDiscount { public readonly Library.OrderDiscount.CompanyTType Company = new Library.OrderDiscount.CompanyTType(); public readonly Library.OrderDiscount.LineItemTType LineItem = new Library.OrderDiscount.LineItemTType(); public decimal TotalAmount; public decimal DiscountThreshold = (decimal)1111.11M; public sbyte DiscountPercent = (sbyte)20; public decimal DiscountAmount; public decimal TotalForOutput; private static OrderDiscount _self = null; public static void Main() { if (_self == null) { _self = new OrderDiscount(); } _self._Main(); } private void _Main() { // label: LblPerformTask FnComputeTotal(); FnDisplayTotal(); System.Environment.Exit(0); } private void FnComputeTotal() { // label: LblComputeTotal TotalAmount = LineItem.Price * LineItem.Quantity; if (TotalAmount > DiscountThreshold) { DiscountAmount = DiscountPercent * TotalAmount; DiscountAmount = Data.Truncate(DiscountAmount / 100, 2); TotalAmount = System.Math.Abs(TotalAmount - DiscountAmount); } } private void FnDisplayTotal() { // label: LblDisplayTotal Console.WriteLine(Company.CompanyName.PadRight(60)); TotalForOutput = TotalAmount; Console.Write("Total: "); Console.WriteLine(TotalForOutput.Format("$(6)9.9(2)")); } } So one can get good code from a translator, if one has the right foundation technology such as SD's DMS Software Reengineering Tookit®. As a practical matter, you can't get good code from an off the shelf translator, because every application system has unique properties: languages, OS features, scripting languages, screens, databases, and a correspondingly unique target as decided by the client. So it takes some effort to configure DMS for the client's particular source and target software configurations. COBOL PROGRAM AUTOMATICALLY TRANSLATED TO JAVA Here we present the translation of the same simple COBOL program above to Java. One should note that the translator has chosen data types compatible with their declaration in the original program. In contrast with C#, Java does not have native decimal types, so the BigDecimal library class has been chosen to represent decimal numbers which can have fractional parts. The translation is adjusted to use appropriate method calls on the BigDecimal class instead of native Java operators +, -, *, / which do not work on classes. We remark that a different custom translation could scale decimal numbers by 100 or 10000, allowing use of Java-native + and - operators instead of method calls. Which of these choices are made depend on what the client thinks in more important to long term maintainablity: representation of decimal numbers as 'decimals' in the BigDecimal class with somewhat less readable expressions for decimal arithmetic, or a slightly non-intuitive representation of decimal numbers with readable expressions. As with the C# version, note that paragraphs have been converted to methods, which provides a clean way to translate PERFORM A THRU B. This output is reproduced exactly as the translator generated it. package Application; import com.semanticdesigns.cobol2java.* ; public class OrderDiscount { public final Library.OrderDiscount.CompanyTType company = new Library.OrderDiscount.CompanyTType(); public final Library.OrderDiscount.LineItemTType lineItem = new Library.OrderDiscount.LineItemTType(); public java.math.BigDecimal totalAmount = java.math.BigDecimal.ZERO; public java.math.BigDecimal discountThreshold = new java.math.BigDecimal("1111.11"); public byte discountPercent = (byte) 20; public java.math.BigDecimal discountAmount = java.math.BigDecimal.ZERO; public java.math.BigDecimal totalForOutput = java.math.BigDecimal.ZERO; private static OrderDiscount _self = null; public static void main(String args[]) { if (_self == null) { _self = new OrderDiscount(); } Data.setCommandLineArguments(args); _self._main(); } private void _main() { // label: lblPerformTask fnComputeTotal(); fnDisplayTotal(); System.exit(0); } private void fnComputeTotal() { // label: lblComputeTotal totalAmount = lineItem.price.multiply(java.math.BigDecimal.valueOf(lineItem.quantity), java.math.MathContext.DECIMAL128); if (totalAmount.compareTo(discountThreshold) > 0) { discountAmount = java.math.BigDecimal.valueOf(discountPercent).multiply(totalAmount, java.math.MathContext.DECIMAL128); discountAmount = Data.truncate(discountAmount.divide(java.math.BigDecimal.valueOf(100), java.math.MathContext.DECIMAL128), 2); totalAmount = totalAmount.subtract(discountAmount).abs(); } } private void fnDisplayTotal() { // label: lblDisplayTotal System.out.println(Data.format(company.companyName, "X(60)")); totalForOutput = totalAmount; System.out.print("Total: "); System.out.println(Data.format(totalForOutput, "$(6)9.9(2)")); } } CONFIGURING A CUSTOM MIGRATION TOOL TO MATCH CLIENT NEEDS Semantic Designs can provide custom configuration of migration tools and migration support to your organization, providing high quality, maintainable code translations. * Request a Free Migration Consultation TOPICS * Re-engineering * Documentation * Assessment * Improvement * Code Generation * Hardware Description Languages * All Topics Language: PHPPL/SQLPythonSystemCSystemVerilogVisual BasicVerilogVHDLXMLAnyAdaCC++C#COBOLECMA/Java scriptEGLFORTRANHTMLJavaJOVIALMUMPSNaturalObject PascalPerl Product: Custom TransformationAllFormatterObfuscatorProfilerTest CoverageSmart DifferencerFront EndClone Detector SEMANTIC DESIGNS- OUR GOAL To enable our customers to produce and maintain timely, robust and economical software by providing world-class Software Engineering tools using deep language and problem knowledge with high degrees of automation. For more information: info@semanticdesigns.com Follow us at Twitter: @SemanticDesigns Copyright 1995-2023 Semantic Designs, Incorporated DMS, "Design Maintenance System" and Refactor++ are registered trademarks of Semantic Designs, Inc. The SD logo and "Semantic Designs" are registered service marks of Semantic Designs, Inc. Software Reengineering Toolkit, CloneDR, PARLANSE, JOVIAL2C, Thicket, Smart Differencer, CheckPointer are trademarks of Semantic Designs, Inc. The OMG logo is a registered trademark of the Object Management Group, Inc. in the United States and other countries. To view our Privacy Policy, click here Comments or problems: webmaster@semanticdesigns.com COBOL Migration