MERANT Micro Focus Net Express 3.1
Reviewer’s Guide
3
MERANT Micro focus Net express 3.1 REVIEWER’S guide
Micro Focus, Animator and Visual are registered trademarks, and Dialog System, Form Designer, Micro Focus COBOL, Net Express, Server Express, Object COBOL and Solo are trademarks of Micro Focus Limited.
PVCS is a registered trademark, and PVCS Version Manager, PVCS Tracker and PVCS TrackerLink are trademarks, of INTERSOLV Inc., a subsidiary of Micro Focus Group PLC.
PowerTerm is a registered trademark of Ericom Software Ltd.
Microsoft, Windows and Win32 are registered trademarks, and AutoPlay, Internet Explorer and Windows NT are trademarks of Microsoft Corporation.
Netscape and Netscape Navigator are trademarks of Netscape Communications Corporation.
Java and JavaBeans are trademarks of Sun Microsystems, Inc.
UNIX is a registered trademark of X/Open Company Limited.
IBM and DB2 are registered trademarks of International Business Machines Corporation.
Oracle is a registered trademark of Oracle Corporation.
Sybase is a trademark of Sybase, Inc.
INFORMIX is a registered trademark of Informix Corporation.
Copyrightã 2000 MERANT International Limited. All Rights Reserved.
Table of Contents
Introduction 1
Why Net Express? 1
Why COBOL? 2
Net Express Overview 4
The Micro Focus COBOL Compiler 4
The Net Express Integrated Development Environment 7
Internet Development Tools 12
Using COBOL with Java 17
Support for OLE Automation and the Common Object Model (COM) 18
Windows Graphical User Interface Development Tools 21
IBM WebSphere 3.0 Enterprise Edition (TX Series) 23
Data Access 24
Developing Applications for UNIX 26
Deployment 27
Documentation 27
Getting Started with Net Express 3.1 28
System Requirements 28
Package Contents 28
Installing Net Express 28
Use of Microsoft Internet Explorer 5.0 31
Completing the Install 31
The Net Express Protection System 31
Net Express – The First Time 33
Learning More about Net Express 34
MERANT Micro focus Net express 3.1 REVIEWER’S guide
Introduction
Welcome to the Net ExpressÔ 3.1 Reviewers Guide. Net Express 3.1 is the latest version of the award-winning COBOL development environment from MERANT. The objectives of this guide are to take you through the major features of Net Express and introduce you to the product itself.
Why Net Express?
Approximately sixty percent of the world’s code is written in COBOL. This code is in 9.5 million applications. In addition, there are 2.4 million COBOL programmers[1]. This means that there is a tremendous investment in COBOL assets worldwide. At the same time, enterprises are under severe pressure to bring new functionality to market, especially to extend existing business processes to the Internet or to move applications to new client/server platforms.
Industry analysts are predicting increasing reuse of existing application “assets”. As seen above, most of these assets are written in COBOL. Not only does reuse result in significantly less cost than developing new applications from scratch, but also delivers faster time to market.
According to GartnerGroup[2], there are four ways of extending existing applications to the Web:
n “GUI-fication”. The application is unchanged. Screen scraping technology is used to add a Web browser front-end to the application.
n UI Redesign. The existing user interface code in the application is changed to use a Web browser-based user interface.
n Defragmentation. Multiple applications are pulled together under one Web-based user interface.
n Function Extension. The existing application is extended with new functionality to create a new Web-based application.
Net Express 3.1 is uniquely positioned to address the needs of programmers who need to perform UI redesign, defragmentation or function extension. Net Express tools, such as Form DesignerÔ and the Internet Application Wizard, make it easy for programmers to create a new Web-based user interface for an existing application. The use of COBOL as a development language allows the huge amount of existing code to be reused and extended using the same style and conventions as the existing code, leading to consistency and ease of maintenance. The COBOL/Java interoperability added in Net Express 3.1 allows COBOL assets to be leveraged from Java and as an Enterprise Java Bean within an Application Server environment. On the other hand, Net Express is not intended for programmers looking for “GUI-fication”. Many tools are available that provide this functionality including MERANT EnterpriseLink which is far more than a screen scraping tool but addresses the “GUI-fication” space.
The profile of the typical Net Express customer is:
n An IT department or ISV with a large COBOL investment, either in existing COBOL code or in programmers skilled in COBOL.
n Plan to use Windows 95, Windows 98, Windows NT or Windows 2000 as their primary development environment.
n Plan to use Windows 95, Windows 98, Windows NT, Windows 2000 or UNIX as their deployment environment. If UNIX is being used, Net Express is used in conjunction with Micro Focus Server ExpressÔ for UNIX or Micro Focus Object COBOL Developer Suite for UNIX.
n Minimal C, C++ or Java experience.
The objectives for Net Express are for the COBOL programmer to be able to:
n Extend and develop applications for the Internet.
n Re-host and extend existing applications to new platforms such as Windows 95, Windows 98, Windows NT or Windows 2000
n Re-use existing business logic as components in new applications.
n Exploit new technologies, but remove the need for them to understand the low-level “plumbing” or learn new programming languages. Instead, they can focus on the business problems.
Why COBOL?
”I find it in general that human beings are allergic to change … They’ve learned something, they’re perfectly satisfied doing it, and you come along and say, you’re going to do it this way. People push it away.”
Admiral Grace Murray Hopper
Admiral Hopper had a good point. As mentioned earlier, there is a huge amount of COBOL programmers in the world. There has to be a good reason for them to learn a completely different programming language. Therefore, before looking in detail at Net Express, it is worthwhile looking at the COBOL language to see why it is still a good choice for business application development today.
A common complaint is that COBOL is verbose and cumbersome. However, modern compilers, such as Micro Focus COBOLÔ, do not require a lot of the unnecessary text (such as Identification Division, etc). In addition, COBOL is such a functionally rich language that it can often do in one statement something that requires many lines of code in another language (for example, the STRING and UNSTRING statements). In addition, the data types in COBOL are designed for business applications. For example, fixed-point numeric fields are used to store amounts of money, which ensures absolute accuracy in arithmetic operations.
Just because COBOL has been around so long, it does not mean that you cannot use it for modern applications. MERANT has added extensions to the language to allow programmers to write Internet applications, make calls to operating system routines, write multi-threaded applications, write COM/EJB objects and so on. Many of these extensions will be part of the next COBOL standard, as will be support for object oriented programming (which Net Express already supports).
In general, people’s perception of COBOL programming is of using green-screen terminals, command-line tools and unstructured code. As you will see in this guide, Net Express provides all of the power and ease-of-use available in tools for any modern language. Should COBOL be used to write an operating system or a device driver? No one would seriously consider doing that. However, COBOL is still a powerful, productive language for use in developing business applications and there should be no need for business programmers to learn a new language.
- 34 -
MERANT Micro focus Net express 3.1 REVIEWER’S guide
Net Express Overview
Net Express is a complete development environment for COBOL programmers. This section provides an overview of the main features of Net Express.
The Micro Focus COBOL Compiler
At the heart of Net Express is the Micro Focus COBOL compiler. MERANT formerly Micro Focus has delivered COBOL compilers for the leading PC and UNIX platforms for over 20 years. It has achieved a number of “firsts” including:
n The first PC compiler to be certified at the highest level of the ANSI 85 COBOL standard.
n The first COBOL compiler to include support for object-oriented programming.
n The first COBOL compiler to include support for OLE Automation. In fact, Micro Focus COBOL was the first commercially available 32-bit general purpose programming language to support OLE Automation[3].
The compiler in Net Express 3.1 continues the groundbreaking trend set by earlier Micro Focus products. This section introduces the features of the COBOL compiler in Net Express.
High Performance, Standard Objects
The object modules created by the COBOL compiler are high-performance native code object (OBJ) files that link together to form standard executables (EXE) or dynamic-link libraries (DLL). Alternatively, Net Express can produce Micro Focus intermediate code (INT) files for maximum portability to other platforms supported by Micro Focus compilers.
Extensive COBOL Dialect Support
Net Express supports many different dialects of COBOL including:
n ANSI’85 at the highest level, including the intrinsic function addendum.
n IBM mainframe dialects, including OSVS COBOL, VS COBOL II and COBOL/370.
n Siemens BS2000 dialect
n Many PC compiler dialects, including Microsoft COBOL.
This makes it easy for programmers to migrate code originally written for other compilers to Net Express. Of course, anyone who has used earlier versions of Micro Focus products will find that Net Express supports their existing COBOL code.
Support for Writing Object-Oriented Programs
Micro Focus COBOL has included support for writing object-oriented programs in its compilers since 1995. As well as the syntax supported by previous Micro Focus compilers, Net Express 3.1 includes much of the syntax proposed in the next COBOL standard.
The syntax added for object-oriented programming enables COBOL programs to access OLE Automation servers and for programmers to use COBOL to create OLE Automation and COM servers. The later section “Support for OLE Automation and the Common Object Model” covers this in detail.
System Programming Extensions
Net Express includes many extensions to the COBOL language to allow access to operating system features that have not been traditionally accessible from COBOL programs. These include:
n Data pointers
n Procedure pointers
n Access to parameters by value as well as by reference
n Return values from called modules.
This makes it easy for programmers to access operating system features without having to resort to having to switch to a different programming language for that one piece of their application.
Extensions for Writing Multi-Threading Applications
To fully exploit operating systems such as Windows NT and Windows 2000, programmers may want to execute some tasks as separate threads. For example, they may want to perform some routine tasks in the background so as not to cause any delays in the responsiveness of the application to the user. New verbs have been introduced to the COBOL language to handle the creation and manipulation of operating system threads and new synchronization data types have been implemented to enable data access to be co-ordinated between these threads.
Extensions for Web Programming
Two extensions to the COBOL language make it easy for COBOL programmers to write Web-based applications:
n The ACCEPT and DISPLAY statements can now access an EXTERNAL FORM. This enables a COBOL program to retrieve the data entered in a HTML form and output data to a HTML form. These extensions also enable an application to set and retrieve the values of cookies on the client. The ACCEPT statement ensures that the data from the appropriate fields is placed in the correct COBOL variable. The programmer does not have to worry about parsing the incoming strings.
n EXEC HTML enables a programmer to embed HTML statements directly into an application. Because HTML pages can be constructed from multiple EXEC HTML statements, it enables the full power of COBOL to be used as a scripting language to determine the contents of the final HTML page.
The Net Express Integrated Development Environment
As mentioned earlier, when most people think of COBOL development tools, they think of the green-screen mainframe environment, cryptic command lines and the use of core dumps for debugging the application. The Net Express integrated development environment (IDE) could not be further away from this image. The Net Express IDE is designed to feel comfortable to anyone familiar with the Windows user interface. It streamlines the development process, allowing the programmer to focus on the process of editing, building and debugging their application without having to think about the tools that they need to use for any particular task.
Project Based
The Net Express IDE is completely project-based. Wizards guide you through the stages needed to create a project from an existing application or for a new application. The following image shows the project window. The right-hand side pane shows all of the source files in the project. The left-hand pane shows the structure of the application and which source files are used to create the different executable modules. Once the project exists, any changes to the application only require one click of the mouse to recompile and rebuild the affected modules. Switching between debug and release versions of the application is a simple task.
A COBOL Programmers Editor
The editor inside Net Express is tailored to the needs of COBOL programmers. Traditional COBOL has strict rules for the positioning of code. The default positions of the margins in the Net Express editor vary according to the type of the file the programmer is editing. For COBOL programs, the margins are positioned at columns 7 and 73 so that the programmer does not have to worry about creating lines that contain code that is in the margins. The programmer can easily change this if they wish.
It is important to note that COBOL programs no longer need to be ‘fixed format’. The next COBOL standard allows COBOL code to be ‘free format’ and Net Express supports this. However, most COBOL code that exists today is still fixed format and Net Express recognizes this.
The editor provides all of the functionality a programmer would expect, including:
n Coloring of source code enabling easy identification of reserved word, variables, constants, comments, etc.
n Block operations.
n Comprehensive search and replace.
n Automatically fixing common typing mistakes (for example, automatically changing PERFROM to PERFORM). The programmer can easily add their own words to the list of word to be automatically fixed.
n Configurable key assignments and toolbar usage.
n
Expansion of COPY statements in-line removing the need to switch between files to obtain a view of the complete program.
However, once the application is compiled, the editor provides far more than the standard programmers’ editor. The editor accesses the dictionary created by the COBOL compiler and makes extensive information available to the programmer, including: