BookmarkSubscribeRSS Feed
pjaiprak
Calcite | Level 5
Hello all,

I am using SAS version 9.2 TS2 M3 & have a small question about the
following proc IML code.

proc iml;
do i=1 to 4;
print i;
do j=1 to 4;
print j;
end;
end;
quit;

When I run this code, the log file (see below) doesnt show the 'quit'
part, even though I submitted the entire code. The Editor window shows "Filename* PROC IML running".Submitting any additional code gives the following message:
"IML is currently suspended. To resume processing submitted statements
return to the Output window and enter either BOTTOM; FORWARD or END."

388 proc iml;
NOTE: IML Ready
389 do i=1 to 4;
390 print i;
391 do j=1 to 4;
392 print j;
393 end;
394 end;

I have to explicitly enter an 'end' in command bar of Output window, after which the
following lines appear in the log file
395 quit;
NOTE: Exiting IML.
NOTE: PROCEDURE IML used (Total process time):
real time 23.03 seconds
cpu time 0.39 seconds


I have figured that it has something to do with the presence of 2 do
loops within each other.It works fine if I remove the 2nd do loop
(indexed by j).

Could someone please explain why this is happening & how I can correct
it?

Thanks in advance,
Puneet
3 REPLIES 3
Hutch_sas
SAS Employee
I don't seem to be able to re-create your problem. From your explanation of what happened, it appears that something is happening in the SAS system to cause IML to suspend processing. I recommend you contact SAS Technical Support.
pjaiprak
Calcite | Level 5
Thank you for the reply. The problem is specific to my installation. A friend ran the code on his machine & he didnt run into this problem either. I have contacted SAS Tech Support.
pjaiprak
Calcite | Level 5
Just heard from the Tech Support. The solution is at http://support.sas.com/kb/3/625.html and resolves the problem. Thanks for suggesting...

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

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