BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
prad001
Obsidian | Level 7

Hi All,

 

I am trying to parallelize a program but there is a ODS Step in the loop which creates 1 shtml file, 1 .gif file for each unique row and also it creates **ONLY ONE** sasgraph.gif file.

 

If you look at the below code., the shtml file name is mentioned in the file statement and I can add an modify the name of it.

 

And the .gif file output is named as capabil1.gif capabil2.gif... etc..

But, there is no reference for naming .gif and sasgraph.gif files.. 

 

Please, let me know how to change the names of the .gif and also, I am trying to understand how does the sasgraph.gif file is created and also, how to control that sasgraph.gif file creation process.

 

 

 

goptions hsize=8in vsize=6in device=gif rotate=landscape chartype=5 gsfname=;
symbol1 c=DEFAULT l=1 w=1 v=dot c=blue h=1.5 pct i=join;
filename gout "/amd/ausaph17/24/wetspcm/progs/bynoloops/";
ods html
body="&tech._&device._&hname._ppk_graph.shtml"
contents=""
frame=""
base=""
gpath=gout path=gout gfootnote newfile=none style=Rick3d;
title "&tech &device &name";
title2 "DispoLow = &spel DispoHigh = &speh";
title3 "Updated &fdate &systime";
title4 "Date Range: &mindate to &maxdate";


proc capability noprint data=lot1(WHERE=(device="&device" AND name="&name" AND tech="&tech"));
spec lsl = &spel usl= &speh clsl = red cusl = red;
var buckvalue;
output out=capdev cp=cp cpk=cpk cpl=cpl cpu=cpu mean=mean
std=std pctgtr=pctgtr pctlss=pctlss n=n;
histogram / normal (noprint) href=&spel &speh nolegend;
inset n cpk mean cpl std pctgtr cp pctlss / position=bm height=2 format=9.4;
run;


ods html close;

Thank you so much in advance,

Prad

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

ODS GRAPHICS statement usually controls the graphics these days but I can't be 100% sure with this procedure as it references the SAS/GRAPH options. 

 

To control the graph name, try an ODS GRAPHICS statement with the imagename option. 

 

ods graphics / imagename = "capability";

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n1bl0ct9tx98zen1d6qlljh4dm7b.htm

 

Note that the indexes are set automatically and increment. 

 

As to controlling the graphics from a procedure that's a much more complex topic. Personally, I usually choose to capture the data and then generate the plots myself separately. Obviously for complex plots this is a lot of work. There's the SAS Graphics Editor which allows you to edit graphics via a GUI (a bit old school) or you can modify the template 

I would lean towards piping the data to a data set and using SGPLOT to create the graphics myself, especially if they're required for reports or publications. 

 

 


@prad001 wrote:

Hi All,

 

I am trying to parallelize a program but there is a ODS Step in the loop which creates 1 shtml file, 1 .gif file for each unique row and also it creates **ONLY ONE** sasgraph.gif file.

 

If you look at the below code., the shtml file name is mentioned in the file statement and I can add an modify the name of it.

 

And the .gif file output is named as capabil1.gif capabil2.gif... etc..

But, there is no reference for naming .gif and sasgraph.gif files.. 

 

Please, let me know how to change the names of the .gif and also, I am trying to understand how does the sasgraph.gif file is created and also, how to control that sasgraph.gif file creation process.

 

 

 

goptions hsize=8in vsize=6in device=gif rotate=landscape chartype=5 gsfname=;
symbol1 c=DEFAULT l=1 w=1 v=dot c=blue h=1.5 pct i=join;
filename gout "/amd/ausaph17/24/wetspcm/progs/bynoloops/";
ods html
body="&tech._&device._&hname._ppk_graph.shtml"
contents=""
frame=""
base=""
gpath=gout path=gout gfootnote newfile=none style=Rick3d;
title "&tech &device &name";
title2 "DispoLow = &spel DispoHigh = &speh";
title3 "Updated &fdate &systime";
title4 "Date Range: &mindate to &maxdate";


proc capability noprint data=lot1(WHERE=(device="&device" AND name="&name" AND tech="&tech"));
spec lsl = &spel usl= &speh clsl = red cusl = red;
var buckvalue;
output out=capdev cp=cp cpk=cpk cpl=cpl cpu=cpu mean=mean
std=std pctgtr=pctgtr pctlss=pctlss n=n;
histogram / normal (noprint) href=&spel &speh nolegend;
inset n cpk mean cpl std pctgtr cp pctlss / position=bm height=2 format=9.4;
run;


ods html close;

Thank you so much in advance,

Prad


 

View solution in original post

1 REPLY 1
Reeza
Super User

ODS GRAPHICS statement usually controls the graphics these days but I can't be 100% sure with this procedure as it references the SAS/GRAPH options. 

 

To control the graph name, try an ODS GRAPHICS statement with the imagename option. 

 

ods graphics / imagename = "capability";

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grstatproc/n1bl0ct9tx98zen1d6qlljh4dm7b.htm

 

Note that the indexes are set automatically and increment. 

 

As to controlling the graphics from a procedure that's a much more complex topic. Personally, I usually choose to capture the data and then generate the plots myself separately. Obviously for complex plots this is a lot of work. There's the SAS Graphics Editor which allows you to edit graphics via a GUI (a bit old school) or you can modify the template 

I would lean towards piping the data to a data set and using SGPLOT to create the graphics myself, especially if they're required for reports or publications. 

 

 


@prad001 wrote:

Hi All,

 

I am trying to parallelize a program but there is a ODS Step in the loop which creates 1 shtml file, 1 .gif file for each unique row and also it creates **ONLY ONE** sasgraph.gif file.

 

If you look at the below code., the shtml file name is mentioned in the file statement and I can add an modify the name of it.

 

And the .gif file output is named as capabil1.gif capabil2.gif... etc..

But, there is no reference for naming .gif and sasgraph.gif files.. 

 

Please, let me know how to change the names of the .gif and also, I am trying to understand how does the sasgraph.gif file is created and also, how to control that sasgraph.gif file creation process.

 

 

 

goptions hsize=8in vsize=6in device=gif rotate=landscape chartype=5 gsfname=;
symbol1 c=DEFAULT l=1 w=1 v=dot c=blue h=1.5 pct i=join;
filename gout "/amd/ausaph17/24/wetspcm/progs/bynoloops/";
ods html
body="&tech._&device._&hname._ppk_graph.shtml"
contents=""
frame=""
base=""
gpath=gout path=gout gfootnote newfile=none style=Rick3d;
title "&tech &device &name";
title2 "DispoLow = &spel DispoHigh = &speh";
title3 "Updated &fdate &systime";
title4 "Date Range: &mindate to &maxdate";


proc capability noprint data=lot1(WHERE=(device="&device" AND name="&name" AND tech="&tech"));
spec lsl = &spel usl= &speh clsl = red cusl = red;
var buckvalue;
output out=capdev cp=cp cpk=cpk cpl=cpl cpu=cpu mean=mean
std=std pctgtr=pctgtr pctlss=pctlss n=n;
histogram / normal (noprint) href=&spel &speh nolegend;
inset n cpk mean cpl std pctgtr cp pctlss / position=bm height=2 format=9.4;
run;


ods html close;

Thank you so much in advance,

Prad


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 285 views
  • 0 likes
  • 2 in conversation