Hello, I have a problem with one of my macros using SAS 9.22 on Windows 7. I amrunning my programmes on different computers in different directories. ThereforeI wrote a little macro which checks the computer’s hostname and according tothis name assigns my library to a certain directory. I do the following to putthe hostname into a macro variable: FILENAME h PIPE 'hostname'; DATA_NULL_; INFILE h; INPUT; PUT _infile_ ; CALL SYMPUT('current_com',TRIM(LEFT(_infile_))); RUN; This works with Win XP and SAS 9.22. Here is what thelog says: NOTE:The infile H is: Unnamed Pipe Access Device, PROCESS=hostname,RECFM=V,LRECL=256 myhostname NOTE: 1record was read from the infile H. The minimum record length was 10. The maximum record length was 10. NOTE:DATA statement used (Total process time): real time 0.09 seconds user cpu time 0.00 seconds system cpu time 0.00 seconds However, on Windows 7 I obtain: NOTE:The infile H is: Unnamed Pipe Access Device, PROCESS=hostname,RECFM=V,LRECL=256 NOTE: 0records were read from the infile H. NOTE:DATA statement used (Total process time): real time 0.31 seconds cpu time 0.04 seconds So apparently the hostname couldn’t be read. If I type ‘hostname’in the windows console I get the hostname as expected. P.S. I apologise if this isn't the correct forum section. It seems most appropriate
... View more