BookmarkSubscribeRSS Feed
alepage
Barite | Level 11

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;

 

4 REPLIES 4
ChrisHemedinger
Community Manager

You can use the SYSECHO statement to add a custom message to the Task Status window in EG.  Will that help?

statuswindow.png

See how-to guidance here.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
alepage
Barite | Level 11

Nice!  I never though that will could do that.

Will it works if our SAS program is executed on a Unix Server?

ChrisHemedinger
Community Manager

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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
alepage
Barite | Level 11

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?

 

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

Register Now

Creating Custom Steps in SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1281 views
  • 0 likes
  • 2 in conversation