Quentin,
Good suggestions.
I had been including a SYMEXIST check to run a %DO-%END block that creates the global macro variable of interest and the one-time code if the macro variable did not exist. That would give the programmer, for whatever reason, the chance to SYMDEL that macro variable to display the "one-time code" again. I updated the AUTOEXEC.SAS to include the SAS System Option MAUTOLOCDISPLAY.
This might actually resolve because I understand that the FDA no longer wants (accepts) externally defined macros in the submitted programs, so we may have to execute the program, use MFILE (or some run of the mill MAC_DEBUG_MFILE macro freely available in the PharmaSUG archives of papers 🙂 ), then Validate that "program" with the generated SAS code and no macro calls. That will turn on the SOP/WI of the company.
That is not a visually appealing approach, because MFILE "spits" out the SAS code devoid of all of my indentations and formatting (screens and fonts are getting bigger and I still cannot see "1" versus "l" in code, like names 🙂 I read formatted programs "faster".
BTW, that means I omit some macro code in my setup.sas files. Instead of using %LET statements, I define a macro, include a data step with CALL SYMPUTX(), with the third argument "G", and call the macro at as the last executed code of the program. That way I might capture the code for a "stand-alone" program. This is all a (stalled) work-in-progress.
%macro test ( ) ;
%let test = one ;
data _null_ ;
call symputx( "test2"
, "one"
) ;
run ;
%mend test ;
%mac_debug_mfile
( mcall = test()) ;
22 %mac_debug_mfile
MAUTOLOCDISPLAY(MAC_DEBUG_MFILE): This macro was compiled from the autocall file G:\SAS Data\02_macros\mac_debug_mfile.sas
23 ( mcall = test()) ;
MPRINT(MAC_DEBUG_MFILE): ;
MPRINT(TEST): data _null_ ;
NOTE: The macro generated output from MPRINT will also be written to external file C:\Users\KEVIN~1.VIE\AppData\Local\Temp\66\SAS Temporary Files\_TD13100_VC-SASPROD_\#LN00010 while OPTIONS MPRINT and MFILE are set.
MPRINT(TEST): call symputx( "test2" , "one" ) ;
MPRINT(TEST): run ;
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
MPRINT(MAC_DEBUG_MFILE): options nomprint nomfile
NOTE: The file/infile MPRINT is:
Filename=C:\Users\KEVIN~1.VIE\AppData\Local\Temp\66\SAS Temporary Files\_TD13100_VC-SASPROD_\#LN00010,
RECFM=V,LRECL=32767,File Size (bytes)=83,
Last Modified=08Nov2024:09:43:07,
Create Time=08Nov2024:09:43:07
NOTE: 4 records were read from the infile MPRINT.
The minimum record length was 5.
The maximum record length was 33.
NOTE: 4 records were written to the file MPRINT.
The minimum record length was 5.
The maximum record length was 33.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The file TYPE is:
Unnamed Pipe Access Device,
PROCESS=type "C:\Users\KEVIN~1.VIE\AppData\Local\Temp\66\SAS Temporary Files\_TD13100_VC-SASPROD_\#LN00010" | clip,
RECFM=V,LRECL=32767
NOTE: 0 records were written to the file TYPE.
NOTE: DATA statement used (Total process time):
real time 0.21 seconds
cpu time 0.00 seconds
NOTE: Fileref TYPE has been deassigned.
NOTE: Fileref MPRINT has been deassigned.
/* On a Windows OS, after running the code in interactive mode, typing Cntl-V produces */
data _null_ ;
call symputx( "test2" , "one" ) ;
run ;
Kind regards,
Kevin
... View more