View previous topic :: View next topic |
Author |
Message |
rnanavaty Beginner
Joined: 12 Apr 2006 Posts: 29 Topics: 20
|
Posted: Thu May 10, 2007 10:50 pm Post subject: Relacement of GO TO in COBOL |
|
|
I am working on a project which converts assembler code to COBOL. As its a reengineering project, we don't have functionality details of the program.
How can we replace B (unconditional branch) instruction i assembler to COBBOL without using "GO TO"? |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu May 10, 2007 11:16 pm Post subject: |
|
|
Unless the reason to do this project is to simplify an already small program that uses lots of system calls (SVCs, I/O, etc) and the preference is to use high level language or LE functions for the same things, I'd say that the whole project doesn't make any sense. Why would you want to replace working, presumably efficient code with a bunch of high-level, probably unreadable junk that is 'designed' to mimic a system without any knowledge of what that system does? And it the answer can not be 'because no one knows assembler' because this project could not be done except by people who do know assembler -- and know it very well!
Unless you have a complete analysis of the system - and I mean complete to the point where you fully understand the relationships between every section of the program, the functions, flow, side-effects, bugs, dependencies, and external influences -- in other words, unless you can represent these programs as metadata similar to what an optimizing compiler would have if it was generating these programs, then the whole effort is folly.
But to answer your question... there is no answer to such an open ended question. Is that branch part of an iterative section? Then a PERFORM might work. Is it part of a branch table? Then it is probably an EVALUATE. Maybe it is part of a string manipulation and the whole section should be replaced by a built in function. Or it could be part of an internal or external subroutine call. Or maybe it is just a branch to who knows where... a GO TO.
I think that if you have the option, getting a job with a company that "has a clue" might be your best option. |
|
Back to top |
|
 |
Pudah Beginner
Joined: 20 Jun 2003 Posts: 27 Topics: 8 Location: East of the Rock, West of the Hard Place
|
Posted: Fri May 25, 2007 12:25 pm Post subject: |
|
|
Quote: | ...then the whole effort is folly. |
I wish I was articulate enough to explain this convincingly to the mgmt where I work as they are embarking on a similar misadventure (I wonder if rnanavaty and I are working for the same company)  |
|
Back to top |
|
 |
DaveyC Moderator

Joined: 02 Dec 2002 Posts: 151 Topics: 3 Location: Perth, Western Australia
|
Posted: Sat Jun 02, 2007 2:01 am Post subject: |
|
|
Quote: | And it the answer can not be 'because no one knows assembler' because this project could not be done except by people who do know assembler -- and know it very well!
|
I agree, but a lot of shops I've worked in don't like assembler for exactly that reason, no skills. The irony is it needs skills to convert it so why bother... _________________ Dave Crayford |
|
Back to top |
|
 |
|
|