SAS 9.4 (TS1M7) help on the hashing_file function provides the example below, where the filename is assigned with specific options: recfm=f lrecl=5 but without explaining them.
Are these options mandatory, and why ?
I tried changing to recfm = n (because I'm dealing with binary files) and omitting lrecl (because I don't know if it's needed and if it is, which value it should take), but then the data step seemed to run forever until I killed SAS.
In my experience, some versions of SAS (e.g. linux) have problems with long filenames, and using filerefs to access those files has generally been a good workaround, that's why I want to be able to use hashing_file with a fileref.
filename abc temp recfm=f lrecl=5;
data _null_;
file abc;
put '3334353637'x /*34567 in ASCII*/;
run;
data _null_;
x = hashing_file('sha256','abc',4);
put x=;
run;
... View more