BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
goliPSU
Calcite | Level 5

I have the following commands in SAS:

F_sectors = {'F01000', 'F02000', 'F03000', 'F04000', 'F06C00', 'F06I00','F07C00', 'F07I00', 'F08C00', 'F08I00', 'F09C00', 'F09I00'};

pce_sector = {'F01000'};

and runnig them I get the following error:

124   F_sectors = {'F01000', 'F02000', 'F03000', 'F04000', 'F06C00', 'F06I00','F07C00',

      ---------

      180

124! 'F07I00', 'F08C00', 'F08I00', 'F09C00', 'F09I00'};

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

125

126   pce_sector = {'F01000'};

      ----------

      180

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

1 ACCEPTED SOLUTION

Accepted Solutions
Hutch_sas
SAS Employee

Are these IML statments? Could it be that somehow you are not in IML, that either you have neglected to do a proc iml; statement or maybe you quit the IML proc?

View solution in original post

4 REPLIES 4
ballardw
Super User

Without all of the code it's hard to diagnose but this is a common error if the previous statement does not end with a semicolon or since you have lot's of strings, an unclosed string or possibly unbalance " and ' for a string.

Hutch_sas
SAS Employee

Are these IML statments? Could it be that somehow you are not in IML, that either you have neglected to do a proc iml; statement or maybe you quit the IML proc?

goliPSU
Calcite | Level 5

Thank you very much, that was the issue of not having the IML there.

EyalGonen
Lapis Lazuli | Level 10

You can make this work without explicitly writing PROC IML in your code if you use SAS IML Studio http://support.sas.com/rnd/app/studio/studio.html

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 4 replies
  • 15980 views
  • 0 likes
  • 4 in conversation