Skip to main content
I have the fields 01  prefix-error-status      pic 9.  and the statement  move ls-status-ok to ls-error-status. This code gives me a NullReference exception
unhandled.                     78  prefix-status-OK     value 0.

What is going on here? It happens in the run of the code; program compiles fine with no errors!                           
                    
I have the fields 01  prefix-error-status      pic 9.  and the statement  move ls-status-ok to ls-error-status. This code gives me a NullReference exception
unhandled.                     78  prefix-status-OK     value 0.

What is going on here? It happens in the run of the code; program compiles fine with no errors!                           
                    
P.S ls-status-ok = 0; ls-error-status = null

I have the fields 01  prefix-error-status      pic 9.  and the statement  move ls-status-ok to ls-error-status. This code gives me a NullReference exception
unhandled.                     78  prefix-status-OK     value 0.

What is going on here? It happens in the run of the code; program compiles fine with no errors!                           
                    
Your move statement is move ls-status-ok to ls-error-status
how and where is ls-error-status defined? If it is in the linkage section then it would need to be passed in to the program from the calling program.