When given an error code by the controller (DX100, in this case) generally there's an output for the location where the error occurred. L:#### where # is the number or whatever.
I've found this at times somewhat inaccurate or hard to locate, in some cases it absolutely nails it and in others it lands on what generally turns out to be an innocent line of code close to the problem, and in others like my current situation, it's baffling - the line its suggesting doesn't exist (it's a few dozen past the END statement.)
So my question is - how does the program counter work? What does it count, what does it ignore, does it go into calls of subroutines/jobs and count those too? I'm relatively certain it starts at the NOP command, yes? I would assume at 0 or 1 and go from there. But this job is throwing an error at L:0641, my NOP statement is at 691... So via some absurdly complicated math I did, I deduced that the error should be at 1332... correct?
My END statement, though - it is at 1271.
As I said, I've had smaller versions of this problem before, but have always been able to locate the offending line. But after clearing multiple syntax errors and other quirks of our OLP's postprocessing routine - I'm getting a 3190 thrown at me, which according to the docus says It's an Error in Job Data Record - 'Record on the position data section is wrong for the format' ...wait, it's counting the lines that come before NOP now, isn't it - that literally just clicked as I was typing this. I wonder if this is true for all 3190 codes?
I am still curious as to how the counting works, as other numbers have been off. Does it count commented lines, for instance?