A C program can use SYSLST as follows:
An open function (
fopen
/fopen64
,freopen
/freopen64
,open
/open64
) is used to open a file with the name "(SYSLST) for writing. The file pointer returned by the open function serves as an argument for a subsequent output function.Example
FILE *fp; fp = fopen("(SYSLST)", "w"); fprintf(fp, "\t TEXT \n");
If a parameter line was requested with PARAMETER-PROMPTING=YES (in the RUNTIME-OPTIONS compiler option), this parameter line can be used to redirect the standard output or standard error output to SYSLST (please refer to your C and C++ User Guides).
This reassignment has no effect on files that were opened with the name "(SYSLST)".
By default, SYSLST files are printed out automatically at the end of a task (LOGOFF).
If the data is not to be automatically output to a printer but sent to a cataloged file instead, SYSLST must be reassigned before the program is executed. This is effected with the command:
ASSIGN-SYSLST filename.