07-07-2014 06:34 PM
Hello everyone, I was trying to figure out how to create a user prompted script, and I stumbled upon the following data step.
data _null_;
vbscript=catx('\',pathname('WORK'),'example.vbs');
filvar=vbscript;
file vbs filevar=filvar lrecl=2000;
put
"Replace with the example VBScripts below";
filvar = catx('\',pathname('WORK'),'dummyFile.txt');
file vbs filevar=filvar;
runvb = 'cscript //nologo '||quote(vbscript);
infile retval pipe filevar=runvb lrecl=32000 end=eof;
input;
call symputx("parameter1", scan(_INFILE_,1,"<delimiter>"));
run;
However I am working on a windows machine, and it seems to have a problem with the "INFILE PIPE" section. I get an error in the log saying "option Pipe is not known for infile".
Does anyone know how to re-write this above step to work with windows? admittedly I don't understand it at all so I honestly am not sure how to alter it.
Thanks very much!
07-07-2014 08:00 PM
HI:
It might be easier to use a prompt variable inside Enterprise Guide, by putting your user-prompted value inside a macro variable and then defining the macro variable as a prompt in an EG project. Or, perhaps the author of the program could help you figure out how to modify the code.
cynthia
07-07-2014 08:00 PM
HI:
It might be easier to use a prompt variable inside Enterprise Guide, by putting your user-prompted value inside a macro variable and then defining the macro variable as a prompt in an EG project. Or, perhaps the author of the program could help you figure out how to modify the code.
cynthia
07-08-2014 09:39 AM
Hiya Cynthia! Thanks for your help. I actually pulled the code off of a pdf "how to guide", so maybe I can try to email the author and see if he responds, I will look into that!
For the other point, we don't have enterprise guide. We only have base sas (or if we do have enterprise guide I am not aware of it or where I would run it from.... But i've never been trained on it so i'll look into it more!).
Thanks!
07-08-2014 11:16 AM
Though it seems to have dropped in use, base SAS has a limited ability to display and ask for limited text input via the WINDOW or %WINDOW functionallity. If you only have a couple of items to input this may be an option.
Need further help from the community? Please ask a new question.