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 (June 2001, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Fri, 8 Jun 2001 12:41:19 -0400
Reply-To:   Philip Whittall <philip.whittall@UNILEVER.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Philip Whittall <philip.whittall@UNILEVER.COM>
Subject:   Re: SQL for pedigree numbering?

If you don't mind using a character variable as an id then you can use the format and the put function directly to generate the id.

data a; length id $ 6 animal sire dam $ 8; input animal sire dam; id=put(_n_,z6.); lines; jan xx xx eileen xx xx kees xx xx doreen xx xx charles jan eileen mary jan eileen andy charles doreen ; data cntlin; set a(rename=(animal=start id=label)); retain fmtname 'ANIMAL' type 'C'; end=start; keep fmtname type start end label; run; proc format cntlin=cntlin; run; data b; set a; sire_id=put(sire,animal.); dam_id=put(dam,animal.); run; proc print; run;


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