Date: Mon, 7 Jul 2003 16:55:24 -0400
Reply-To: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <HERMANS1@WESTAT.COM>
Subject: Re: Proc Report question
Content-Type: text/plain; charset="iso-8859-1"
I've constructed a simple example:
data test;
line=1;
instnm1='XXXXX';
run;
proc report data=test nowindows split='#' spacing=1 headline;
column line instnm1;
define line / order noprint;
define instnm1 / display noprint;
compute before line ;
line @1 "Institution Name: " instnm1 $50.;
endcomp;
run;
quit;
See what happens when you put an asterisk (*) before the statement 'define
instnm1 / display noprint;'. The source dataset already has the variable
instnm1 defined.
Sig
-----Original Message-----
From: Keith J. Brown [mailto:kjb@GA.UNC.EDU]
Sent: Monday, July 07, 2003 3:00 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Proc Report question
Hi gang,
I know this is going to turn out to be something really simple, but
I'm tired of banging my head against the wall.
The Problem: Using proc report, I'd like to generate a bunch of text
lines before each value of 'line'. The code below generates everything
in place properly, except that none of the variable values actually show
up. So, I have a line that says
Institution Name:
but the actual name is blank. I've checked, and there are values for
all the variables so I ought to be getting something showing up there.
Any hints?
Thanks,
Keith
The Code:
proc report data=ref1 nowindows split='#' spacing=1 headline;
by inst instnm;
column instnm1 item002 unitid name1 email phone fax
address
line form pswd duedate;
define line / order noprint;
define instnm1 / display noprint;
define item002 / display noprint;
define unitid / display noprint;
define name1 / display noprint;
define email / display noprint;
define phone / display noprint;
define fax / display noprint;
define address / display noprint;
define form / display ;
define pswd / display ;
define duedate / display ;
compute before line ;
line @1 "Institution Name: " instnm1 $50.;
line @1 "FICE Code: " item002 $6.
@40 "IPEDS Unitid: " unitid $6.;
line @1 "Primary Contact for NCHED Referral: " name1 $100.;
line @1 "Email Address: " email $100.;
line @1 "Phone: " phone $35.
line @40 "Fax: " fax $35.;
line @1 address $100.;
line @1 "NCHED Data Collection URL: "
@28 "http://www.stat-rpts.northcarolina.edu/nched";
endcomp;
run;
quit;