How to get natural security logon logs to csv format
Subprogram NSCADM is documented under Application Programming Interfaces in the Natural Security manual.
In the SYSSEC library you will find a working program, PGMADM02, which demonstrates NSCADM’s use. Use PGMADM02 as a base and add CSV logic.
On LUW all you need is
DEFINE WORK FILE nn 'fully-qualified-path\xxx.csv' TYPE 'CSV'
...
WRITE WORK nn field-list
On the mainframe you’ll need
COMPRESS field-list INTO #CSV WITH ALL DELIMITERS ';'
...
WRITE WORK FILE nn #CSV