HPE NonStop SQL/MX Error – 13028 Static cursor name cannot be opened because host- variableis out of scope at time of open.

In this blog post, let’s learn about the error message “13028 Static cursor name cannot be opened because host- variableis out of scope at time of open.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

13028 Static cursor name cannot be opened because host- variableis out of scope at time of open.

Reason for the Error

The host-variableyou specified in the declare cursor name could not be used because it was out of scope at the time you attempted to open it.

Solution

Find where the variable is declared and put it into the correct scope