Hi Srinivas_N
To fully answer this you need to supply more information:
Where is your data stored, what is the format of that data, etc.
For example if you were reading a text file "\some\file.txt"
data mySASDS ; /* This creates a SAS dataset in the WORK library */
infile "\some\file.txt" ; /* This defines your source file */
input num_var str_var $ date_var ddmmyy. ; /* This tells SAS how to read the data in the source file */
run ;
There's more to it than that, but that's the basics. I suggest you go loop up those statements in the documentation and look at the examples
What is the current reason you cannot do this?
What is the source data?
What have you tried that doesn't work?
@SRINIVAS_N wrote:
I want to read date value from Unix and the value I want to use in SAS programming.
Hi,
Really need more details of what you are attempting to do, as it is still unclear.
From this post it looks like you might be attempting to pass a parameter/argument from Unix into a SAS program
You can do this by using the SYSPARM invocation option, which the SAS program can then read via the SYSPARM macro variable, further details can be found here
If you want to import a typical UNIX timestamp into SAS, you need to do the following:
UNIX timestamps are counts of seconds like they are in SAS, but the zero point is different.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.