Please have a look at the following forum posts
https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/td-p/203999
https://communities.sas.com/t5/SAS-Programming/ERROR-180-322-Statement-is-not-valid-or-it-is-used-out-of-proper/td-p/584360
And make sure you checked for what @ballardw has said in his post.
... View more