I want to call a sas program in a SAS/AF frame, I wrote down a program in SAS/AF:
Pushbutton1:
rc=filename(fname,'F:\w1.sas');
rc=preview('include',fname);
submit continue;
endsubmit;
return;
But there are some warning in log:
WARNING: [Line 3] Converting numeric variable fname to character
WARNING: [Line 5] Converting numeric variable fname to character
WARNING: [Line 5] Variable rc is defined but not used
WARNING: [Line 5] Variable fname is uninitialized
NOTE: Code generated for CHESHIDIAOYONG.FRAME. Code size=1010.
I am a beginner.........thanks
I have only a little experience with SCL programming, but the error message seems to say you need to declare FNAME as character.
Also shouldn't you have same actual code in your submit block?
Thanks a lot. but it doesn't work yet after I declare it. the log like this:
NOTE: Compiling CHESHIDIAOYONG.FRAME (SASUSER.EXAMPLE.CHESHIDIAOYONG.SCL).
WARNING: [Line 7] Variable fname is uninitialized
WARNING: [Line 7] Variable rc is defined but not used
NOTE: Code generated for CHESHIDIAOYONG.FRAME. Code size=934.
I believe you either need to previously define variable fname ( fname='myfile'; ) or put quotes around fname [ rc=filename('fname','F:\w1.sas'); ]
http://support.sas.com/documentation/cdl/en/sclref/59578/HTML/default/viewer.htm#a000144251.htm
thanks a lot. it works like this:
Pushbutton1:
submit;
fname='myfile';
rc=filename(fname,'F:\w1.sas');
rc=preview('include',fname);
submit continue;
endsubmit;
return;
How is this different than just coding.
Pushbutton1:
submit;
%include 'F:\w1.sas';
endsubmit;
return;
I am so confused...If I use such program:
Pushbutton1:
submit;
fname='myfile';
rc=filename(fname,'F:\w1.sas');
rc=preview('include',fname);
submit continue;
endsubmit;
return;
Some times it works, some times it doesn't work.
When I use such program:
Pushbutton1:
submit;
%include 'F:\w1.sas';
endsubmit;
return;
After I press Pushbutton1, the results not been shown, and the results will be shown after I closed the frame. What is wron?
If I want to know whether the 'w1.sas' was finished, what shoud I do?
Thanks a lot!
I'm so confused....when I run the programm after several days, it doesn't work! Who can tell me what's wrong????
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.