Data visualization with SAS programming

PNG Image files generated have filenames that end with "1'

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 7
Accepted Solution

PNG Image files generated have filenames that end with "1'

[ Edited ]

I am generating png image files that I want to have standard naming convention. However the files that get generated have names that  end with "1". I know that should happen if there is more than one times the image is generated, so that the first time it is called "image.png" and the second time "image1.png." But this happened even if there is one call, and even if there are no other image files in the folder.

 

I found a previous thread that had similar issue, and it was solved by adding "ods html close" to the top. I added this statement, but it did not help. Below I am listing the code.

 

%macro dograph(AgeorDate,loantype);

 

ODS HTML CLOSE;

ODS PDF CLOSE;

 

 

 

ods graphics on /

outputfmt= png

imagemap = on

reset = all

imagename="IJMy"

border=on

width=6.75in

height=5.25in;

ods listing gpath="/sasmart/zkydmjo/IJGraph";

 

PROC SGPANEL DATA=lalas;

PANELBY gender /SPACING=3 novarname;

 

series y=smm x=&AgeorDate /

MARKERS MARKERATTRS = (SYMBOL = CircleFilled COLOR = black SIZE = 5)

 

LINEATTRS = (COLOR = black PATTERN = SOLID);

series y=fit x=&AgeorDate /

MARKERS MARKERATTRS = (SYMBOL = circle COLOR = green SIZE = 5)

 

LINEATTRS = (COLOR = green PATTERN = SOLID);

COLAXIS grid;

ROWAXIS grid;

RUN;

ods listing close;

%mend dograph;

 

 

%dograph(loanage, loc);

 


Accepted Solutions
Solution
4 weeks ago
Occasional Contributor
Posts: 7

Re: PNG Image files generated have filenames that end with "1'

I was able to solve it by adding

ODS _ALL_ close;

 

to the top.

View solution in original post


All Replies
Esteemed Advisor
Posts: 5,396

Re: PNG Image files generated have filenames that end with "1'

Try to define gpath before requesting reset=all and imagename=.

PG
Occasional Contributor
Posts: 7

Re: PNG Image files generated have filenames that end with "1'

Thank you. I have already tried to switch the line "ods listing gpath = "...."  to be above the statement "ods graphics on /". However that did not help.

Solution
4 weeks ago
Occasional Contributor
Posts: 7

Re: PNG Image files generated have filenames that end with "1'

I was able to solve it by adding

ODS _ALL_ close;

 

to the top.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 134 views
  • 0 likes
  • 2 in conversation