08-01-2014 06:12 AM
Hi, i've a problem with sas ue, i can't see the output of macro that i'm using. i'm using this command for import the file:
%macro glimmix_rasch (path='/folders/myfolders', datafile=filename.txt, idlen=2, itmstart=3, nitms=10 );
I've alredy read the different topic on this forum but i can't resolve the problem. Can you help me?
08-01-2014 07:02 PM
I don't see a "command" to import a file. I see an invocation of a SAS macro program called %macro glimmix_rasch and without knowing WHAT type of code is being generated by this macro program (as I explained before), it is hard to know whether anything is correct. If, for example, your generated code is supposed to import a DATAFILE, then in your /folders/myfolders location, I would expect to see a file called FILENAME.TXT -- but I can't tell whether FILENAME.TXT is being read from or written to. So I cannot answer your question. That's why I recommended that you work with Tech Support.
DATAFILE= happens to be an option that you use in PROC IMPORT, so I find it confusing for DATAFILE= to be used as a macro parameter in the macro invocation statement. Based on what you have shown, I would expect someplace in the macro program to see this: &path/&datafile perhaps in an INFILE statement or to see this: datafile="&path/&datafile" in code. But, as I said, that is just speculation and really not useful. Again, I recommend that you work with Tech Support.
08-01-2014 07:54 PM
Is this the macro you're referring to:
If so try running each step without the macro and see what happens. You can do that by first creating each macro variable and then running the program step by step rather than by invoking the macro.
i.e. does the following work? Right off the bat, I can see that you have quotations in your path macro variable which would cause it to not work. They have sample data and output and I would start with that. Pay close attention to how they called the macro, no spaces or quotation marks in the macro variables. Anyways, go through step by step like that and see if you can get it working.
infile "&path\&datafile" end = last;
input person $ 1-&idlen @&itmstart (i01 - i&nitms) (1.);
person = RIGHT(person);
if last then call symputx('nperson',_n_);
08-02-2014 11:46 AM
Reeza is correct that you will need to be sure that your %LET statements are declared correctly. Also note that the "Windows slash" \ will not work in your path on the University Edition and so, you will need to "flip the slash" to be a "Unix slash" or / in the INFILE statement.
Also, that means you should NOT pre-quote your path in the macro invocation. You show quotes around the value for PATH= and I believe that putting quotes there will cause you further problems. The quotes belong to the INFILE statement and they are there in the program. The quotes do NOT belong in the invocation where you supply the text string to use for &PATH.
08-05-2014 04:40 AM
Thanks Cynthia! now the software work , but when i do a simulation with a little number of observations , it work very well, but with the real data ( whit 25509 observations) it doesn't work, remain "in esecution" for a long time. What is the problem? Thanks for all!