Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which language would you port COBOL programs to and why? [closed]

When selecting a language to port COBOL programs from what language would you chose and why? I am not looking for the answer "because I am familiar with language X".

I am looking for features in a language that map well to COBOL's design.

Update: The programs would run the gammit to utilities, data processing, screens, etc.

like image 961
ojblass Avatar asked Nov 29 '22 20:11

ojblass


1 Answers

I would port them to ... um ... COBOL. Yes, that's it. COBOL.

Sorry, couldn't resist.

Seriously, there are COBOL compilers for current platforms out there and, unless we know a little more about why the code has to be ported, we may not be able to help.

Is the platform on which it runs obsolete? Is management just pushing for a more 'modern' solution? Are you having to move stuff from System z to Windows (ugh!)?

COBOL (in its purest form, not that OO-COBOL rubbish) is mostly a simple procedural language (ReportWriter notwithstanding) so will translate to any of the other procedural languges fairly well:

  • C.
  • C++ without classes
  • Java, although you can't avoid classes unless you have one big honkin' singleton.
  • Pascal (swapping one 'dead' language for another).
  • even Python, Perl et al can be made to work.
like image 131
paxdiablo Avatar answered Dec 05 '22 04:12

paxdiablo