BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
May i know why dont we have Import and Export of data in EG by coding( automatically).
i know the way of exporting or importing like File -> Import wizard (or) Export Wizard.
But i want to know the way of coding in EG for import & export the data.
7 REPLIES 7
deleted_user
Not applicable
I am not quite sure of what you mean - you can create a new code and run a PROC IMPORT procedure (or any other SAS code).
deleted_user
Not applicable
I am not able to import or export the data by using Code but i can export or impot data by using import wizard. My questation is, i want to know whether we have option in the EG, import or exporting data by coding.
MohamedS
Obsidian | Level 7
Hi Basu,

to type a code in enterprise guide:
1- select file --> new --> code.
once the Editor open. use the following example code. it is to import dlimited text file. file name is "delimiter.txt" you can make any sample file from your side. the delimiter between columns is semi colon.

the data will be imported to SAS data set called mydata in work library.

proc import datafile="x:\myfiles\delimiter.txt"

out=mydata

dbms=dlm

replace;

delimiter=';';

getnames=yes;
run;

options nodate ps=60 ls=80;

proc print data=mydata;
run;

I wish it is helpful for you.
deleted_user
Not applicable
Use Help, SAS Online Documentation to find the Base SAS documentation for your version of SAS.

Then look up within that documentation the PROC IMPORT and PROC EXPORT procedures.
deleted_user
Not applicable
I am not able to import or export the data by using Code but i can export or impot data by using import wizard. My questation is, i want to know whether we have option in the EG, import or exporting data by coding.
deleted_user
Not applicable
Hello,

Has anyone had issues importing and Exporting DBase (5) files? We're trying to import a file with boolean expressions. When imported, the boolean expressions (yes or No) values are converted to SAS boolean values (0 or 1). But when we update the file and try to export it again, the boolean columns retain their integer formats and are now "1.0000" instead of YES in the resulting dbase file. I know that we can get around this by coding in Character Yes/No values but is there an option that can be set somewhere to retain the boolean format without the additional intervention?

Has anyone come across this?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1109 views
  • 0 likes
  • 2 in conversation