07-22-2015 05:35 AM
I'm trying to submit this code
put @5 "input x?:";
And this is what I get
********/********/********/******> input x?:
ksh: 3: not found
 + Stopped (SIGTTIN) sas test1.sas &
Can't figure out where I'm going wrong?
07-22-2015 08:00 AM
What is stdout and stdin defined as? There should be filerefs:
fileref stdin "c:\abcd.txt";
Next, why are you tring to put a string ""? Do you want to read from stdin and write to stdout? If so:
fileref stdin "c:\abc.txt";
fileref stdout "c:\def.txt";
input x $;
put @5 x;
07-24-2015 07:51 AM
Base SAS doesn't have any particularly good wasy of getting user input, you could look at prco window, or there is this (haven't used it myself):
07-28-2015 03:56 AM
I'm very new to UNIX
I don't think %window or window will work with SAS in UNIX.
put @5 "Do you want to print and email the tracker(Y/N)?:";
I need help with this. Will this work in UNIX?
07-28-2015 06:25 AM
Works for me. I would separate the writing and the reading as two steps to eliminate any timing issues.
put "Do you want to print and email the tracker(Y/N)?:";
input ans $ ;
put ans= ;
Do you want to print and email the tracker(Y/N)?:
07-28-2015 07:06 AM
If you already run this from the commandline (batch mode), I'd suggest to handle the input in a shell script (with the read command) and supply the values to the SAS program via environment variables or the -sysparm commandline option (SAS(R) 9.2 Macro Language: Reference).
Base SAS is not really good at being interactive.