Vyoms OneStopTesting.com - Testing EBooks, Tutorials, Articles, Jobs, Training Institutes etc.
OneStopGate.com - Gate EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopMBA.com - MBA EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopIAS.com - IAS EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopSAP.com - SAP EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
OneStopGRE.com - of GRE EBooks, Tutorials, Articles, FAQs, Jobs, Training Institutes etc.
Bookmark and Share Rss Feeds

Cobol for Microsoft .NET | Articles | Recent Articles | News Article | Interesting Articles | Technology Articles | Articles On Education | Articles On Corporate | Company Articles | College Articles | Articles on Recession
Sponsored Ads
Hot Jobs
Fresher Jobs
Experienced Jobs
Government Jobs
Walkin Jobs
Placement Section
Company Profiles
Interview Questions
Placement Papers
Resources @ VYOMS
Companies In India
Consultants In India
Colleges In India
Exams In India
Latest Results
Notifications In India
Call Centers In India
Training Institutes In India
Job Communities In India
Courses In India
Jobs by Keyskills
Jobs by Functional Areas
Learn @ VYOMS
GATE Preparation
GRE Preparation
GMAT Preparation
IAS Preparation
SAP Preparation
Testing Preparation
MBA Preparation
News @ VYOMS
Freshers News
Job Articles
Latest News
India News Network
Interview Ebook
Get 30,000+ Interview Questions & Answers in an eBook.
Interview Success Kit - Get Success in Job Interviews
  • 30,000+ Interview Questions
  • Most Questions Answered
  • 5 FREE Bonuses
  • Free Upgrades


Wipro Technologies
Tata Consultancy Services
Cognizant Technologies

Home » Articles » Cobol for Microsoft .NET

Cobol for Microsoft .NET

Article Posted On Date : Monday, March 26, 2012

Cobol for Microsoft .NET

1. Summary

This article gives you introduction about how the age old COBOL can take a new energetic look under Microsoft.NET.

2. Introduction   

In the article titled IL "THE LANGUAGE OF CLR" - A PLATFORM FOR CROSS-LANGUAGE I already talked about the cross language capabilities of Microsoft.NET architecture. In this section I would like to draw your attention towards one of the popular languages COBOL and would like to present some examples to show how COBOL extends its capability to deliver wide range of applications under .NET.   

Fujitsu has taken up the task of writing COBOL compiler that targets Common Language Runtime Environment to exploit the best features of Common Language Infrastructure. Fujitsu Software is an active member that is participating in the standardization of many of the drafts relating to .NET. It had brought many solutions and products relating to COBOL in the past and is working very hard to bring many other products that target Microsoft.NET  

I happened to go through all the previews provided by Fujitsu Software and take this privilege to present my own examples and feeling about this new compiler.   Though its not the final version of the release, I would like to provide future prospects of thislanguage.

3. Installation Instructions   

If you dont have the COBOL preview III software from Fujitsu then you can download the file PackageFujitsuCOBOLPreviewIII (954KB), a Windows Installer Package, from http://www.adtools.com or http://www.fujitsu.com

Software Requirements:  

    Windows 2000 Server
    Windows 2000 SP1 or higher
    .NET SDK Beta 2 ( Doesnt work with Beta1)

Installation Procedure

    Run PackageFujitsuCOBOLPreviewIII Windows Installer and follow the instructions.
    Create a virtual directory named COBOL and map this to Examples folder which can be found at the following location drivenameProgram FilesFujitsu COBOL .NET Preview IIIExamplesWeb
    Create directory named COBSAMPLES under drivenameProgram FilesFujitsu COBOL .NET Preview IIIExamplesWeb   


If you create a virtual directory than the specified above and map it to any other location you may not be able to run the COBOL.NET applications.

Installing the COBOL.NET software  

Double click the Windows Installer you will find the following screen. Follow the instructions and it setups the required things to support ASP.NET applications, Windows Applications and VS.NET.  

Mapping a Virtual Directory

Open the Internet Service Manger. If required expand the node on left-hand side pane to find Default Web Site. Right click on Default Web Site and choose new/virtual directory option. Give the alias name as COBOL and then you will find the screen with browse option. Now map this to Examples directory as show in the below diagram.  

4. ASP.NET Applications using COBOL  

