On 12/9/2011 10:53 AM, Steve Comstock wrote:
I disagree. Why test a flag after every GET? QSAM essentially
does that for you and branches you to EODAD automatically; if
you find yourself in your EODAD routine you know you're ready
for the next phase of your processing, which might be just
shutting down (CLOSE and RETURN), but it might be more complex,
such as taking subtotals, CLOSE-ing one file and OPEN-ing
another, etc.
But to add the overhead of test-and-branch after every GET is
totally unnecessary.
If you're using unlike concatenation, a test after each GET is
mandatory to avoid processing a garbage record. Adding a flag
for EOD would change the overhead from a two to a three way
branch, and wouldn't be noticeable. But then I'm amazed by how
few programmers make life easier for the users by supporting
unlike concatenation.
Gerhard Postpischil
Bradford, VT