The routing of output is done separately for every single piece of code (task) that is executed. You can (not) see that in the log (code was run in SAS Studio, 9.4M6 on an AIX server):
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 proc print data=sashelp.class;
74 run;
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: Verwendet wurde: PROZEDUR PRINT - (Gesamtverarbeitungszeit):
real time 0.06 seconds
cpu time 0.04 seconds
75
76 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
88
The lines between 2 and 71 contain, among a lot of other things, code to set up ODS output to a file that is later read by Studio or Enterprise Guide (both are "IOM clients") to retrieve the results; similar for lines 77 to 87, where the ODS destinations are closed.
Since the autoexec.sas file is executed by the workspace server before it sets up the IOM connection, there is no way for the output to make it back to SAS Studio.
Enterprise Guide provides code that is run whenever a server connection is established, but SAS Studio does not have such an option.
... View more