The TERMSTR option is used to define the record delimiter (End of record marker) on flat files.
This options does not accept hex values, which is very odd as record delimiters normally aren't standard characters.
The syntax TERMSTR='0c'x should be supported.
The example above was chosen because '0c'x is often used by Hadoop files.
As an aside, this whole option could do with a cleanup as in the following example,
file "%sysfunc(pathname(work))/t.txt" termstr='0c'x;
put 'A' / 'B' / 'C' ;
infile "%sysfunc(pathname(work))/t.txt" termstr='0c';
1- The x is suffix ignored in the first data step's file statement and the delimiter is set to string '0c'.
So the file is 9 bytes long and contains:
2- In the second data step, SAS somehow finds these 2 nonsensical records:
And with the proliferation of character encoding possibly even some way to deal with double-byte character sets and unicode charcters as they may make more sense for some specific (likely poorly crafted) files.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.