MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Relacement of GO TO in COBOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
rnanavaty
Beginner


Joined: 12 Apr 2006
Posts: 29
Topics: 20

PostPosted: Thu May 10, 2007 10:50 pm    Post subject: Relacement of GO TO in COBOL Reply with quote

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
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Thu May 10, 2007 11:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Pudah
Beginner


Joined: 20 Jun 2003
Posts: 27
Topics: 8
Location: East of the Rock, West of the Hard Place

PostPosted: Fri May 25, 2007 12:25 pm    Post subject: Reply with quote

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) Crying or Very sad
Back to top
View user's profile Send private message Send e-mail
DaveyC
Moderator


Joined: 02 Dec 2002
Posts: 151
Topics: 3
Location: Perth, Western Australia

PostPosted: Sat Jun 02, 2007 2:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group