LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2006, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 21 Sep 2006 12:45:49 -0400
Reply-To:   SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM>
Subject:   Re: Column values in Labels
Comments:   To: Toby Dunn <tobydunn@HOTMAIL.COM>

Hi Toby,

That is a good answer. But since I need to update the ACTUAL value of DT1 column corresponding to the each SUBID, I have difficulty in putting the same. The value of Screening DT1 depends upon the value of corresponding SUBID.

I have code looks like this in the proc report.

define col1 / display center "Screening [xxxxx]";

The DT1 should be there in the place of [xxxxx].

Could you help me do this.

--------------------------------------------------------------------------- Chandra ,

Apply a format to your value in the proc report.

Toby Dunn

When everything is coming at you all at once, your in the wrong lane.

A truly happy person is someone who can smile and enjoy the scenery on a detour.

From: SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM> Reply-To: SUBSCRIBE SAS-L Chandra Gadde <ddraj2015@GMAIL.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Column values in Labels Date: Thu, 21 Sep 2006 12:25:31 -0400

Hi Mark,

Thank you very much for your answer. It did really help me. Is there anyway, I can do the same thing using PROC REPORT? Because I have asked to use PROC REPORT to solve this.

Chandra,

Hi Chandra,

Here is one of many approaches:

data sample; input SUBID COL1 DT1 $9.; cards; 1020 3.4 08/MAY/06 1020 4.5 08/MAY/06 1020 4.6 08/MAY/06 1021 7.8 19/AUG/06 1021 8.7 19/AUG/06 1021 9.5 19/AUG/06 1022 8.8 11/SEP/06 1022 9.8 11/SEP/06 1022 9.9 11/SEP/06 ; run;

proc format; value theTest 1 = 'EDC' 2 = 'LDC' 3 = 'MDC' ; run;

data _null_; length stmp $200; dashline = repeat('-',73); retain sublineno 0;

file 'c:\temp\MyOutput.txt'; set sample end=done; by SUBID;

* one-time header stuff ; if _N_ eq 1 then do; put @26 'Hematology Listing'; put dashline; end;

* iterative stuff ; if first.SUBID then do; sublineno = 0; put 'Subject: ' SUBID; put dashline; put 'Test' @23 'Screening'; put @23 DT1; put dashline; end; sublineno + 1; put sublineno theTest. @23 COL1; if last.SUBID then put dashline;

* one-time footer stuff ; if done then do; end;

run;

Hope this is helpful.

Mark Terjeson Senior Programmer Analyst, IM&R Russell Investment Group

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of SUBSCRIBE SAS-L Chandra Gadde Sent: Thursday, September 21, 2006 6:07 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Column values in Labels

Hi All,

I have a data set that looks like this. (I have lot of other variables as well in addition to these columns).

SUBID COL1 DT1 1020 3.4 08/MAY/06 1020 4.5 08/MAY/06 1020 4.6 08/MAY/06 1021 7.8 19/AUG/06 1021 8.7 19/AUG/06 1021 9.5 19/AUG/06 1022 8.8 11/SEP/06 1022 9.8 11/SEP/06 1022 9.9 11/SEP/06

Each SUBID had one value for DT1. I need the output in this fashion.

Hematology Listing ------------------------------------------------------------------------ - Subject: 1020 ------------------------------------------------------------------------ - Test Screening 08/MAY/06 ------------------------------------------------------------------------ - EDC 3.4 LDC 4.5 MLC 4.6 ------------------------------------------------------------------------ -- Subject: 1021 ------------------------------------------------------------------------ -- Test Screening 19/AUG/06 ------------------------------------------------------------------------ -- EDC 7.8 LDC 8.7 MLC 9.5 ------------------------------------------------------------------------ -- Test Screening 11/SEP/06 ------------------------------------------------------------------------ -- EDC 8.8 LDC 9.8 MLC 9.9 ------------------------------------------------------------------------ --

I have done most part of this. But I don't know how to get the Lable name ---------- Screening DT1 --------- Please help me...


Back to: Top of message | Previous page | Main SAS-L page