BookmarkSubscribeRSS Feed
Lex_SAS
SAS Employee
I'm using the ODS DATA Step Object to create PDFs.

obj.open_dir( name: "Analysis", Label: "Analysis" );
....
obj.table_start(Label:"");

I want the "Analysis" bookmark, but I tried to get rid of the bookmarks at the start of the table by specifying an empty string, but that still creates a bookmark (with a blank text).

How do I get rid of bookmarks at table start, without completely disabling bookmarks ?

Thanks,

Lex Jansen
11 REPLIES 11
DanO_sas_com
SAS Employee
Lex,

There currently is not a way to suppress the bookmarks of the tables that are created. I will consider adding an features in the future to enhance the Table of contents management.

Thanks,
Dan
Lex_SAS
SAS Employee
Dan,

Thanks.
For now I think I will be able to work around it by using ODS PS BOOKMARK and then post-processing the postscript file before I send it to Distiller.

I'm already doing this to better control other bookmarks.

Lex
Cynthia_sas
SAS Super FREQ
Hi, Lex:
I thought I'd mention ODS DOCUMENT/PROC DOCUMENT. Since you can add, insert, rearrange, relabel and delete the output objects and insert, rearrange, relabel and delete folder levels for the output objects' folders, it is also possible to save your objects in a document store and build your bookmark structure using ODS DOCUMENT/PROC DOCUMENT. When you replay a new ODS DOCUMENT, the new/changed folder and object labels become bookmarks. That would take care of the "section/folder" and "object" bookmarks.

You probably already thought of this as a possibility, but for folks who don't know about the ability to change the TOC in this way, I thought it worth mentioning.

cynthia
Olivier
Pyrite | Level 9
Hi all.
I thought I would reply something on Document as Cynthia did. But I did a quick test and ODSOUT does not seem to be supported (in 9.1.3 SP4) in the Document destination.
Is that correct, Dan ? Or did I miss some important option ?

Cheers,
Olivier
David_SAS
SAS Employee
Yes, the ODS DOCUMENT destination does not support the ODS DATA Step Object in SAS 9.1 (or 9.2). ODS DATA Step Object works only with formatted destinations such as ODS HTML, ODS RTF, and ODS PDF.

-- David Kelley, SAS
Lex_SAS
SAS Employee
Is there a way to control the name of the ANCHORS being created in the ODS PDF data Step Object ?

Thanks,
Lex
Lex_SAS
SAS Employee
Thanks, David.

I knew the ANCHOR statement, but can I use it within the data step ?
Say, I create 3 tables within the ODS Data Step Object per observation, can I create achors like: ANCH_OBS1_TAB1, ANCH_OBS1_TAB2, ANCH_OBS1_TAB3, ANCH_OBS2_TAB1, ...

Or even, just one per observation: ANCH_OBS1, ANCH_OBS2, ...
I guess the question is really if I can create anchors data driven.

Thanks,
Lex
Lex_SAS
SAS Employee
To add:
I do not know how many output objects I will have per observation, so to be able to link to the first object of an observation I need hardcoded anchors, not just the root name.

Lex
Cynthia_sas
SAS Super FREQ
Hi, Lex:
I have done this successfully:
[pre]
ods pdf file='wombat.pdf' anchor1='tab1';

**proc step;

ods pdf anchor='tab2';

**proc step;

ods pdf close;
[/pre]

Since ANCHOR= goes on the ODS PDF statement, it applies to the whole output object. I don't think that the anchors ever get down to the observation level in -regular- ODS. I have used the PDF anchors in the URL= option, as in URL="#tab2" -- but I'm not sure how you could implement ANCHOR= at the obs level. I know you can reference a URL at the OBS level -- but I don't know how to set an ANCHOR at the obs level.

That's outside the world of the DATA step object. It's an interesting question. (I know, that's no help...)

cynthia
DanO_sas_com
SAS Employee
Lex,

There is no way to get rid of the book marks in the current release. I will have to develop a new feature.

Thanks,
Dan

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 11 replies
  • 2025 views
  • 0 likes
  • 5 in conversation