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

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 12
Accepted Solution

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

Hello,

 

I am new to SAS and have been trying to run a test code on TSO (the code below). I recevied the Error 180-322 under Lines 1 and 10 and could not find out what was wrong with them. This is quite an urgent matter and it is greatly appreciated if I can receive some help soon.

 

00001 //NGUYEVE1 JOB (XXXX),'XXXX',MSGCLASS=X,CLASS=E,         

00002 //         PRTY=3,NOTIFY=XXXX,TIME=NOLIMIT                     

00003 //STEP00  EXEC PAPCRMS,TYPRUN='P'                                

00004 //DANFILE EXEC SAS                                               

00005 //WORK DD UNIT=(DISK,4),SPACE=(CYL,(2000,1000),RLSE)         

00006 //SASAUTOS DD DSN=UCLN23.FSDU.XTRACMAC,DISP=SHR

00009 //NONP1612 DD DSN=RIRU.SONGK3.TDFS.NONPRIME.LON.V1612,DISP=SHR

00010 //SYSIN DD *                                                    

00011 DATA NONPRIME;                                                      

00012 SET NONP1612.RBVFCL;                                               

00013 PROC PRINT DATA=NONPRIME (obs=10);                                 

00014 RUN;       


Accepted Solutions
Solution
‎01-26-2017 01:53 PM
Valued Guide
Posts: 2,174

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

SAS is treating the jcl as if it is SAS code.
If you expect to submit interactively, remove the jcl.

Or find the way to submit it as a batch job

View solution in original post


All Replies
Grand Advisor
Posts: 17,420

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

You should include the log

Occasional Contributor
Posts: 12

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

Hello,

 

Please see the log in the attachment.

 

Thank you

Grand Advisor
Posts: 10,235

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

Also paste the LOG into a code box opened with the forum {i} icon. That error message typically places and underscore in the code where there is an issue. Pasting the log into the code box preserves formatting so we see where that underscore actually occurs that will be removed by the forum if pasted into the body of message as your code example.

 

And possibly code previously submitted.

Your comment about line 1 and 10 makes me suspect that for some reason the JCL isn't being recognized. Did you submit this interactively (within a SAS session) or as a batch job?

Occasional Contributor
Posts: 12

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

Hello,

 

I submmitted the job in ISPF editor. I hope I copied the log correctly for you. In the case the JCL is not recognized, could it be because of the information i provided in the job card (the Account ID etc)?

                                                                              
 1    //NGUYEVE1 JOB (XXXX),'XXXX',MSGCLASS=X,CLASS=E,                
      --                                                                      
      180                                                                     
 ERROR 180-322: Statement is not valid or it is used out of proper order.     
                                                                              
 2    //         PRTY=3,NOTIFY=XXXX,TIME=NOLIMIT                           
 3    //STEP00  EXEC PAPCRMS,TYPRUN='P'                                       
 4    //DANFILE EXEC SAS                                                      
 5    //WORK DD UNIT=(DISK,4),SPACE=(CYL,(2000,1000),RLSE)                    
 6    //SASAUTOS DD DSN=UCLN23.FSDU.XTRACMAC,DISP=SHR
                                                                              
 7    //NONP1612 DD DSN=RIRU.SONGK3.TDFS.NONPRIME.LON.V1612,DISP=SHR          
 8    //SYSIN DD *                                                            
 9    DATA NONPRIME;                                                          
                                                                              
 10   SET NONP1612.RBVFCL;                                                    
      ---                                                                     
      180                                                                     
                                                                              
 ERROR 180-322: Statement is not valid or it is used out of proper order.     
                                                                              
                                                                              
 11   PROC PRINT DATA=NONPRIME (obs=10);                                      
 ERROR: File WORK.NONPRIME.DATA does not exist.                               
 12   RUN;                                                                    
                                                                              
 NOTE: The SAS System stopped processing this step because of errors.         
 NOTE: The PROCEDURE PRINT used 0.01 CPU seconds and 22181K.                  
                                                                              
 NOTE: The address space has used a maximum of 996K below the line and        
       24564K above the line.                                                 
                                                                                      
Solution
‎01-26-2017 01:53 PM
Valued Guide
Posts: 2,174

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

SAS is treating the jcl as if it is SAS code.
If you expect to submit interactively, remove the jcl.

Or find the way to submit it as a batch job
Occasional Contributor
Posts: 12

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

Thank you. I believe this is the answer. Essentially I need to submit the job the right way.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 144 views
  • 1 like
  • 4 in conversation