DATA Step, Macro, Functions and more

TEMPLATE: restore reference object and find parent template

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 83
Accepted Solution

TEMPLATE: restore reference object and find parent template

Can anyone explain the following:

 

132 proc template ;

133 path work.templat ;

134 source styles.novumstyle ;

WARNING: Could not restore referenced object: Styles.Printer.

WARNING: Could not find parent template: Styles.Printer.

define style Styles.Novumstyle;

parent = Styles.Printer;

class fonts /

'docFont' = ("Times New Roman",9pt)

'headingFont' = ("Times New Roman",9pt,bold)

'headingEmphasisFont' = ("Times New Roman",9pt,bold italic)

'FixedFont' = ("Courier New",9pt)

'BatchFixedFont' = ("Courier New",9pt)

'FixedHeadingFont' = ("Courier New",9pt,bold)

'FixedStrongFont' = ("Courier New",9pt,bold)

'FixedEmphasisFont' = ("Courier New",9pt)

'EmphasisFont' = ("Times New Roman",9pt,italic)

'StrongFont' = ("Times New Roman",10pt,bold)

'TitleFont2' = ("Times New Roman",10pt)

'TitleEmphasisFont' = ("Times New Roman",10pt,bold)

'TitleFont' = ("Times New Roman",10pt);

class table /

backgroundcolor = color_list('BGT')

borderwidth = 1.0pt

borderspacing = 0.5pt

cellpadding = 2.0pt

rules = groups

frame = hsides;

class color_list /

'BG' = white

'FG' = black

'BGD' = white

'BGT' = white

'BGH' = white

'LINK' = blue;

end;

NOTE: Path 'Styles.Novumstyle' is in: WORK.TEMPLAT.

135 run ;

NOTE: PROCEDURE TEMPLATE used (Total process time):

real time 0.00 seconds

cpu time 0.01 seconds

 

136

137

138 proc template ;

139 define style

140 Styles.Printer / store = work.templat

141 ;

142 parent = Styles.Printer ;

143 end ;

NOTE: STYLE 'Styles.Printer' has been saved to: WORK.TEMPLAT

144 run ;

NOTE: PROCEDURE TEMPLATE used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

145

146 proc template ;

147 path work.templat ;

148 source styles.novumstyle ;

define style Styles.Novumstyle;

parent = Styles.Printer;

class fonts /

'docFont' = ("Times New Roman",9pt)

'headingFont' = ("Times New Roman",9pt,bold)

'headingEmphasisFont' = ("Times New Roman",9pt,bold italic)

'FixedFont' = ("Courier New",9pt)

'BatchFixedFont' = ("Courier New",9pt)

'FixedHeadingFont' = ("Courier New",9pt,bold)

'FixedStrongFont' = ("Courier New",9pt,bold)

'FixedEmphasisFont' = ("Courier New",9pt)

'EmphasisFont' = ("Times New Roman",9pt,italic)

'StrongFont' = ("Times New Roman",10pt,bold)

'TitleFont2' = ("Times New Roman",10pt)

'TitleEmphasisFont' = ("Times New Roman",10pt,bold)

'TitleFont' = ("Times New Roman",10pt);

class table /

backgroundcolor = color_list('BGT')

borderwidth = 1.0pt

borderspacing = 0.5pt

cellpadding = 2.0pt

rules = groups

frame = hsides;

class color_list /

'BG' = white

'FG' = black

'BGD' = white

'BGT' = white

'BGH' = white

'LINK' = blue;

end;

NOTE: Path 'Styles.Novumstyle' is in: WORK.TEMPLAT.

149 run ;

NOTE: PROCEDURE TEMPLATE used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

150 %put &SYSODSPATH. ;

WORK.TEMPLAT(READ) SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ)

 

Why should I have to "bring" styles.printer into work.templat?

 

Thank you,

 

Kevin


Accepted Solutions
Solution
‎11-07-2016 12:32 PM
Frequent Contributor
Posts: 136

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to KevinViel

You mentioned  " path work.templat " in your code at the starting. This overrides the ods path

 

FYI : https://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/viewer.htm#a001023171.htm

 

 

Thanks,
Suryakiran

View solution in original post


All Replies
Super User
Posts: 11,343

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to KevinViel

You may want to use the SHOW option with your path settings. Perhaps you temporarily removed SASHELP.TMPLMST from the Path value that SAS is attempting to use so that it couldn't find the base styles.printer

Frequent Contributor
Posts: 83

Re: TEMPLATE: restore reference object and find parent template

Ballard,

 

  In lines 138-144, I create styles.printer in work.templat, so it is available.  Correct me if I am wrong, but &SYSODSPATH. has the same paths and settings as ODS SHOW, no?  This is the contigous log, so I run nothing to change the paths.

 

Thank you,

 

Kevin

 

Frequent Contributor
Posts: 136

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to KevinViel

Run the following code and check weather you got printer style or not.

 

 

proc template; list styles;

run;

Thanks,
Suryakiran
Frequent Contributor
Posts: 83

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to SuryaKiran

Surya,

 

  My response to Ballard addresses your kind post:

 

In lines 138-144, I create styles.printer in work.templat, so it is available.  Correct me if I am wrong, but &SYSODSPATH. has the same paths and settings as ODS SHOW, no?  This is the contigous log, so I run nothing to change the paths.

 

 

Thank you,

 

Kevin

Solution
‎11-07-2016 12:32 PM
Frequent Contributor
Posts: 136

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to KevinViel

You mentioned  " path work.templat " in your code at the starting. This overrides the ods path

 

FYI : https://support.sas.com/documentation/cdl/en/odsug/61723/HTML/default/viewer.htm#a001023171.htm

 

 

Thanks,
Suryakiran
Frequent Contributor
Posts: 83

Re: TEMPLATE: restore reference object and find parent template

Posted in reply to SuryaKiran

Indeed, removing the PATH statement when attempting to obtain the SOURCE did not limit the search to the itemstors.  Assuming that the ODS PATH is correct, then STYLES.PRINTER was found.

 

Thank you,

 

Kevin

☑ This topic is solved.

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

Discussion stats
  • 6 replies
  • 295 views
  • 0 likes
  • 3 in conversation