Desktop productivity for business analysts and programmers

HELP for basic SAS: how to read and print all ?

Reply
N/A
Posts: 0

HELP for basic SAS: how to read and print all ?

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
N/A
Posts: 0

Re: HELP for basic SAS: how to read and print all ?

> 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
N/A
Posts: 0

Re: HELP for basic SAS: how to read and print all ?

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;
Ask a Question
Discussion stats
  • 2 replies
  • 95 views
  • 0 likes
  • 1 in conversation