Hi There, I'm trying to read some files stored in a Mainframe from a HP-UX server using filename ftp. The code i'm using is the following: filename ftpcom "/home/saswsp/ftpcmd"; data _null_; file ftpcom; put "user XXXXXX YYYYYYYY"; put 'prom no'; put 'bin'; put "ls LOG*"; stop; run; filename doftp pipe "ftp -n 172.20.1.5 < /home/saswsp/ftpcmd"; data a; infile doftp; input; input=_infile_; if index(input,'LOG'); file=substr(input,index(input,'LOG')); call symput ('ficheiro',compress(file)); run; filename test1 ftp "'U36497.&ficheiro'" HOST='172.20.1.5' USER='XXXXXX' pass='YYYYYYYY' s370v RCMD='site rdw'; data _null_; call execute ('data a;infile TEST1;'); call execute ('input @1 log_data_criacao $ebcdic26. @27 log_ambiente $ebcdic8. @35 log_tabela $ebcdic18. @53 log_chave_registo $ebcdic12. @65 log_tipo_instrucao $ebcdic2.'); call execute (';run;'); run; For some reason i can't yet understand i can't read any records and i get a note where it seems that the file is unavailable for read. NOTE: 220-FTPD1 IBM FTP CS V1R11 at MG1D, 18:51:29 on 2012-03-23. NOTE: User U36497 has connected to FTP server on Host . NOTE: The infile TEST1 is: Filename='U36497.LOGM.D120322.T104320.LLOG.DATA', Pathname= "'U36497.'" is working directory, Local Host Name=huxsasddsd1, Local Host IP addr=10.203.22.12, Service Hostname Name=N/A, Service IP addr=172.20.1.5,Service Name=FTP, Service Portno=21,Lrecl=256,Recfm=S370V 3 The SAS System 18:40 Friday, March 23, 2012 NOTE: <<< 450 Data set U36497.LOGM.D120322.T104320.LLOG.DATA is allocated to another job and is unavailable for RETR command. NOTE: 0 records were read from the infile TEST1. NOTE: The data set WORK.A has 0 observations and 5 variables. NOTE: DATA statement used (Total process time): real time 0.23 seconds cpu time 0.01 seconds I've talked to the person who produced this file and she ensured me that the file wasn't being used by anyone. I tried to read other files from the Mainframe and the same problem happens. Any idea on how to overcome this? Regards.
... View more