Skip to main content

NullReference exception.

  • May 17, 2017
  • 2 replies
  • 0 views

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!                           
                    

2 replies

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

Chris Glazier
Forum|alt.badge.img+2
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.