Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference Between MF-COBOl and IBM-COBOL/COBOL II 1

Status
Not open for further replies.

Udaykumar

Programmer
Dec 3, 2001
2
US
Can someone please explain to me what are the differences between MF-COBOL & COBOL II or iBM-COBOL.

Thanks,

Udaykumar
 
Can someone please explain to me what are the differences between MF-COBOL & COBOL II or IBM-COBOL?

I am thinking about how to best answer your question. I think the question should be, "What are the various COBOL dialects and what does Micro Focus (MF) and/or IBM support?

First, let me start by saying, "Both Micro Focus and IBM support a number of COBOL dialects."

The first significant COBOL from IBM was called OSVS COBOL and this was the primary COBOL available from IBM until 1989 (approximate date). In the 1989 time frame IBM announced COBOL II and this remained the COBOL from IBM for a number of years. During the past few years IBM introduced MVS COBOL, COBOL 370 and now COBOL 390.

Next, Micro Focus has two products available today. They are Net Express and Mainframe Express. Net Express is targeted toward the PC environment and uses a Micro Focus dialect. Mainframe Express is targeted toward emulating the IBM mainframe and supports the various mainframe dialects such as OSVS COBOL, COBOL II, COBOL for MVS, COBOL 370 and COBOL 390.

Next, there is the "ANSI nn" standard. First, (I am going on my memory here) there was the ANSI 68 standard that was introduced in 1968. This was followed by the ANSI 74 standard (introduced or released in 1974). Next came the ANSI 85 standard that was released in 1985 and this is what is used as a base for today's COBOL compilers.

Now the question is, "Is it possible to write a COBOL program that conforms to the IBM COBOL II standard (or dialect), the Micro Focus dialect (remember Micro Focus supports COBOL II and ANSI 85) and the ANSI 85 standard (i.e. dialect)?"

The answer is, "Yes." However, coding to this level will give-up some of the function that is available in the individual dialects but the resulting program will be portable across the platforms supported by IBM and Micro Focus. Using this approach requires the program to meet the ANSI 85 standard while remaining compliant with the IBM and Micro Focus COBOL compilers.

In summary, COBOL II was the IBM COBOL until it was replaced by COBOL for MVS(within the past couple of years). If you use Micro Focus COBOL with the COBOL II dialect specified then there is no difference. I do not know if we have answered your question or added to the confusion. If you need additional information please let us know.
Saginaw
helpdesk@simotime.com
 
An older cheaper Micro Focus compiler called personal object oriented compiler is also available. It only runs about $100.00 for a production compiler. I have used the $49.00 student version. It was designed for Win 3.1. I have run it on Win95 Ver b. before.

It is fully compatable with the COBOL 85 Standard. It comes with some graphic ablility to make buttons and boxes, but I never bothered with that. It had a nice setup with a windows compatable interface and several view windows. I still have the 5 Floppy Disk Set at home. I think Micro Focus still sells it. If you do not like my post feel free to point out your opinion or my errors.
 
First of all thanks to saginaw and ceh4702 for replying to my question. I was expecting reply in terms like : some COBOL versions support Scope Terminators like END-IF, END-PERFORM, END-READ ...etc. Some versions don't support. Same case for EVALUATE statement. Same case for Reference Modification. Only thing is I don't know which one supports these things and which one does not.

I know that MF-COBOL supports comp-x but not any other COBOL(Atleast I am not aware of any other COBOL). If comp-x is not supported on IBM-COBOL then how program will become portable I am not sure.

Also for current version 2.2 of COBOL 390 supports comp-5 and 31 digit in numeric pictures. I am not aware of any other COBOL supporting these features. I would appreciate if someone tells me differences between IBM-COBOL and MF-COBOL in such terms.

Thanks for your reply. If you can add something more in theose terms will be greatly appreciated.

Thanks once again.

Udaykumar
 
Micro Focus, and other vendors achieve compatability with mainframe dialects through the application of compiler directives. These directives change the behavior of the compiler. For example comp-x would be valid or invalid depending on what compiler directives were used.
 
The following URL has a partial list of some of the dialect differences that cause many of the compatibility issues.
The Micro Focus Web Site did have a very good comparison chart but their site is going through a transition since their spin-off from MERANT and I could not find their reference material. It may show-up again once they get through the transition.

For COMP-5 and 31-digit, Micro Focus announced support for this about a month ago. However, I only saw this support announced for their Mainframe Express (MFE) Product. I do not know of any other vendors that provide this support at this point in time.

COMP-X still appears to be a Micro Focus exclusive. I do not use COMP-X.

The scope terminators or "END-something" dialect was introduced with the ANSI'85 standard and IBM first introduced this support with VS COBOL II. Micro Focus and many other vendors provide this support.

I am curious, is your question an academic pursuit or will you be moving COBOL applications between the mainframe and other platforms such as Windows/intel and Unix? Saginaw
helpdesk@simotime.com
 
Simotime describes not that much.

