The SAS Output Delivery System and reporting techniques

title for each line created by proc print by

Reply
Regular Contributor
Posts: 196

title for each line created by proc print by

Is there a way to produce a title for each by group instead of just having one title at the top of the output?
For example,
a1=1,2,2,3,3 and b1=10,20,21,24,33
title1 "Test";
proc print data=test;by a1;var b1;run;
Test
a1=1
10
Test
a1=2
20
21
Test
a1=3
24
33
SAS Super FREQ
Posts: 8,740

Re: title for each line created by proc print by

Hi:
Investigate the use of #BYVAR, #BYVAL and #BYLINE automatic variables or directivesthat you can use in a SAS TITLE statement with BY group processing, as described in this paper:
http://www2.sas.com/proceedings/sugi23/Coders/p75.pdf

cynthia
Regular Contributor
Posts: 196

Re: title for each line created by proc print by

This worked well. Thank you.
Ask a Question
Discussion stats
  • 2 replies
  • 120 views
  • 0 likes
  • 2 in conversation