Hi:
The X command is a way to issue an operating system command.
http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/win-cmd-x.htm
http://support.sas.com/documentation/cdl/en/hosto390/61886/HTML/default/mvs-win-x.htm
http://support.sas.com/documentation/cdl/en/hostvms/62450/HTML/default/alp-cmd-x.htm
So, for example, in regard to image files, let's say that I want my job to create a file called MYGRF.JPG -- I can control the "MYGRF" part of the name with either the NAME= option for device-based SAS/GRAPH or with the IMAGENAME= option of the ODS GRAPHICS statement. The extension will come from either the DEV= option or the IMAGEFMT= option.
In my program, if I want to be sure that the older version of that file is not in the output directory, I can do this:
[pre]
options noxwait;
x "del c:\temp\mygrf.jpg";
OR
options noxwait;
x "mkdir c:\temp\MyReport_files";
OR
options noxwait noxsync;
x 'c:\temp\mycopylist.bat';
[/pre]
Or, I can make a directory to hold my output, as shown in the second example. Or, I can run a .BAT or .CMD file. It's a pretty cool way to do some operating system administrative clean-up or set-up. The X command is normally disabled for EG...so you may have to work with your SAS Admin to get it turned on if you're just using EG.
I mentioned the X command because with ODS Graphics, the graphic output is NOT displayed in the GRAPH1 window, so you would not need to clear WORK.GSEG, but instead would or might want to delete previously created graphic image files that reside on disk. Normally with device-based SAS/Graph, you would not usually use the X command.
cynthia