/**********************************************************************/
//EXAMP1 JOB (,X101),'SMITH,B.',TIME=(0,5)
// EXEC SAS606
//TRAN DD DISP=NEW,UNIT=TAPE,
// VOL=SER=TRAN01,LABEL=(1,NL),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//SYSIN DD *
libname old 'actxyz.sales91.sasdata';
libname tran xport;
proc copy in=old out=tran memtype=data;
run;
/*
/**********************************************************************/
//EXAMP2 JOB (,X101),'SMITH,B.',TIME=(0,5)
// EXEC SAS606
//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;
/*
/**********************************************************************/
//EXAMP3 JOB (,X101),'SMITH,B.',TIME=(0,5)
// EXEC SAS606
//PORTFILE DD DISP=NEW,UNIT=TAPE,
// VOL=SER=TRAN11,LABEL=(1,NL),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//SYSIN DD *
libname old 'actxyz.mylib.sascat';
proc cport library=old file=portfile memtype=catalog
tape;
run;
/*
/**********************************************************************/
//EXAMP4 JOB (,X101),'SMITH,B.',TIME=(0,5)
// EXEC SAS606
//PORTFILE DD DISP=OLD,UNIT=TAPE,
// VOL=SER=TRAN12,LABEL=(1,NL),
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=8000)
//NEW DD DSN=ACTXYZ.NEWLIB.SASDATA,DISP=(NEW,CATLG),
// UNIT=SYSDA,SPACE=(TRK,(30,5))
//SYSIN DD *
proc cimport library=new infile=portfile tape;
run;
/*
/**********************************************************************/
libname old 'actxyz.sales91.sasdata';
proc xcopy in=old out=tran export;
select jan91 feb91 mar91;
run;
/**********************************************************************/
proc xcopy in=tran out=new import;
run;
/**********************************************************************/
$ dir/full
/* transport file name */
/**********************************************************************/
$ analyze/rms_file/fdl
/* transport file name */
/**********************************************************************/
$ edit/fdl trans.fdl
/**********************************************************************/
$ convert/fdl=trans.fdl trans.dat trans.new
/**********************************************************************/
$ dir/full trans.new
/**********************************************************************/
$ define tranfl $2$mua0:
$ allocate tranfl
$ mount/foreign/blocksize=8000 tranfl
/**********************************************************************/
libname tport xport 'tranfl';
libname old '[actxyz.oldlib]';
proc copy in=old out=tport memtype=data;
run;
/**********************************************************************/
libname tport xport 'tranfl';
data sample1;
set tport.big1 (obs=20);
run;
/**********************************************************************/
filename tport 'tranfl';
libname old '[actxyz.oldlib]';
proc cport catalog=old.mycat file=tport tape;
run;
/**********************************************************************/
filename tport 'tranfl';
libname new '[actxyz.newlib]';
proc cimport library=new infile=tport tape;
run;
/**********************************************************************/
$ define ixtape $2$mua0:
$ allocate ixtape
$ mount/foreign/blocksize=8000 ixtape
/**********************************************************************/
libname old '[actxyz.newlib]';
proc copy in=old out=ixtape export;
select apr91 may91 jun91;
run;
/**********************************************************************/
cms filedef tran tap1 nl
(recfm fb lrecl 80 blksize 8000;
run;
libname tran xport;
libname sales91 'b';
proc copy in=sales91 out=tran;
select sept91 oct91;
run;
/**********************************************************************/
cms filedef tran tap1 nl
(recfm fb lrecl 80 blksize 8000;
run;
libname tran xport;
libname mylib 'a';
proc copy in=tran out=mylib;
run;
/**********************************************************************/
filename tran tape 'tap1' lrecl=80 blksize=8000
recfm=fb label=nl;
libname dept12 'a';
proc cport library=dept12 file=tran memtype=catalog
tape;
run;
/**********************************************************************/
cms filedef tran tap1 nl
(recfm fb lrecl 80 blksize 8000;
run;
libname sales89 'c';
proc xcopy in=sales89 out=tran export;
exclude oct89 nov89 dec89;
run;
/**********************************************************************/
libname tran sasv5xpt 'c:\workdir\transpt.dat';
libname old 'c:\olddir';
proc copy in=old out=tran;
run;
/**********************************************************************/
filename portfl 'a:\mydir\tran1.dat';
libname old 'a:\olddir';
proc cport library=old file=portfl memtype=catalog;
run;
/**********************************************************************/
dd if=/dev/tape1 of=tran.dat bs=8000
/**********************************************************************/
libname tran xport '/dev/tape1';
libname old '/users/myid';
proc copy in=old out=tran;
select jul91;
run;
/**********************************************************************/
libname old '/users/myid/mydir';
filename portfile '/users/myid/trans1.dat';
proc cport catalog=old.customer
file=portfile
select=(menu1.program menu2.program);
run;
/**********************************************************************/
data _null_;
/* Note: the INFILE and FILE statements must */
/* be modified. Substitute your file names. */
infile 'your_transport.dat' eof=wrapup;
file 'new_transport.dat' recfm=f lrecl=80;
length inrec $16 outrec $80 nullrec $80;
retain count 1 outrec nullrec;
/**********************************************************************/
input inrec $char16. @@;
substr(outrec, count, 16)=inrec;
count+16;
if (count>80) then do;
put outrec $char80.;
count=1;
end;
return;
wrapup:;
file log;
nullrec=repeat('00'x,80);
if outrec=nullrec then do;
put 'WARNING: Null characters may have been'
' added at the end of transport file by'
' communications software or by a copy'
' utility. For a data set transport file,'
' this could result in extra null'
' observations being added at the end'
' of the last data set.';
end;
run;
/**********************************************************************/