DATA Step, Macro, Functions and more

ERROR NOTE: No observations in data set WORK.NEW.

Reply
Contributor
Posts: 22

ERROR NOTE: No observations in data set WORK.NEW.

[ Edited ]

title 'Indian Currency Format';
libname orion'D:\Workshop\pg1';
Proc format;
Picture indianc
low-high='0,00,00,00,00,00,00,00,000';
run;
data new;
a=100; output;
a=1000; output;
a=10000; output;
a=100000; output;
a=1000000; output;
a=10000000; output;
a=100000000; output;
a=1000000000; output;
a=10000000000; output;
a=100000000000; output;
format a indianc.;
run;

proc print data=new;
run;

 

I'm trying this but it's showing that no obs found. How to fix this error. Kindly update. Thanks!

PROC Star
Posts: 2,375

Re: ERROR NOTE: No observations in data set WORK.NEW.

[ Edited ]

Have you seen the error message in the log?

This works:

 

proc format;
  picture indianc
          low-high='0,00,00,00,00,00,00,000';
run;
data NEW;
  do EXP=1 to 15; 
    A=10**EXP; 
    output;
  end;  
  format a indianc.;
run;

proc print data=NEW noobs;
  var A;
run;

The maximum precision is 16 digits .

 

 

A
10
100
1,000
10,000
1,00,000
10,00,000
1,00,00,000
10,00,00,000
1,00,00,00,000
10,00,00,00,000
1,00,00,00,00,000
10,00,00,00,00,000
1,00,00,00,00,00,000
10,00,00,00,00,00,000
1,00,00,00,00,00,00,000
 
Contributor
Posts: 22

Re: ERROR NOTE: No observations in data set WORK.NEW.

Oh yes! just saw that! thankyou so much
Super User
Posts: 10,283

Re: ERROR NOTE: No observations in data set WORK.NEW.

There's a very big reason why "Read the Log" is Maxim #2 on my list. 90% of newbie's problems can be solved by themselves by just following that.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Ask a Question
Discussion stats
  • 3 replies
  • 282 views
  • 0 likes
  • 3 in conversation