4

This question, https://stackoverflow.com/q/26912463/1927206, is resolved by fixing two typos, the value tested for termination of loops was written in uppercase, but the value inserted to mark the last entry was in mixed-case. The last entry was also output to the file in error in another location.

However, the program itself needs a lot of work.

The coding of the solution chosen can be improved on (better use of names, types), improved upon by reversing the driving table, and perhaps completely re-written with a sequential matching algorithm (two file match) if that is appropriate to the task.

Getting all the required information from the OP would be discursive at best, which doesn't fit with the Q&A, and would also presume that the OP attends before asking another question.

OP has also posted an answer revealing the second issue (not included in the code in the question).

So, do I write an answer: suggesting improvement to the existing code?; suggesting a better implementation of the chosen solution?; suggesting a re-write, which may not fit with OP's situation?

Or vote to close, flag the answer as Not An Answer (that'll be fun getting it accepted) and hope the thing gets deleted?; or something else?

9
  • does this In my Main Section I was also performing 'write-mismtch' s read as needed code to answer was not shown?. I'm not familiar with cobol.
    – bummi
    Commented Nov 13, 2014 at 18:35
  • @bummi It is a statement of the direct answer to the question (why am I getting the final entry written when I have code to exclude it?). The answer was "because I wrote it out in a completely different part of the program, in error". Commented Nov 13, 2014 at 18:38
  • so one close reason could be ... must include ....?
    – bummi
    Commented Nov 13, 2014 at 18:40
  • I would write an answer that solves the current problem and provide guidance for further improvement but don't rewrite...
    – rene
    Commented Nov 13, 2014 at 18:42
  • @rene Thanks. Problem is, horrible method, dressed-up nicely to look useful. Thus I'm torn. Look, it takes up to 65k things and matches them to up to 10k things. At least if it took the 10k things and matched them to the 65k it would be a bit better. But then still the wrong way to do it, so still don't like leaving code like that lying around. Commented Nov 13, 2014 at 18:45
  • I see it has attracted a close vote already. Perhaps given the issues OP will come back with another question, and address it then. But to close, I'd like that not-really-an-answer-but-an-answer gone, so the question disappears. Commented Nov 13, 2014 at 18:48
  • @bummi apologies, reposting to avoid the unfortunate typo on your username: Yes. The actual problem is in code which was not shown. An unrevealed problem is with the upper/mixed case. The rest of the code is obscure through names, backwards, (very) inefficient... Commented Nov 13, 2014 at 18:49
  • OK. Going with close. I shouldn't get so concerned :-) Commented Nov 13, 2014 at 19:36
  • It's closed, thanks for the assistance. Also picked up a useful comment on the OP's answer, and OP has even been back to see it. Commented Nov 13, 2014 at 22:30

0

You must log in to answer this question.

Browse other questions tagged .