Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 8165
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: 10327
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: 965
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: 658
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us