Use PIPE. You might not get an error code, but you can read the messages that the command sends to the console.
data _null_;
infile "d:\temp\python\getdata.py. -c 9999. -l &location. -start &startdate. -base 9999-000 2>&1" pipe ;
input;
put _infile_;
run;
PS Do you really have a filename with two periods in it? getdata.py. ?
... View more