View previous topic :: View next topic
|
Author |
Message |
jatinsaraf2501
New User
Joined: 01 Oct 2009 Posts: 2 Location: US
|
|
|
|
Hi,
We want to convert a couple of FORTRAN programs to Cobol. Can you please suggest ways to do that? I see that tools like Prism CS, Datatek can do that but is it possible without a tool? If not, any recommendations on a tool would be helpful.
Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
FORTRAN REAL variables become COBOL COMP-1, DOUBLE variables become COMP-2, CHARACTER variables become PIC X, and INTEGER variables become PIC S9(09) COMP-5. If you have other variable types, you'd have to look at what to convert them to in COBOL.
As long as you replicate the FORTRAN logic in the COBOL code, the conversion should be pretty straightforward. I've never done such a conversion with a tool, so I don't know anything about conversion tools. |
|
Back to top |
|
|
jatinsaraf2501
New User
Joined: 01 Oct 2009 Posts: 2 Location: US
|
|
|
|
Thanks. There are certain AFP calls in FORTRAN like AFPINIT. Do you know the equivalent cobol calls? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Since AFPINIT is an external subroutine/function You will have to ask Your peers about it, or read the application documentation. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
You say 2 programs - how big?
If not too big, I would think a manual conversion would be easier/safer/quicker/cheaper/morefun than finding a tool.
If you do not know both languages, it would not be hard to find someone who does, but don't wait much more than 10 years. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
Phrzby Phil wrote: |
If you do not know both languages, it would not be hard to find someone who does, but don't wait much more than 10 years. |
Not so sure about that. My 26 year old son, in the course of his Engineering studies, had to learn enough Fortran to understand how to use a large library of pre-existing functions. To help him, I dug up one of the textbooks that *I* used in university back in the 1970s. |
|
Back to top |
|
|
|