BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,
If the file is so big, how to print all,
Thank you very much?


Message was edited by: GooDclassmate Message was edited by: GooDclassmate
2 REPLIES 2
deleted_user
Not applicable
> Hello,
> If the file is so big, how to print all,
> Thank you very much?
>
>
> Message was edited by: GooDclassmate
>
> Message was edited by: GooDclassmate

Is this some error message you got? In what application? What were you trying to do?

Generally I'd say that if a file is too big, printing it would be ill advised. What will you do with the printout? The paper waste is too horrible to contemplate.

Consider printing a sample of the records in the file so you can develop the code to process the whole file electronically and intelligently.

Kind regards

David
deleted_user
Not applicable
I believe the original question was:

----------------------------------------

Hello,
I am new hand in SAS and I met a trouble when I used the SAS to read the data.csv files, the "time" was not correctly read, for example, "5/31/2007 23:00" become as "5/31/2007". How could I read the "time" correctly?
Thank you very much!


Timexxxx Value
5/31/2007 23:00,1789
1/11/2007 0:10,2631
11/11/2007 0:20,1343
11/12/2007 10:20,2343

-------------------------------------------------

To answer this, one way would be the following

data metrics;
length datestring $16;
infile datafile dlm=',' ;
input datestring $ value;
date = input(scan(datestring,1," "), mmddyy10.);
time = input(scan(datestring,2," "), hhmm.);

hh = hour(time);
mm = minute(time);
datetimestamp = dhms(date,hh,mm,00);

drop hh mm;
run;
quit;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 919 views
  • 0 likes
  • 1 in conversation