|
SAS online.doc:
Example 7: Importing a Transport Data Set
This example uses the CIMPORT procedure to import a transport data set from
a host named myshost1for user calvin. The new data set will reside locally
in the SASUSER library. Note that user and password can be SAS macro
variables. If you specify a fully qualified data set name, then use double
quotation marks and single quotation marks. Otherwise, the system will
append the profile prefix to the name that you specify.
%let user=calvin;
%let pw=xxxxx;
filename inp ftp "'calvin.mat1.cpo'" user="&user"
pass="&pw" rcmd='binary'
host='mvshost1';
proc cimport library=sasuser infile=inp;
run;
Paul Choate
DDS Data Extraction
(916) 654-2160
-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Basem
Sent: Thursday, November 18, 2004 9:58 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Reading file from Mainframe
Dear All,
1- I create a SAS dataset in Mainframe which I need to use in SAS PC,
so I use the following code to convert the data set to transport form
----------------------------------------------------------------------
//STEP02 EXEC SAS
//TRANLIB DD DSN=TSA3.A3BT.HELO.OUT10,
// DISP=(NEW,CATLG,DELETE),
// UNIT=TSO,SPACE=(29648,(5000,1000),RLSE)
//SASDATA DD DSN=TSA3.A3BT.DEL.KDWN10,DISP=SHR
//SYSIN DD *
LIBNAME tranlib XPORT ;
PROC COPY IN=sasdata OUT=tranlib ;
----------------------------------------------------------------------
2- Then I use FTP utility to transfer the result file to PC.
WHAT i want to do is to NOT using the FTP ustility, but rather make
SAS (or even JCL) do that, the idea that I got is transfering the file
using PC SAS as follows
Filename calltyp "E:\HELO.DAT";
Run;
;
FILENAME sasdata ftp "'TSA3.A3BT.HELO.OUT10'"
user='user_name' pass="xxxx"
host='ip_address'
rcmd='binary';
Data _null_;
file calltyp;
infile sasdata;
input;
put _infile_;
Run;
LIBNAME kd 'PC directory';
LIBNAME tranlib XPORT "E:\HELO.DAT" ;
PROC COPY IN=tranlib OUT=kd ;
SELECT HELOUSG;
RUN;
but I got the following error:
NOTE: Input library TRANLIB is sequential.
ERROR: File TRANLIB.ALL. is not a SAS data set.
NOTE: Statements not processed because of errors noted above.
NOTE: PROCEDURE COPY used:
real time 0.03 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.
Any idea how to solve that?
|