DATA Step, Macro, Functions and more

How to identify length of the input file

Accepted Solution Solved
Reply
Contributor
Posts: 34
Accepted Solution

How to identify length of the input file

Hi All,

    I am using windows SAS. One of my input file is TXT file, i have to add 1-byte file-flag at the end of the each records. So i want to know how to get input file LENGTH???

   I will use _infile_ with dummy INPUT. But i have to know the input file length for some other purpose.

  Could you please help to how to identify input file length??

Thanks,

Prabakaran


Accepted Solutions
Solution
‎01-02-2013 02:50 PM
Super Contributor
Posts: 543

Re: How to identify length of the input file

Hi.

You could use in your infile statement ...

infile "\\...\test.txt" LENGTH=LRECL; *this will give you the length of EACH record;


Is this helpful?

Good luck,

Anca.

View solution in original post


All Replies
Solution
‎01-02-2013 02:50 PM
Super Contributor
Posts: 543

Re: How to identify length of the input file

Hi.

You could use in your infile statement ...

infile "\\...\test.txt" LENGTH=LRECL; *this will give you the length of EACH record;


Is this helpful?

Good luck,

Anca.

Contributor
Posts: 34

Re: How to identify length of the input file

Posted in reply to AncaTilea

Thanks Anca.. You are correct. It works fine

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 161 views
  • 0 likes
  • 2 in conversation