Desktop productivity for business analysts and programmers

Bookmark in PDF

Reply
Occasional Learner ks9
Occasional Learner
Posts: 1

Bookmark in PDF

Dear All,

 

I am using the below code to modify my bookmarks in pdf. The commented out (the pink font) portion is giving the error.

 

ods document close;

ods listing;

%macro FixBookmarks();

%local n;

/** Find the bookmark names in the ODS document **/

*ods all close;

 

ods output properties=PropertiesData;

proc document name=s_data.mypdf;

list / details levels=all;

run;

quit;

ods output close;

/** How many bookmarks are we talking about? **/

 

proc sql noprint;

select count(*)

into :N

from PropertiesData

where type ne "Dir"

 

;

%let N=&n;

%put "N=" &N.;

/** Get bookmark info into macro variables **/

 

select cats(path)

into :B1-:B&n

from PropertiesData

where type ne "Dir"

 

;

%put local;

 

quit;

/** Build the PDF **/

 

/* ods listing close;*/

/* proc document name=s_data.s&&s_&i.(write);*/

/* make s&&s_&i.;*/

/* dir \s&&s_&i.#1;*/

/* setlabel \s&&s_&i. "s&&s_&i."; */

/* %do z=1 %to &N;*/

/* setlabel \s_data.mypdf&&B&z "&&label&z.";*/

/* copy \s_data.mypdf&&B&z to ^;*/

/* replay \s_data.mypdf&&B&z;*/

/* run;*/

/* %end;*/

/* dir ^^;*/

/* quit;*/

/* ods document close;*/

%mend;

 

%FixBookmarks();

 

I am creating patient profile for one of my clinical study. I am using do loops to create multiple datasets for each subject of my study.
 
Inline image 2
  
I don't want that subject ID is repeating with each data. I want second node to be without Subject ID. I would like this way:
 
25226001004
       Demographic
       Medical History
       Vital Sign
 
25226002002
      Demographic
       Medical History
       Vital Sign
 
Thanks a lot!!
KS
Ask a Question
Discussion stats
  • 0 replies
  • 185 views
  • 0 likes
  • 1 in conversation