Interesting piece of code, thanks Chris. Passing by value a long text string using a macro variable is limited to 32k in length obviously. To go beyond, paging can be used as mentioned above with Rok; that might also be a case in point for the elusive Proc Stream which has the ability to process multiple macro variables (more generally, any string of arbitrary length) ?

https://hcsbi.blogspot.fr/2011/09/proc-stream-extending-macro-language-to.html

https://support.sas.com/documentation/cdl/en/proc/68954/HTML/default/viewer.htm#p06pqn7v5nkz02n0zkpq7832j1yp.htm