LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 6 Jun 2006 02:21:40 -0400
Reply-To:     "Mark A. Greenbaum" <Mark.Greenbaum@VA.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Mark A. Greenbaum" <Mark.Greenbaum@VA.GOV>
Subject:      Important: Got Download?

Dear SAS-L members,

Last week, several members solved my upload programming problem--thank you!

The last step is figuring out how to convert the transport dataset below ("S640MG1.ROSTER.XPT") to a SAS file after I've FTP'ed it to our local computer. Our local expert is out sick, and my former program (for .V5X extensions) is not working.

Here is the program I used to create the SAS export file (please note the PROC COPY and .xpt extension):

Create Transport File at Austin 000005 //STEP1 EXEC SAS 000007 //IN1 DD DSN=RMTPRD.SAS.DX.ROSTER,DISP=SHR 000008 //OUT1 DD DSN=S640MG1.ROSTER.XPT,DISP=(NEW,CATLG), 000009 // SPACE=(CYL,(1000,500),RLSE),UNIT=RMTINT 000010 //LIBRARY DD DSN=MDPPRD.MDP.FMTLIB6,DISP=SHR 000011 //SYSIN DD * 000012 OPTIONS NOCENTER NOFMTERR VALIDVARNAME =V6 LS=78 PS=50; 000013 LIBNAME OUT1 XPORT; 000014 PROC COPY IN=IN1 OUT=OUT1; 000015 PROC CONTENTS DATA=OUT1.ROSTER; 000016 PROC PRINT DATA=OUT1.ROSTER(OBS=1);

I would greatly appreciate it if someone could send me the code to do that, in a relatively easy-to-follow way (i.e., abbreviated references to MACRO code may be a little difficult to for me to follow). Thanks for understanding.

Here's ONE of the upload programs that worked very well for me last week, perhaps this can be revised (although I understand that a PROC COPY created file needs a PROC COPY conversion back to SAS):

#1 PROGRAM, MACRO to convert xpt file to SAS file ******************************************; %LET FILEIN=smallsmp; ********************************************; OPTIONS NOCENTER mprint mlogic ls=72 ps=50;

LIBNAME SOURCE "/export/home/mag/oef"; %macro exprt ( filein = ); FILENAME DEST "/export/home/mag/oef/&filein..xpt"; /*xpt was v5x*/ PROC CPORT data=source.&filein file=DEST; run; %mend; %exprt(filein = smallsmp); endsas;

Thank you again for helping!

--mark


Back to: Top of message | Previous page | Main SAS-L page