/* This program pipes in the sas cport file and creates a sas dataset in the format appropriate to the host operating system. The new file will be written to the directory specified in newdata. Change the directory location & select the datasets to export */ options compress = yes; libname newdata '/home/data/milpen/EntireDataset/'; libname newdata1 '/home/data/milpen/Section1/'; libname newdata2 '/home/data/milpen/Section2/'; libname newdata3 '/home/data/milpen/Section3/'; filename olddata pipe 'gzcat /home/data/milpen/EntireDataset/mil.cport.Z'; proc cimport data=newdata.mil infile=olddata; filename olddata pipe 'gzcat /home/data/milpen/EntireDataset/cmr.cport.Z'; proc cimport data=newdata.cmr infile=olddata; filename olddata pipe 'gzcat /home/data/milpen/EntireDataset/msr.cport.Z'; proc cimport data=newdata.msr infile=olddata; filename olddata1 pipe 'gzcat /home/data/milpen/Section1/mil.cport.Z'; proc cimport data=newdata1.mil infile=olddata1; filename olddata1 pipe 'gzcat /home/data/milpen/Section1/cmr.cport.Z'; proc cimport data=newdata1.cmr infile=olddata1; filename olddata1 pipe 'gzcat /home/data/milpen/Section1/msr.cport.Z'; proc cimport data=newdata1.msr infile=olddata1; filename olddata2 pipe 'gzcat /home/data/milpen/Section2/mil.cport.Z'; proc cimport data=newdata2.mil infile=olddata2; filename olddata2 pipe 'gzcat /home/data/milpen/Section2/cmr.cport.Z'; proc cimport data=newdata2.cmr infile=olddata2; filename olddata2 pipe 'gzcat /home/data/milpen/Section2/msr.cport.Z'; proc cimport data=newdata2.msr infile=olddata2; filename olddata3 pipe 'gzcat /home/data/milpen/Section3/mil.cport.Z'; proc cimport data=newdata2.mil infile=olddata3; filename olddata3 pipe 'gzcat /home/data/milpen/Section3/cmr.cport.Z'; proc cimport data=newdata2.cmr infile=olddata3; filename olddata3 pipe 'gzcat /home/data/milpen/Section3/msr.cport.Z'; proc cimport data=newdata2.msr infile=olddata3;