BookmarkSubscribeRSS Feed
joseph17
Calcite | Level 5
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
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
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
joseph17
Calcite | Level 5
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

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
  • 2 replies
  • 798 views
  • 0 likes
  • 2 in conversation