The SAS Output Delivery System and reporting techniques

Adding a root bookmark to PDF

Reply
Occasional Contributor
Posts: 6

Adding a root bookmark to PDF

Hi,

I'm using ODS PDF to create listings of data with bookmarks.
The bookmarks describing particular modules are created with:

ods proclabel='Module name N'

and the bookmarks in my PDF file look like

|
Module name 1
Module name 2
...

I'm wondering if there is an option (I mean - in the code) to create a root bookmark in this file without modifing the 1st level bookmarks - what I want to get is:

Patient X
|_Module name 1
|_Module name 2
|_ ...

The question is - how to obtain such structure?

Thanks,
Michal
SAS Super FREQ
Posts: 8,868

Re: Adding a root bookmark to PDF

Hi:
You say you want to add a "root" bookmark, but you do not show much about what procedures you are using for Module 1 output and Module 2 output. The reason I ask is that in some procedures, you have the CONTENTS= option -- in the procedure -- that would rename the lower level links and you might consider adding your Module 1 and Module 2 labels there -- and use ODS PROCLABEL for your top level node.

But without having a better idea of your procedures of interest, it is hard to comment constructively. For example are you using PROC MEANS, PROC FREQ, PROC REPORT, PROC TABULATE and are you using BY group processing (such as a BY group for each patient) or you are using DATA step processing (DATA _NULL_ and FILE PRINT ODS) or is SAS Macro processing involved???

Also, when you say you want to make changes "in the code" -- what do you mean -- whether changes can be made "in the code" depends on the code -- which you haven't shown.

cynthia
Occasional Contributor
Posts: 6

Re: Adding a root bookmark to PDF

Posted in reply to Cynthia_sas
Hi,

Thank you for the reply.
For all the modules I'm using either PROC PRINT (90%) or PROC REPORT - in all cases I'm setting CONTENTS to "" to avoid bookmarks like:

The Print Procedure
|_Module 1

I was trying to type module's name in CONTENTS and use ods proclabel for top level node, but the result was:

Patient X
|_Module 1
The Print Procedure
|_Module 2
The Print Procedure
|_Module 3
...

Each module takes data from different dataset, so I have to run several procedures (almost always it's one procedure per module). I'm not using BY group processing anywhere. I use only simple data step processing and printing by above mentioned procedures.

The code I'm using for each module is just:

ods proclabel= 'Module N';
proc print data=temp1 label width=min noobs contents='' split='$';
label x='ID'
y='Start Date'
z='End Date'
...
;
var x y z ...;
run;

What I want to get is simply:

Patient X
|_Module 1
|_Module 2
|_Module 3
...

If you have any ideas how to produce such an output, I'd grateful.

Thanks,
Michal
Ask a Question
Discussion stats
  • 2 replies
  • 224 views
  • 0 likes
  • 2 in conversation