BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
m1986MM
Obsidian | Level 7

Hello everyone;

I tried to import a dataset and set the guessing row equal to 20,000. However, formats of the variables are nor what they should be. So I need to define formats of the variables. The following in my primary code.

proc import datafile="F:\Address of the file.txt"

            dbms=dlm

            out=test

            replace;

     delimiter='|';

     getnames=yes;

  Guessingrows=20000;

run;

I used the following code to define variable's format, but it didn't work.

proc import datafile="E:\Mobina\wo23370_LSU\Deposits\depositRateData_1998_03.txt"

            dbms=dlm

            out=depositRateData_1998_03

            replace;

format rate 5.3;

format apy 5.3;

format datesurveyed yyyymmdd10.;

format comment $30;

     delimiter='|';

     getnames=yes;

run;

I appreciate any suggestion.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You need to write a data step to import the file instead.

Your proc import will create the code in the log.  Copy and paste that from the log into the editor and edit it as needed.

View solution in original post

1 REPLY 1
Reeza
Super User

You need to write a data step to import the file instead.

Your proc import will create the code in the log.  Copy and paste that from the log into the editor and edit it as needed.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 629 views
  • 0 likes
  • 2 in conversation