12-03-2015 06:04 AM
I'm trying to read from a txt file a variable written in this way: hh:mm
using infile procedure. Below I exemplify what I'm doing:
filename READ "C:\READ.txt";
filename FILE_A "C:\FILE_A.txt";
data FILE_A (compress=yes );
infile FILE_A lrecl=24 missover;
INPUT %include READ;;
where file NEW is this:
and READ is this:
B $ 2-9
TIMEVAR $ 10-14
In the imported FILE_A the variable TIMEVAR is as aspected, in char format.
How can I use the same procedure specifying that TIMEVAR has to be read in time5. format?
Thanks to all in advance,
12-03-2015 06:36 AM
Use formatted input with the TIME5. informat for this variable, i.e., replace "TIMEVAR $ 10-14" by "TIMEVAR time5.". You can then apply the TIME5. format to TIMEVAR for display purposes.