From: Renata Matos on
Here's what I'm trying to do:



%macro amostra(banco,quantidade,tamanho);

proc surveyselect data=3D&banco out=3Damostra rep=3D&quantidade =
sampsize=3D&tamanho noprint;

run;

proc print data=3Damostra;

run;

%mend amostra;



%macro teste(banco,k);

%nobscat(&banco);

proc iml;

/* #observations */

use nobs;

read all into n;

close nobs;

print n;

/* samples*/

ji=3D0.1*(n/&k);

js=3D0.5*(n/&k);

quantidade=3Dint((ji+js)/2)+1;

print ji js quantidade;

/* HERE'S THE PROBLEM! */

%amostra(&banco,quantidade,5);

%mend teste;



%teste(refin,2);

run;

quit;



Here's the Log:

NOTE: Line generated by the invoked macro "AMOSTRA".

1 proc surveyselect data=3D&banco out=3Damostra rep=3D&quantidade =
sampsize=3D&tamanho noprint;

--------

202

1 ! run; proc print data=3Damostra; run;

ERROR 202-322: The option or parameter is not recognized and will be =
ignored.

NOTE: Line generated by the macro variable "QUANTIDADE".

1 quantidade

----------

22

ERROR 22-322: Expecting an integer constant.

Thanks for any help.

Renata Matos