Mainframe SAS v913: Need code to export to a text file!

From sasCommunity

Jump to: navigation, search
sasCommunity Forum : sasCommunity - general site feedback : Mainframe SAS v913: Need code to export to a text file!

By Ekimrenrob on Tue Nov 27, 2007 6:50 pm

Hi -

I'm trying to export to a text file tab delimited.

Anyone have a script I can add once my data is in a mainframe file?


Private Message | Personal Page | Quote


By Prholland on Wed Dec 05, 2007 1:43 pm

Try:

 LIBNAME data "mainframe.library";
 PROC EXPORT DATA = "data.file" DBMS = TAB OUTFILE = "tab.file" REPLACE;
 RUN;
   

Where: (1) "mainframe.library" is the filename of the SAS library holding your mainframe data, and "file" is the data set in that library. (2) "tab.file" is an existing mainframe flat file to receive the tab-delimited data.

Recommendation: (A) Get hold of a copy of my book ("Saving Time and Money using SAS") and read Section 2.3 ("Space Allocation under z/OS") for info on allocating z/OS files. There is also information on other ways to export data to flat files in Section 5.5 ("Writing Data to Compatible Files for Spreadsheets")

....Phil





Last edited by Prholland on Wed Dec 05, 2007 1:43 pm

Private Message | Personal Page | Quote


Showing page 1/1


Forum section Powered by MWBB
Views
Personal tools