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 (November 2009, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 20 Nov 2009 20:53:17 -0500
Reply-To:   Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Nathaniel Wooding <nathaniel.wooding@DOM.COM>
Subject:   Re: CAN'T GET LABELS TO PRINT
Comments:   To: Carol Thurman <erbcjt@langate.gsu.edu>
In-Reply-To:   <4B06C458020000E200031171@mailsrv4.gsu.edu>
Content-Type:   text/plain; charset="utf-8"

Carol

On further thought following a little reflection. If you indeed simply want to recode variable values, you could leave them in the original value and use the formats to change the values when they are presented in your final tables. For one thing, this would save a lot of storage space since some of your strings are a hundred or so characters long.

Nat

-----Original Message----- From: Carol Thurman [mailto:erbcjt@langate.gsu.edu] Sent: Friday, November 20, 2009 4:31 PM To: Nathaniel Wooding (Services - 6); SAS-L@LISTSERV.UGA.EDU Subject: Re: CAN'T GET LABELS TO PRINT

This is an email that I sent a month ago explaining what I want to do. I know that my data is "fat" and I need to make it "skinny", thus the proc transpose but I just can't get past that hurdle.

I need to create a report that has a table with columns. At the top of each page is the person's name. The table has 8 columns. The name of the subscale is at the top (right above the table) of each table to the far left. The first cell (A1) in the first column has the text "My Principal...", then right underneath that in cell A2 the items begin. Item 1 says, "exhibits an understanding..." Cell B1 has the text "Strongly Agree", cell C1 "Agree", cell D1 "Disagree', cell E1 "Strongly Disagree", cell F1 "Not Applicable". Item 2 begins in cell A3. Percentages are in cells B2, C2, D2, E2, and F2 for item 1. The table is the same for the other items that fall under that subscale. There are other tables just like what I described for the remaining 9 subscales. The last page of the report has a table that compares the assistant principal's percentages on each of the competencies to All school Principals in that school region and to All Principals in the entire school district. A region is comprised of a number of schools. Our school system has 8 regions.

I have one text file per school. I was told that I need to first transpose the data before using proc tabulate or proc report. I am fairly new at this and am having a hard time with proc transpose.

I have copied the first line of a text file below so you can refer to it.

N 405001 ABBBBBBBAABBBBABBBAABBBBBBAAAABBAAAAAAAABBBBBBBBBAAAAAAAAAAAABBBBBBBBBBBBBBBBB

The data doesn't start until after the N. After the N, the first 3 digits are the school code followed by 001 or 002 indicating whether or not the respondent is classified staff or non-classified staff.

I know I need to use either proc tabulate or proc report or both to come up with the finished product which would be tables in Word that summarizes the data.

>>> Nathaniel Wooding <nathaniel.wooding@DOM.COM> 11/20/09 10:45 AM >>> Carol

Could you post a simplified version of what you want your output to look like, please. Here is a simple version of your job.

data P301; input @1 ID 3. @4 Job 1. @6 (q1-q2) ($1.); CARDS; 1111 AB 2222 CD RUN; proc sort data=P301; by Job;

proc transpose data=P301 Out=NewP301 name=ques prefix=Response; by job; var q1-q2; run; data PT301; set NewP301;

label q1="1. Exhibits an understanding of the curriculum" q2="2. Facilitates teachers’ understanding of what is to be taught and tested" run;

proc print label data=PT301; title 'PAL Tables'; run;

First, the Transpose creates a normalized form of what you start with:

NAME OF FORMER Obs Job VARIABLE Response1 1 1 q1 A 2 1 q2 B 3 2 q1 C 4 2 q2 D

Secondly, the prefix = response in your Transpose statement tells SAS to prepend the word Response to the beginning of the new variable names. Hence, you do not have any variables named "Qsomething".

I am not going to go any further for now since I'm not certain what you want your final report to look like.

However, I will add that if you did a print on the set p301, you proc print should work and use the labels. However, the resulting output would be very hard to read .

Nat Wooding

-----Original Message----- From: Carol Thurman [mailto:erbcjt@langate.gsu.edu] Sent: Friday, November 20, 2009 10:24 AM To: Nathaniel Wooding (Services - 6); SAS-L@LISTSERV.UGA.EDU Subject: Re: CAN'T GET LABELS TO PRINT

I've copied my code below but did not include all of the label statements. Help!

Thanks,

Carol

>>>>>options ls=80; >>>>>title1 "PAL Report";

>>>>>filename io "J:\PAL Raw Data\";

>>>>>data P301; >>>>> infile io (P301.yyy) missover; >>>>> input @4>>>>>proc transpose data=P301 Out=NewP301 >>>>>name=ques >>>>>prefix=Response; >>>>>by job; >>>>>var q1-q78; >>>>>run; >>>>>data PT301; set NewP301;

>>>>> label q1="1. Exhibits an understanding of the curriculum" >>>>> q2="2. Facilitates teachers’ understanding of what is to be taught and tested" >>>>>run;

>>>>>proc print label data=PT301; >>>>>title 'PAL Tables'; >>>>>run;

>>> Nathaniel Wooding <nathaniel.wooding@DOM.COM> 11/20/09 10:04 AM >>> Carol

Please post your current code. The proc print is definitely printing labels since Name of Former Variable is a label of _NAME_.

Nat Wooding

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Carol Thurman Sent: Friday, November 20, 2009 9:56 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: CAN'T GET LABELS TO PRINT

Okay, I made the change but I still cannot get the labels to print. I would like to see the label names instead of the "q1, q2" etc. There are 66 responses. I just showed the first two. I have copied a few lines of the output table:

Obs Job NAME OF FORMER VARIABLE Response1 Response2 1 1 q1 A A

Please help, if you can. I just can't seem to get past this. I want to be able to eventually use proc report ...

>>> Ya Huang <ya.huang@AMYLIN.COM> 11/19/09 4:24 PM >>> In your proc print, your data is NewP301, but the label was added to P301.

On Thu, 19 Nov 2009 16:18:09 -0500, Carol Thurman <erbcjt@LANGATE.GSU.EDU> wrote:

>I can't get the labels to print. What am I doing wrong? I've emailed >before but I can't seem to get past this hurdle. > >Carol > > >>>>>filename io "J:\PAL Raw Data\"; > >>>>>data P301; >>>>>> infile io (P301.yyy) missover; >>>>>> input @41 ID 3. @46 Job 1. @52 (q1-q78) ($1.); > > >>>>>>ods rtf file='J:\PAL 2009\PAL.rtf'; >>>>>>proc sort data=P301; >>>>>>by Job; > >>>>>proc transpose data=P301 Out=NewP301 >>>>>name=Items >>>>>prefix=Response; >>>>>by job; >>>>>var q1-q78; >>>>>run; >>>>>data P301; set NewP301;*/ > >>>>>>> label item1="1. Exhibits an understanding of the curriculum" >>>>>>> item2="2. Facilitates teachers’ understanding of what is to be >taught and tested" >>>>>>> item3= "3. Supports opportunities for teachers to develop >in-depth knowledge of their content" >>>>>>>run; > >>>>>>>proc print label data=NewP301; >>>>>>>title 'PAL Tables'; >>>>>>>run; >>>>>>>>ods rtf close;

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.

CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


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