HPE NonStop SQL/MX Error – 13522 DECLARE SECTION cannot be nested.

In this blog post, let’s learn about the error message “13522 DECLARE SECTION cannot be nested.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.

Error Message

13522 DECLARE SECTION cannot be nested.

Reason for the Error

You specified the DECLARE SECTION as nested code.

Solution

Correct the syntax and resubmit