Hi community
I came across this piece of code in a job. The job writes several sheets to the same excel workbook in identical steps, just with different where-conditions and sheet names.
proc export data=&_INPUT (where=(FejlID=2)) dbms=xlsx
outfile="&xlsxfil" replace;
WXLX;
sheet="Kun AMMO";
run;
The code works as expected, and it executes without any errors, warnings or notes related to the WXLX statement in both Windows and Linux (9.4M5), so the stetement is accepted by Proc Export. But it is marked red in the enhanced editor, and I have not been able to find it documented anywhere, even uncle Google lets me down.
I hate not beeing able to figure out what's going on in code I am running, so I hope that somebody in this community knows what the statement does, and will take the time to explain it and - if possible - give a link to where it is documented. Thanks in advance.
As the link @Kurt_Bremser found says that strange command (or token) is something that PROC IMPORT/EXPORT generates and occasionally ends up in the SAS log.
It doesn't cause any error and you can remove it.
Someone must have copied the code from the log into their program and kept it because they weren't sure what it was.
A search for "sas proc export wxlx" gave me this: https://marc.info/?l=sas-l&m=147819121210860&w=2
As the link @Kurt_Bremser found says that strange command (or token) is something that PROC IMPORT/EXPORT generates and occasionally ends up in the SAS log.
It doesn't cause any error and you can remove it.
Someone must have copied the code from the log into their program and kept it because they weren't sure what it was.
Thanks to both of you for taking time to clarify. I accept Tom's answer as a solution because og his convincing explanation of how it ended up in the code.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.