Usage Note 22689: Do you have any examples of reading/unpacking a transport file containing SAS data sets from another operating system on MVS/TSO?
In Examples 1-4, we are assuming that the transport file was made by PROC COPY or a DATA step with the XPORT engine or PROC COPY with the SASV5XPT engine or PROC XCOPY.
Note:
PROC CIMPORT cannot read or process a transport file made by PROC COPY or a DATA step with the XPORT engine or PROC COPY with the SASV5XPT engine or PROC XCOPY.
- Example 1:
- The program copies and imports a transport file from tape. The job copies all SAS data sets, except DEPT10 and DEPT12, from the transport file to the library
referenced by the libref NEW. Again, note the DCB characteristics that are used for the TRAN on TAPE.
//EXAMP1 JOB (,X101),'SMITH,B.',TIME=(0,5)
// EXEC SAS
//TRAN DD DISP=OLD,UNIT=TAPE,
// VOL=SER=TRAN02,LABEL=(1,NL),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//NEW DD DSN=ACTXYZ.EMPLOYEE.SASDATA,
// DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(TRK,(20,5))
//SYSIN DD *
libname tran xport;
proc copy in=tran out=new;
exclude dept10 dept12;
run;
/*
- Example 2:
- In this example, we are reading a transport file on disk and creating a SAS data library on disk. All the SAS data sets in the transport file (referenced
by the DD RECEIVE) are copied to the new SAS data library (referenced by the DD SASDATA). The LIBNAME statement is required to specify that the XPORT engine is to be used to
read the transport file. The XPORT engine is a special set of input/output routines needed to read a tranport file made with PROC COPY and the XPORT engine (Release
6.06 or higher).
//EXAMP2 JOB (,X101),'NICHOLS,M.',TIME=(0,5)
// EXEC SAS
//SASDATA DD DSN=TECH.CUST.DATA,DISP=(NEW,CATLG),
// DCB=(LRECL=23040,BLKSIZE=23040,RECFM=FS,DSORG=PS),
// SPACE=(TRK,(10,10),RLSE),UNIT=SYSDA
//RECEIVE DD DSN=USERID.TRANFILE.UPLOAD,DISP=SHR
//SYSIN DD *
libname receive xport;
proc copy in=receive out=sasdata memtype=data;
run;
/*
- Example 3:
- This is the situation as in Example 2 except that only LIBNAME statements are used in the batch job. Also, we are selecting only SALES94 and SALES95
SAS data sets to be copied from the transport file to the new SAS data library. The LIBNAME statement with the libref SASDATA allocates, catalogs the new permanent SAS
data library, and figures out the disk space needed.
//EXAMP3 JOB (,X101),'NICHOLS,M.',TIME=(0,5)
// EXEC SAS
//SYSIN DD *
libname sasdata 'tech.cust.data' disp=new;
libname receive xport 'userid.tranfile.upload' disp=shr;
proc copy in=receive out=sasdata memtype=data;
select sales94 sales95;
run;
/*
- Example 4:
- In this example, we are running the job in interactive SAS. SAS will allocate and catalog the new permanent SAS data library. The EXCLUDE statement of
the COPY procedure will prevent the SALES89 and SALES90 data sets contained in the transport file from being copied to the new SAS data library. All other SAS data sets in
the transport file will be copied.
libname sasdata 'tech.cust.data' disp=new;
libname receive xport 'userid.tranfile.out' disp=shr;
proc copy in=receive out=sasdata memtype=data;
exclude sales89 sales90;
run;
- Example 5:
- In this example, we are assuming the transport file made by the CPORT procedure is the same or lower release than your MVS release of SAS.
Note:
PROC
COPY or a DATA step with the XPORT engine or PROC COPY with the SASV5XPT engine or PROC XCOPY cannot process a transport file made by PROC CPORT.
libname sasdata 'tech.cust.data' disp=new;
filename portfile 'userid.portfile.out' disp=shr;
proc cimport infile=portfile library=sasdata;
run;
Operating System and Release Information
| SAS System | Base SAS | z/OS | n/a | |
| All | n/a | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | low |
| Topic: | Data Management ==> Administration ==> Migration
|
| Date Modified: | 2007-12-12 12:32:39 |
| Date Created: | 2002-12-16 10:56:49 |