I am using inside a loop, xml2 engine to create XML file with Name such as File_1.xml, File_2.xml and so on. As we have a lot of files to create the program may run for few hours.
Is there a way to have an open window telling us which the current index of the loop
ex:
%macro split2;
%let NbSubDiv=%sysevalf(&Gnobs./&NbObsPerDst.,ceil);/* Number of observation per split file*/
%do j=1 %to &NbSubDiv.;
libname newfile xmlv2 "&PathName3B./&FileName2C._&j..xml"
tagset=tagsets.sasxnmis;
Data newfile.&FileName2B._&j;
set mywork.&FileName1B. (firstobs=%eval(((&j-1)*&NbObsPerDst)+1) obs=%eval(&j*&NbObsPerDst));;
run;
/*Open a screen telling the fIle &FileName2C._&j..xml has been created*/
Is there a way to do that?
libname newfile clear;
%end;
%mend split2;
%split2;
You can use the SYSECHO statement to add a custom message to the Task Status window in EG. Will that help?
Nice! I never though that will could do that.
Will it works if our SAS program is executed on a Unix Server?
It works as long as your program is running within SAS Enterprise Guide, even if the server is remote.
Now, if you have a SAS Grid Computing environment and have SAS code that is delegated to other nodes (besides the main SAS workspace), the SYSECHO notice might not make it all the way back to EG. You'll have to test it out.
it works very on window.
However if I transfer my program on a Unix server and I use a KSH file to start the program, there is no window open to show which step the program has done.
Should I add some command to the KSH file?
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!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.