10-02-2012 07:12 PM
I'm having so much fun! I should have quit working years ago!!
Anyway, I've encountered situations in the past where I just want to grab the rows of an input file "in bulk", and do things to them using DATA step code. For years, I've been using the following code:
infile "C:\some_file.txt" lrecl=32767;
length inrec $ 32767;
inrec = _infile_;
/* and then use inrec as my source of text for further processing, using string functions or PRX functions or whatever */
I like it because I consider it the bare minimum, but would any changes improve it? Are there any conditions under which it won't work?
10-03-2012 05:25 AM
Working with the RAW input record is perfectly OK and reasonable from my understanding,
but why not just use the automatic _infile_ variable and work from there?
I really don't see no need to copy it's content to a second variable, a 32K PDV is quite big in memory.
Cheers from Portugal.
Daniel Santos @ www.cgd.pt
10-05-2012 06:02 PM
I guess after a couple of days with no responses we can consider this closed.
Thank you all - I learned something useful from each of your answers, and will absolutely try them all out.
Please don't be offended - I was going to mark you all "Correct Answer", but I've never awarded these before and just discovered that there are limits on numbers - statistically, I consider this a poor practice ;-)
So Art gets the green star for being first (and maybe for being a fellow Canuck?)
Happy Thanksgiving and Columbus Day to all of you!
Need further help from the community? Please ask a new question.