perfect! thankyou!! I didn't see those...
For reference, these are the results I got:
filename _test temp;
data _null_;
file _test;
put '%put &=SYSINCLUDEFILEDIR;';
put '%put &=SYSINCLUDEFILEDEVICE;';
put '%put &=SYSINCLUDEFILEFILEREF;';
put '%put &=SYSINCLUDEFILENAME;';
run;
%inc _test;
%macro x();
%let loc="%sysfunc(pathname(work))/test";
data _null_;
file &loc;
put '%put &=SYSINCLUDEFILEDIR;';
put '%put &=SYSINCLUDEFILEDEVICE;';
put '%put &=SYSINCLUDEFILEFILEREF;';
put '%put &=SYSINCLUDEFILENAME;';
run;
%inc &loc;
%mend;
%x()
%put &=SYSINCLUDEFILEDIR;
%put &=SYSINCLUDEFILEDEVICE;
%put &=SYSINCLUDEFILEFILEREF;
%put &=SYSINCLUDEFILENAME;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73
74
75 filename _test temp;
76 data _null_;
77 file _test;
78 put '%put &=SYSINCLUDEFILEDIR;';
79 put '%put &=SYSINCLUDEFILEDEVICE;';
80 put '%put &=SYSINCLUDEFILEFILEREF;';
81 put '%put &=SYSINCLUDEFILENAME;';
82 run;
NOTE: The file _TEST is:
Filename=/tmp/SAS_work55E900003774_sas.analytium.co.uk/#LN00187,
Owner Name=allbow,Group Name=allbow,
Access Permission=-rw-r--r--,
Last Modified=02 September 2021 11:46:51
NOTE: 4 records were written to the file _TEST.
The minimum record length was 25.
The maximum record length was 29.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 473.00k
OS Memory 26276.00k
Timestamp 02/09/2021 08:46:51 AM
Step Count 72 Switch Count 0
Page Faults 0
Page Reclaims 62
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
83
84 %inc _test;
SYSINCLUDEFILEDIR=/tmp/SAS_work55E900003774_sas.analytium.co.uk
SYSINCLUDEFILEDEVICE=TEMP
SYSINCLUDEFILEFILEREF=_TEST
SYSINCLUDEFILENAME=#LN00187
89
90 %macro x();
91 %let loc="%sysfunc(pathname(work))/test";
92 data _null_;
93 file &loc;
94 put '%put &=SYSINCLUDEFILEDIR;';
95 put '%put &=SYSINCLUDEFILEDEVICE;';
96 put '%put &=SYSINCLUDEFILEFILEREF;';
97 put '%put &=SYSINCLUDEFILENAME;';
98 run;
99
100 %inc &loc;
101 %mend;
102
103 %x()
NOTE: The file "/tmp/SAS_work55E900003774_sas.analytium.co.uk/SAS_work810D00003774_sas.analytium.co.uk/test" is:
Filename=/tmp/SAS_work55E900003774_sas.analytium.co.uk/SAS_work810D00003774_sas.analytium.co.uk/test,
Owner Name=allbow,Group Name=allbow,
Access Permission=-rw-r--r--,
Last Modified=02 September 2021 11:46:51
NOTE: 4 records were written to the file
"/tmp/SAS_work55E900003774_sas.analytium.co.uk/SAS_work810D00003774_sas.analytium.co.uk/test".
The minimum record length was 25.
The maximum record length was 29.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
user cpu time 0.00 seconds
system cpu time 0.00 seconds
memory 469.37k
OS Memory 26276.00k
Timestamp 02/09/2021 08:46:51 AM
Step Count 73 Switch Count 0
Page Faults 0
Page Reclaims 25
Page Swaps 0
Voluntary Context Switches 0
Involuntary Context Switches 0
Block Input Operations 0
Block Output Operations 8
SYSINCLUDEFILEDIR=/tmp/SAS_work55E900003774_sas.analytium.co.uk/SAS_work810D00003774_sas.analytium.co.uk
SYSINCLUDEFILEDEVICE=DISK
SYSINCLUDEFILEFILEREF=
SYSINCLUDEFILENAME=test
108
109 %put &=SYSINCLUDEFILEDIR;
SYSINCLUDEFILEDIR=
110 %put &=SYSINCLUDEFILEDEVICE;
SYSINCLUDEFILEDEVICE=
111 %put &=SYSINCLUDEFILEFILEREF;
SYSINCLUDEFILEFILEREF=�|��#
112 %put &=SYSINCLUDEFILENAME;
SYSINCLUDEFILENAME=
113
114 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
126
... View more