Look at the following example. It is just like any other aspx page with language attribute set to COBOL. For those who are migrating from COBOL and writing .NET applications for the first time it might take some time to understand the technology. But for time being type in your code in by opening a notepad and save as cobol.aspx. The extension of ASP.NET applications is .aspx. Ensure to save this in COBSAMPLES directory.  Thats all. Type in the following URL: http://localhost/cobol/web/cobsamples/cobol.aspx

<%@ page language="COBOL" %>
<script runat="server">
       77 I PIC S9(5) COMP-5.
       END OBJECT.  
<% IF I=1 THEN %>
<center><font size="<%=I%>">COBOL IN 1970'S</font>
<% END-IF %>
<% IF I = 2 THEN %>
<center><font size="<%=I%>">COBOL IN 1980'S</font>
<% END-IF %>  
<% IF I = 3 THEN %>
<center><font size="<%=I%>">COBOL IN 1990'S</font>
<% END-IF %>  
<% IF I = 4 THEN %>
<center><font size="<%=I%>">COBOL IN 2000</font> <br></center>
<% END-IF %>   
<% IF I = 5 THEN %>
<center><font size="<%=I%>">COBOL.NET IN 2001</font><br> </center>
<% END-IF %>

The tag <script runat="server"> ensures the COBOL language understand the ASP.NET framework and makes it run at the server side. The remaining code is a combination of html mixed with simple asp code. This shows how simple and easy for COBOL programmers to migrate to ASP.NET. What all they need to understand is, what .NET is all about?.


5. Creating Web Services Using COBOL

Many authors have written about Web Services. So I wont be saying all the details about Web Services here. In sample terms Web Services are distributed applications accessible across Internet using standard protocols such as SOAP and XML.The following is the COBOL Code for a Web Service called CalculateArea. This Web Service takes two inputs and returns the area of a rectangle. The extension for Web Services in ASP.NET is .asmx. The COBOL used is not procedural COBOL but Object COBOL.

<%@ WebService Language="COBOL" Class="AreaOfRect" %>
       CLASS-ID. AreaOfRect.
       METHOD-ID. calculateArea.
       01 SideA PIC S9(5) COMP-5.
       01 SideB PIC S9(5) COMP-5.
       01 RectangleArea PIC S9(5) COMP-5.
       COMPUTE RectangleArea = SideA * SideB.
       END METHOD calculateArea.
       END OBJECT.
       END CLASS AreaOfRect.

Key-in the above code in notepad and save it as CalculateArea.asmx and save it in COBSAMPLES directory. To view the result type in the following URL: http://localhost/cobol/web/cobsamples/calculatearea.asmx


Enter the values of SideA and SideB and click invoke. It throws the result in XML format. Needless to mention about the usefulness of XML format, it can be consumed by any application.

Once upon a time writing distributed applications using COBOL was unthinkable dream. But now with Microsoft.NET, languages have become equal and any language could produce same results. Thats not what COBOL can do for you. It can be useful for writing Windows application and can be used for cross language development etc. In the forthcoming articles I will be dealing with many other aspects of .NET using COBOL. Hope by now you might have felt the power of COBOL under .NET.

6. Conclusion

Fujitsu is trying to get COBOL.NET as soon as possible to the market. They got very good reputation for delivering COBOL related products and solutions. Its actively participating in standardization efforts of CLI (ECMA). The other participants include Hewlett-Packard, Intel Corporation, IBM, ISE, Microsoft, Monash University, Sun Micros Systems etc. There is no doubt that COBOL could be used more effectively than ever, for delivering wide range of applications. All those people using COBOL can now think of designing distributed applications, writing server-side programming, writing windows applications and so on. Be tuned for further developments in this area, as this is one of the popular languages used across the globe even today. Wait for my up coming articles in the same section.

Sponsored Ads

Interview Questions
HR Interview Questions
Testing Interview Questions
SAP Interview Questions
Business Intelligence Interview Questions
Call Center Interview Questions


Clipper Interview Questions
DBA Interview Questions
Firebird Interview Questions
Hierarchical Interview Questions
Informix Interview Questions
Microsoft Access Interview Questions
MS SqlServer Interview Questions
MYSQL Interview Questions
Network Interview Questions
Object Relational Interview Questions
PL/SQL Interview Questions
PostgreSQL Interview Questions
Progress Interview Questions
Relational Interview Questions
SQL Interview Questions
SQL Server Interview Questions
Stored Procedures Interview Questions
Sybase Interview Questions
Teradata Interview Questions

