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 (July 2000, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 13 Jul 2000 18:24:32 +0200
Reply-To:     Wiel Maessen <wiel@PWCONS.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Wiel Maessen <wiel@PWCONS.COM>
Organization: UUNET-NL (http://www.nl.uu.net)
Subject:      Re: Help with this code please Question 2

What about a MERGE?

Template:

DATA newdata; MERGE orig empl; BY employee; RUN;

> -----Original Message----- > From: mrstevejones@my-deja.com [mailto:mrstevejones@my-deja.com] > Posted At: Thursday, July 13, 2000 16:05 > Posted To: sas > Conversation: Help with this code please Question 2 > Subject: Re: Help with this code please Question 2 > > > OK guys, I got this to work but I discovered a problem. If > the employee > has not entered anytime he is not in the 1st dataset. > I found a dataset with my entire department. > Cordidal.LTD.CFA9166.PNB12L7 > > How do I pull employees that have not even entered anything and still > use the below code for those that have. > > I thinking of a Join of sometype on the Employee name, But I > don't know > how to go about it. > > My Goal is to create a report that reflect employees that have not > entered 40 or more hours for any given week. > > I could do this with FOCUS :( > > Steve > > > In article <8k7bfa$2cn$1@porthos.nl.uu.net>, > "Wiel Maessen" <wiel@pwcons.com> wrote: > > Depends where you want the selection take place. If it's only in the > PRINT > > list, when the aggregation has taken place, add a > > > > WHERE total<40; > > > > after the PROC print statement. > > > > If you want to select it while reading the 'raw' data > (DATA-step) add > > > > IF hours<40; > > > > directly after the INPUT statement. > > > > -- > > Wiel Maessen > > PW Consulting > > > > See our SAS Tips at: > > http://www.pwcons.com/Tips > > <mrstevejones@my-deja.com> wrote in message > > news:8k284s$318$1@nnrp1.deja.com... > > > I've been using the following code ( Modifing as needed ) > > > > > > What I'm trying to do now is only print the employees > that have not > > > entered 40 or more hours. > > > > > > How do I do this. I sure I need to use if HOURS LT 40 > > > > > > But I don't know where to place this operator. > > > > > > Please help or give me a hint. > > > > > > Steve > > > > > > > > > //CFA9166B JOB (FA010000,TEST),'ITE RPT/S.JONES', > > > 00010014 > > > // CLASS=A, > > > 00020000 > > > // NOTIFY=CFA9166, > > > 00030011 > > > // MSGCLASS=X, > > > 00040000 > > > // REGION=6M > > > 00050000 > > > //JS010 EXEC SAS,OPTIONS='MACRO' > > > 00070000 > > > //ITEHIST DD DSN=CORD1DAL.ITES.CUSTRPT.CFA9166,DISP=SHR > > > 00080011 > > > //SASLIST DD DSN=CORD1DAL.ITE.STEVE.BILLYTD,DISP=OLD > > > 00080115 > > > //*ASLIST DD SYSOUT=* > > > 00080200 > > > //*ASLIST DD SYSOUT=A,DEST=(CEN678), > > > 00081000 > > > //* HOLD=YES > > > 00082000 > > > //SYSIN DD * > > > 00083000 > > > > > > 00084000 > > > OPTIONS NOCAPS REPLACE SOURCE MISSING = ''; > > > 00085000 > > > > > > 00086000 > > > DATA _NULL_; > > > 00087000 > > > N1 = > 'ACBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBF'X > > > 00088000 > > > || 'BFBFBFBC'X; > > > 00089000 > > > N2 = '4F'X; > > > 00090000 > > > N3 = > 'ABBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBFBF'X > > > 00100000 > > > || 'BFBFBFBB'X; > > > 00110000 > > > CALL SYMPUT("XX1",N1); > > > 00120000 > > > CALL SYMPUT("XX2",N2); > > > 00121000 > > > CALL SYMPUT("XX3",N3); > > > 00122000 > > > > > > 00123000 > > > DATA DATEPARM; > > > 00124000 > > > FORMAT FIRSTDAY YYMMDD8.; > > > 00125000 > > > FIRSTDAY = DATEJUL(JULDATE(TODAY())-WEEKDAY(TODAY())); > > > 00126000 > > > FDAY = PUT(FIRSTDAY,MMDDYY8.); > > > 00127000 > > > CALL SYMPUT('TDAY',FDAY); > > > 00128000 > > > > > > 00129000 > > > DATA ITE1; > > > 00130000 > > > INFILE ITEHIST; > > > 00140000 > > > INPUT > > > 00150000 > > > @2 ITEDATE YYMMDD6. > > > 00160000 > > > @10 DPSR $4. > > > 00170000 > > > @19 LABCODE $8. > > > 00180000 > > > @33 HOURS 8.2 > > > 00190000 > > > @42 DPSRDESC $25. > > > 00200000 > > > @68 RESNAME $20. > > > 00210000 > > > @94 RESTYPE $1. > > > 00220000 > > > @102 TEAMCODE 3. > > > 00230000 > > > @109 PROJID $8. > > > 00240000 > > > @117 PROJDESC $25. > > > 00250000 > > > @143 DIRECTOR $20. > > > 00260000 > > > @165 BILLIND $1. > > > 00270000 > > > @168 TEAMDESC $15. > > > 00280016 > > > @194 RESCC $6. > > > 00281016 > > > @204 DPSRTEAM 3.; > > > 00282016 > > > > > > 00290000 > > > IF DPSR EQ '' OR LABCODE EQ '' > > > 00300094 > > > OR RESNAME EQ '' THEN DELETE; > > > 00310000 > > > > > > 00320000 > > > DPSR1 = DPSR || ' ' || DPSRDESC; > > > 00330000 > > > > > > 00340000 > > > IF DPSRTEAM IN > (010,018,019,020,032,052,093,121,139,140,141,163,168, > > > 00390083 > > > 169,181,198,199) OR > > > 00400083 > > > (RESCC = "0846 ") THEN OUTPUT ITE1; > > > 00410083 > > > TITLE1 "xxxx xxxxx ITE REPORT 06/25/99-07/01/00"; > > > 00521092 > > > /******************************/ > > > 01180000 > > > /* STEVE xxxx 816-854-xxxx */ > > > 01190021 > > > /******************************/ > > > 01200000 > > > > > > 01210000 > > > PROC SORT DATA=ITE1; > > > 01220000 > > > BY TEAMCODE RESNAME; > > > 01230093 > > > > > > 01240000 > > > PROC MEANS DATA=ITE1 NOPRINT SUM; > > > 01250000 > > > VAR HOURS; > > > 01260000 > > > BY TEAMCODE RESNAME; > > > 01270093 > > > OUTPUT OUT=PIDSUM SUM=TOTAL; > > > 01280095 > > > > > > 01290000 > > > PROC SORT DATA=PIDSUM; > > > 01300000 > > > BY TEAMCODE RESNAME; > > > 01310093 > > > > > > 01320000 > > > PROC PRINT DATA=PIDSUM NOOBS SPLIT='*'; > > > 01330000 > > > TITLE2 'BY PROJECT ID AND DPSR AND TEAM CODE AND RESOURCE'; > > > 01340000 > > > TITLE3 ' TOTAL HRS/SYS DEV NET '; > > > 01350005 > > > VAR RESNAME TOTAL; > > > 01360093 > > > BY TEAMCODE; > > > 01370093 > > > ID TEAMCODE; > > > 01380093 > > > SUM TOTAL; > > > 01390000 > > > LABEL RESNAME = 'RESOURCE*NAME' > > > 01400000 > > > /* DPSR1 = 'DPSR' > > > 01410093 > > > TEAMCODE = 'TEAM*CODE' > > > 01420000 > > > /* PROJID = 'PROJECT*ID' > > > 01430093 > > > /* TEAMDESC = 'TEAM*DESCRIPTION' > > > 01440093 > > > TOTAL = 'TOTAL*HOURS'; > > > 01450000 > > > /*FOOTNOTE1 "&XX1"; > > > 01460069 > > > /*FOOTNOTE2 "&XX2 &XX2"; > > > 01470069 > > > /*FOOTNOTE3 "&XX2 STEVE XXXXXX 854-xxxx &XX2"; > > > 01480069 > > > /*FOOTNOTE4 "&XX2 &XX2"; > > > 01490069 > > > /*FOOTNOTE5 "&XX3"; > > > 01500069 > > > > > > 01510000 > > > /******************************/ > > > 01520000 > > > /* FRIS REPORT: ITE-004-M */ > > > 01530000 > > > /******************************/ > > > 01540000 > > > > > > 01550000 > > > > > > > > > Sent via Deja.com http://www.deja.com/ > > > Before you buy. > > > > > > > Sent via Deja.com http://www.deja.com/ > Before you buy. >


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