Hi,
I can understand that first something needs to be defined in order to be replaced
but I cannot figure out a case where there would be a difference in the output of a call define
based on the used of style
instead of style/replace
making style/replace
an alias of style
.
Do you know any cases where the output would be different?
Regards,
Hi:
To find out when style/replace was introduced, you would need to examine the past documentation. There was a major rewrite of Style syntax for Style templates in SAS 9.2; and also PROC REPORT was enhanced in SAS 9.2, as I remember.
In the What's New for SAS 9.2, they only refer to STYLE/MERGE, here: https://support.sas.com/documentation/cdl/en/whatsnew/62580/PDF/default/whatsnew.pdf page 29-30. But do not list STYLE/REPLACE. However, in the PROC REPORT documentation for 9.2 on page 1030, it shows: https://support.sas.com/documentation/cdl/en/proc/61895/PDF/default/proc.pdf STYLE/REPLACE.
This paragraph implies that STYLE and STYLE/REPLACE work the same way:
Then when I looked in the 9.1 documentation for PROC REPORT here: https://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_91/base_proc_6982.pdf and do not see STYLE/REPLACE listed on page 892.
STYLE/REPLACE could have been introduced in one of the maintenance releases, like 9.1.2 or 9.1.3 but it was first in the 9.2 documentation so saying that it was available in 9.2 seems to be supported by doc. If you need more certainty that what the documentation shows, you will need to check with Tech Support.
Cynthia
Hi:
Is this related to your previous posting here: https://communities.sas.com/t5/ODS-and-Base-Reporting/style-calldef-unexpected-impact-on-call-define... about using STYLE/REPLACE and STYLE/MERGE?
When you use ODS Destinations that support style -- there is ALWAYS a style attribute being used -- it comes from the style template that is either used by default or is specified in the style=.
Most often, I see the simple STYLE and STYLE/REPLACE in a CALL DEFINE do generate the same results. When if I am setting styles using CALL DEFINE, I tend to "over code" and specify really explicit IF statements instead of fiddling with STYLE/REPLACE and STYLE/MERGE to control my style overrides.
It is my memory that STYLE and STYLE/REPLACE in a CALL DEFINE will work much the same way because of this note: "Keep in mind that the styles are replaced rather than concatenated when they are applied from a CALL DEFINE statement. In SAS 9.2, a new attribute called STYLE/MERGE will concatenate the styles." (from page 8 of this document https://support.sas.com/resources/papers/stylesinprocs.pdf ).
Here's the documentation example on STYLE/REPLACE: https://go.documentation.sas.com/doc/ja/pgmsascdc/9.4_3.5/proc/p0934x0xj13fm9n1l164y36xttk1.htm and here's the documentation example on STYLE/MERGE: https://go.documentation.sas.com/doc/ja/pgmsascdc/9.4_3.5/proc/p112rxxyjcv5ryn119is0iouzfus.htm.
If you are having trouble with CALL DEFINE and using STYLE or STYLE/REPLACE or STYLE/MERGE with a CALL DEFINE with PROC REPORT you may want to open a track with Tech Support.
Cynthia
Hi,
My question is not directly related to the other topic.
I'm preparing a presentation for SAS users and try to avoid mistakes.
'style/merge' is clear to me. I didn't even mentioned it in this post.
From all the reading I've done, I couldn't see any difference between 'style' and 'style/replace'. They both provide the same output.
In the documentation one example uses 'style' in a first call define and 'style/replace' in the next one.
But if you test it with 'style' attribute in both routines, you get the same result.
So I guess if there is a difference, only the developer knows it.
Although it is clearly indicated that 'style/merge' was introduced with SAS 9.2 https://support.sas.com/kb/43/758.html
I didn't see any similar statement for style/replace.
So my expectation is to read somewhere something like this 'style/replace' was introduced with SAS 9.2; it is an alias of 'style' or to find an example showing a real difference between the two.
Hi:
To find out when style/replace was introduced, you would need to examine the past documentation. There was a major rewrite of Style syntax for Style templates in SAS 9.2; and also PROC REPORT was enhanced in SAS 9.2, as I remember.
In the What's New for SAS 9.2, they only refer to STYLE/MERGE, here: https://support.sas.com/documentation/cdl/en/whatsnew/62580/PDF/default/whatsnew.pdf page 29-30. But do not list STYLE/REPLACE. However, in the PROC REPORT documentation for 9.2 on page 1030, it shows: https://support.sas.com/documentation/cdl/en/proc/61895/PDF/default/proc.pdf STYLE/REPLACE.
This paragraph implies that STYLE and STYLE/REPLACE work the same way:
Then when I looked in the 9.1 documentation for PROC REPORT here: https://support.sas.com/documentation/onlinedoc/91pdf/sasdoc_91/base_proc_6982.pdf and do not see STYLE/REPLACE listed on page 892.
STYLE/REPLACE could have been introduced in one of the maintenance releases, like 9.1.2 or 9.1.3 but it was first in the 9.2 documentation so saying that it was available in 9.2 seems to be supported by doc. If you need more certainty that what the documentation shows, you will need to check with Tech Support.
Cynthia
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.