Microsof Technologies

.Net Database Interview Questions
.Net Deployement Interview Questions
ADO.NET Interview Questions
ADO.NET 2.0 Interview Questions
Architecture Interview Questions
ASP Interview Questions
ASP.NET Interview Questions
ASP.NET 2.0 Interview Questions
C# Interview Questions
Csharp Interview Questions
DataGrid Interview Questions
DotNet Interview Questions
Microsoft Basics Interview Questions
Microsoft.NET Interview Questions
Microsoft.NET 2.0 Interview Questions
Share Point Interview Questions
Silverlight Interview Questions
VB.NET Interview Questions
VC++ Interview Questions
Visual Basic Interview Questions

Java / J2EE

Applet Interview Questions
Core Java Interview Questions
Eclipse Interview Questions
EJB Interview Questions
Hibernate Interview Questions
J2ME Interview Questions
J2SE Interview Questions
Java Interview Questions
Java Beans Interview Questions
Java Patterns Interview Questions
Java Security Interview Questions
Java Swing Interview Questions
JBOSS Interview Questions
JDBC Interview Questions
JMS Interview Questions
JSF Interview Questions
JSP Interview Questions
RMI Interview Questions
Servlet Interview Questions
Socket Programming Interview Questions
Springs Interview Questions
Struts Interview Questions
Web Sphere Interview Questions

Programming Languages

C Interview Questions
C++ Interview Questions
CGI Interview Questions
Delphi Interview Questions
Fortran Interview Questions
ILU Interview Questions
LISP Interview Questions
Pascal Interview Questions
Perl Interview Questions
PHP Interview Questions
Ruby Interview Questions
Signature Interview Questions
UML Interview Questions
VBA Interview Questions
Windows Interview Questions
Mainframe Interview Questions

Copyright © 2001-2022 Vyoms.com. All Rights Reserved. Home | About Us | Advertise With Vyoms.com | Jobs | Contact Us | Feedback | Link to Us | Privacy Policy | Terms & Conditions
Placement Papers | Get Your Free Website | IAS Preparation | C++ Interview Questions | C Interview Questions | Report a Bug | Romantic Shayari | CAT 2022

Fresher Jobs | Experienced Jobs | Government Jobs | Walkin Jobs | Company Profiles | Interview Questions | Placement Papers | Companies In India | Consultants In India | Colleges In India | Exams In India | Latest Results | Notifications In India | Call Centers In India | Training Institutes In India | Job Communities In India | Courses In India | Jobs by Keyskills | Jobs by Functional Areas

Testing Articles | Testing Books | Testing Certifications | Testing FAQs | Testing Downloads | Testing Interview Questions | Testing Jobs | Testing Training Institutes

Gate Articles | Gate Books | Gate Colleges | Gate Downloads | Gate Faqs | Gate Jobs | Gate News | Gate Sample Papers | Gate Training Institutes

MBA Articles | MBA Books | MBA Case Studies | MBA Business Schools | MBA Current Affairs | MBA Downloads | MBA Events | MBA Notifications | MBA FAQs | MBA Jobs
MBA Job Consultants | MBA News | MBA Results | MBA Courses | MBA Sample Papers | MBA Interview Questions | MBA Training Institutes

GRE Articles | GRE Books | GRE Colleges | GRE Downloads | GRE Events | GRE FAQs | GRE News | GRE Training Institutes | GRE Sample Papers

IAS Articles | IAS Books | IAS Current Affairs | IAS Downloads | IAS Events | IAS FAQs | IAS News | IAS Notifications | IAS UPSC Jobs | IAS Previous Question Papers
IAS Results | IAS Sample Papers | IAS Interview Questions | IAS Training Institutes | IAS Toppers Interview

SAP Articles | SAP Books | SAP Certifications | SAP Companies | SAP Study Materials | SAP Events | SAP FAQs | SAP Jobs | SAP Job Consultants
SAP Links | SAP News | SAP Sample Papers | SAP Interview Questions | SAP Training Institutes |

Copyright ©2001-2022 Vyoms.com, All Rights Reserved.
Disclaimer: VYOMS.com has taken all reasonable steps to ensure that information on this site is authentic. Applicants are advised to research bonafides of advertisers independently. VYOMS.com shall not have any responsibility in this regard.