1. I have a simple code in SAS4GL that checks the list of caslibs, then load all SASHDAT tables into memory. Maybe you've already done it before and can share the lua code that checks all the caslibs, then load tables from SASHDAT to cas? It would be much more efficient to load data automatically after restart instead of running SAS4gl code.
2. How can I test the LUA code presented behind? Even for a single table, how I can use s:table_addCaslib in SAS Studio "proc lua" or command line "lua "?