by Robert Sample » Tue Apr 07, 2015 8:35 am
While it is not necessarily a bad thing to put explicit lengths on your instructions, your ZAP $TSHIP instructions in lines 134 and 137 USE THE WRONG LENGTH. Each of them output a 4-byte packed decimal $TSHIP variable. Since $TSHIP is only defined as 2 bytes, what happens? The 3rd and 4th bytes are stored immediately after $TSHIP. Line 141 where you ZAP $TTOTAL then destroys the shipping charge value since the 2 bytes after $TSHIP are the first 2 bytes of $TTOTAL. The net result is your shipping charges are zero for every record.
And I don't understand what you mean by "my total is not printing in the correction location". Based upon the code you have, the values being printed are perfectly correct. The trailing 5 is being printed because Assist initialized memory for you and you did not define 133 bytes after PLINE even though you print 133 bytes -- hence you get unused memory locations printing. And $TTOTAL is defined as PL5 which means your edit mask needs 9 digits to print correctly -- and you did not define 9 digits in your edit mask.
And, also, you did not copy and paste my code correctly -- your code will add 1 to NONOSHIP no matter what the shipping charges are. Details are critically important in IT (even more so in Assembler) and you have shown a distressing lack of concern about those details -- you have been told repeatedly about errors in your code and calculations yet those errors are still present in your code. You need to go back to the very first post in this thread and re-read every post ensuring as you do that any recommended changes have been made in your code.
I believe it is time for you to polish off the rest of the code yourself -- there's not much left to be done and if you pay attention to the details you should be able to get a complete, working program within an hour or two. If you don't pay attention to the details, you will NEVER get a working program done.