I have a program loop that creates a html report. The program is called, and uses the input to create a new html report. But each time I create a new report, the png files in the graphs folder. About 20 graphs are created.
ods html file = "&modell_id..htm"
path = "...\Reports\TreeBoost"
gpath = "...\Reports\TreeBoost\graphs"
In the folder, the files are named SGplot1-SGplot39. It skips every even number (2,4,6,8)
Shouldnt the proc create new files ? And what is with the skipping of even numbers? I have tried changing the output folder name to a fresh folder, with the same results. I seems to be stuck in some index for naming the files, and starts over each time. In previous iterations of the code, It would create new files with higher numbers. I had previously deleted some old files, before this issue appeared.
I added imagename="&modell_id.", which solved the issue for now. Will consider trying the html5 option as well, that sounds a lot simpler to manage
No, I have no RESET statement in my code, should I have? Or shouldn't I?
The entire code is very long and convoluted with %includes and macros. Besides, untill I deleted some old pngs, there was no issue.
The skip in the numbers is probably due to having two destinations open (maybe LISTING and HTML?). I agree with @Cynthia_sas that there is probably a RESET occurring on an ODS GRAPHICS statement somewhere in your code.
Thanks!
Dan
Triple checked, there is no RESET anywhere. Beside, as stated previously, before deleting old pngs in the folder, all worked fine. The overwriting happened after deleting old png, files the code is not altered.
@Ullsokk wrote:
Triple checked, there is no RESET anywhere. Beside, as stated previously, before deleting old pngs in the folder, all worked fine. The overwriting happened after deleting old png, files the code is not altered.
It really seems strange that after deleting the files it now starts overwriting actual files. Do you perhaps mean that before it would make unique names for the files and now that the old files are gone it is re-using those names? Not sure how it could know not to do that if the files are gone.
If it really did start overwriting existing files then perhaps by deleting the files you removed files that had permission settings that made it impossible for the SAS process to delete them. But now the new files have been created with permission settings that let SAS delete them.
Yes, before, the numbers ran to about 400. Now it just starts at 1 (and skips every even number). I will have to try to reset somehow. Will try changing the paths again.
I added imagename="&modell_id.", which solved the issue for now. Will consider trying the html5 option as well, that sounds a lot simpler to manage
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.