DATA Step, Macro, Functions and more

library base question

Reply
Occasional Contributor
Posts: 12

library base question

hi friends,

i have one dout ,

how to import the today file(txt timestap file) from library(different file are there)  to sas software,

Super User
Posts: 7,809

Re: library base question

Posted in reply to ganeshsas764

So you have a text file, and you want to import it into a dataset?

 

And what exactly is your problem?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 12

Re: library base question

Posted in reply to KurtBremser
yes ,

##- Please type your reply above this line. Simple formatting, no
attachments. -##
Super User
Super User
Posts: 7,970

Re: library base question

Posted in reply to ganeshsas764
data want;
  infile "<directory>\<filename>.txt";
  input ...;
run;
Occasional Contributor
Posts: 12

Re: library base question

some X-ayhave different files,but i am impoerting only today file to create create sas dataset

Super User
Posts: 7,809

Re: library base question

Posted in reply to ganeshsas764

Sorry, but I only speak German and English. I can't make any sense of your writing.


ganeshsas764 wrote:

some X-ayhave different files,but i am impoerting only today file to create create sas dataset


 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 11,343

Re: library base question

Posted in reply to ganeshsas764

Please show the exact name of the file.

If you are trying to use a SAS function to determine a value for TODAY to build the correct file name it is possible but we would need to see what the file name looks like to make useable suggestions.

 

Another optiom though likely more complicated is to use the SAS external file functions to open a directory (DOPEN), search for properties (Doptnum ), identify the property that the operating system uses to specify creation date (Doptname) and find files with the desired date (Dread) and likely a few more steps.

Ask a Question
Discussion stats
  • 6 replies
  • 244 views
  • 0 likes
  • 4 in conversation