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: 7935
Location: Bellevue, IA

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: 10211
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: 962
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: 642
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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