'ERROR 180-322: Statement is not valid or it is used out of proper order' when executing SAS PROC statements in Z/OS batch mode

Reply
N/A
Posts: 1

'ERROR 180-322: Statement is not valid or it is used out of proper order' when executing SAS PROC statements in Z/OS batch mode

Hello All,

I am new to SAS, I am learning SAS for a new requirement in the project.Our shop uses SAS 9.2 TS2M3 for ZOS. I am facing this error when I run SAS programs in mainframe ZOS environment in batch mode with PROC statements. This same piece of program runs good when I execute through TSO SAS facility. Kindly suggest what I am missing here or way to trace the PROC to find the root issue. Below is the snippet of my batch code.

//STEP1   EXEC SAS

//SYSIN    DD  *

DATA  SAS1;

           X=1;

RUN;

PROC PRINT DATA=SAS1;

RUN;

/*

The SASLOG says below error in PROC PRINT statement,it doesn't say any specific problem.

'ERROR 180-322: Statement is not valid or it is used out of proper order.'

Thanks in advance

Super User
Posts: 5,509

Re: 'ERROR 180-322: Statement is not valid or it is used out of proper order' when executing SAS PROC statements in Z/OS batch mode

It doesn't look like anything is wrong with your code.

That sort of general error message is SAS's way of saying that something is wrong but it can't tell you what the problem is.

Have you checked for operating system quirks?  For example, if you look to the right on each line of the program, has the system added a line number in columns 73-80?

Ask a Question
Discussion stats
  • 1 reply
  • 2063 views
  • 0 likes
  • 2 in conversation