I'm creating some plain text (ASCII) records in a SAS data step. I'm running in a UNIX/SAS 9.4/SAS EG 7.1 environment. When I string everything together, some of these records are over 100,000 bytes long. UNIX can handle records of that length, but as I recall (and confirmed by what testing I have so far done), SAS has a constraint of no more than 32767 bytes in an output record.
Is there some kind of workaround such that I can create output records longer than 32767 bytes?
Thank you,
Jim
On your file statement just include the lrecl option (e.g., file the_output_filename lrecl=999999;)
Art, CEO, AnalystFinder.com
The LRECL option doesn't override this? The docs say the maximum is 1G under Unix but I don't know what that actually means.
Edit: The SAS 'constraint' is just the default value, not an actual constraint.
On your file statement just include the lrecl option (e.g., file the_output_filename lrecl=999999;)
Art, CEO, AnalystFinder.com
Thank you to all three of you. All three of you are right. I'm going to mark @art297's answer as the solution since it is the most specific in terms of a fix, but all three of you deserve credit, and I thank you.
@LinusH, I was aware of the 32767 byte limit for a single variable. I was confused in thinking that 32767 was a hard constraint for the the LRECL. Simply setting a value for the LRECL parameter as suggested by @art297 took care of that (I already had multiple 32767 length character variables set up to handle the data).
Easiest fix. Ever. Thank you, again.
Jim
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.