I'll give you an example of the same source with different results. Try it with the dialect option of your compiler and see the difference!!!!

Regards,

Crox

source:

Code:
000400 IDENTIFICATION DIVISION.
000500 PROGRAM-ID. TEST0001.
000600*          COPYRIGHT (C) Crox
000700 ENVIRONMENT DIVISION.
000800 CONFIGURATION SECTION.
000900 SOURCE-COMPUTER. IBM-PC.
001000 OBJECT-COMPUTER. IBM-PC.
001100 INPUT-OUTPUT SECTION.
001200 FILE-CONTROL.
001300 DATA DIVISION.
001400 FILE SECTION.
001500 WORKING-STORAGE SECTION.
001600 01  HULPVELDEN.
001700     03  X     VALUE 9               PIC 9.
001800     03  Y     VALUE 8               PIC 9.
001900 PROCEDURE DIVISION.
002000 HOOFD SECTION.
002100 0001.
002300     PERFORM HULP
002400        VARYING X FROM 1 BY 1 UNTIL X > 3
002500               AFTER Y FROM X BY 1 UNTIL Y > 3.
002600 0009.
002700     STOP RUN.
002800
002900 HULP SECTION.
003000 0001.
003100     DISPLAY 'X / Y: ' X ' / ' Y.
003200 0009.
003300     EXIT.


output os/vs cobol:

X / Y: 1 / 1
X / Y: 1 / 2
X / Y: 1 / 3
X / Y: 2 / 1 
X / Y: 2 / 2
X / Y: 2 / 3
X / Y: 3 / 2
X / Y: 3 / 3


output cobol 390:

X / Y: 1 / 1
X / Y: 1 / 2
X / Y: 1 / 3
X / Y: 2 / 2
X / Y: 2 / 3
X / Y: 3 / 3



source:
Code:
000400 IDENTIFICATION DIVISION.
000500 PROGRAM-ID. TEST0006.
000510*               COPYRIGHT (C) Crox
000600 ENVIRONMENT DIVISION.
000700 CONFIGURATION SECTION.
000800 SOURCE-COMPUTER. IBM-PC.
000900 OBJECT-COMPUTER. IBM-PC.
001000 INPUT-OUTPUT SECTION.
001100 FILE-CONTROL.
001200 DATA DIVISION.
001300 FILE SECTION.
001400 WORKING-STORAGE SECTION.
001500 01  VARIABEL-RECORD-1.
001600     03  VR1-LENGTE                  PIC S9(4) COMP.
001700     03  VR1-DATA                    VALUE SPACE.
001800         05  VR1-DATA-TEKEN          OCCURS 1 TO 5
001900             DEPENDING ON VR1-LENGTE PIC X.
002000
002100 01  VARIABEL-RECORD-2.
002200     03  VR2-LENGTE                  PIC S9(4) COMP VALUE +3.
002300     03  VR2-DATA                    VALUE '12345'.
002400         05  VR2-DATA-TEKEN          OCCURS 1 TO 5
002500             DEPENDING ON VR2-LENGTE PIC X.
002600
002700 PROCEDURE DIVISION.
002800 HOOFD SECTION.
002900 0001.
003100     DISPLAY 'VR2-DATA         : ' QUOTE VR2-DATA QUOTE.
003200     DISPLAY 'VR1-DATA         : ' QUOTE VR1-DATA QUOTE.
003300     MOVE VARIABEL-RECORD-2 TO VARIABEL-RECORD-1.
003400     DISPLAY 'VR1-DATA NA 1E MOVE : ' QUOTE VR1-DATA QUOTE.
003500     MOVE VARIABEL-RECORD-2 TO VARIABEL-RECORD-1.
003600     DISPLAY 'VR1-DATA NA 2E MOVE : ' QUOTE VR1-DATA QUOTE.
003610     MOVE +5  TO VR1-LENGTE.
003611     DISPLAY 'VR1-DATA NA 2E MOVE : ' QUOTE VR1-DATA QUOTE.
003612     MOVE +5  TO VR2-LENGTE.
003613     DISPLAY 'VR2-DATA            : ' QUOTE VR2-DATA QUOTE.
003700 0009.
003800     STOP RUN.


output COBOL 74:

VR2-DATA         : '123'
VR1-DATA         : ''
VR1-DATA NA 1E MOVE : '   '
VR1-DATA NA 2E MOVE : '123'
VR1-DATA NA 2E MOVE : '123  '
VR2-DATA            : '12345'


output COBOL 85:

VR2-DATA         : '123'
VR1-DATA         : ''
VR1-DATA NA 1E MOVE : '123'
VR1-DATA NA 2E MOVE : '123'
VR1-DATA NA 2E MOVE : '123  '
VR2-DATA            : '12345'
 
Have you ever thought possible this has something to do with compiler options also? If you do not like my post feel free to point out your opinion or my errors.
 
Hi,

You can use DIALECT options to change from COBOL74 to COBOL85 or the other way around. But this option is not available on the mainframe. Many PC compilers have options like this.

Regards,

Crox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top