Please see SASWRITEDEMO, by following link 'Published m-files' below.
PS. In retrospect, SASWRITE gets credit for an inventive approach, but for practical purposes, I would strongly recommend MySQL-mediated data transfer, discussed in 'The Twain Shall Meet: Facilitating Data Exchange between SAS and Matlab' (see link below).
Dimitri Shvorob (2021). Export data to SAS (https://www.mathworks.com/matlabcentral/fileexchange/15834-export-data-to-sas), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!