Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

FORTRAN to Cobol conversion

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
jatinsaraf2501

New User


Joined: 01 Oct 2009
Posts: 2
Location: US

PostPosted: Thu Sep 27, 2012 6:09 am    Post subject: FORTRAN to Cobol conversion
Reply with quote

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
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8120
Location: East Dubuque, Illinois, USA

PostPosted: Thu Sep 27, 2012 6:32 am    Post subject:
Reply with quote

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
View user's profile Send private message
jatinsaraf2501

New User


Joined: 01 Oct 2009
Posts: 2
Location: US

PostPosted: Thu Sep 27, 2012 7:50 am    Post subject: Reply to: FORTRAN to Cobol conversion
Reply with quote

Thanks. There are certain AFP calls in FORTRAN like AFPINIT. Do you know the equivalent cobol calls?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Thu Sep 27, 2012 8:55 am    Post subject: Reply to: FORTRAN to Cobol conversion
Reply with quote

Since AFPINIT is an external subroutine/function You will have to ask Your peers about it, or read the application documentation.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 964
Location: Richmond, Virginia

PostPosted: Thu Sep 27, 2012 5:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 654
Location: Whitby, ON, Canada

PostPosted: Thu Sep 27, 2012 6:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us