using GNUCobol to convert systems writtrn in cobol to C using GNUCobol to convert systems writtrn in cobol to C whoyou (Programmer) (OP) 6 Jan 22 18:32 Hi, Just wondering if using the C code that GNUCobol compiles to would it be possible to convert COBOL programes/systems to C? If so you can put all us old Cobblers out to pasture! RE: using GNUCobol to convert systems writtrn in cobol to C SamBones (Programmer) 7 Jan 22 17:10 Possible? Yes. A good idea? No. If you've ever looked at the generated C code, it's not tight and concise code. It's generated code that has a lot of added bloat to allow it to mimic how a running COBOL program acts. It also was never intended to be used as a language converter, except to get the code past a C compiler, so it's not very human friendly code. Because of these reasons, yes it will create some C code that mirrors the function of the COBOL program, but it will be an impossible to maintain and enhance pile of fairly ambiguous C. If you were needing to move your code base from COBOL to C, I would get some programmers that are fluent in both. They do exist. Look for grey hair and wrinkles. RE: using GNUCobol to convert systems writtrn in cobol to C whoyou (Programmer) (OP) 7 Jan 22 23:39 Thanks for your reply Sam, makes sense. Can I use GNUCobol to develop / maintain cobol programs running on mainframes? RE: using GNUCobol to convert systems writtrn in cobol to C SamBones (Programmer) 10 Jan 22 16:33 "Can"?!? Again, yes you can. Should you? Probably not. GnuCOBOL translates the COBOL source to C, then runs it through the Gnu C compiler. I believe the only "mainframe" that the Gnu C compiler can target is an IBM 390 running Linux. I don't think it can natively target a non-Linux OS except for Windows or Mac OS/X. I could be wrong, but I wouldn't mix environments. In general, you should always develop and maintain code on the same architecture as your production environment. If you are programming for a mainframe, you should be using a native compiler for that HW/OS combination. That will save you many headaches and huge expense in the long run. There is a GnuCOBOL FAQ that explains a lot about it.