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 1998, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 10 Jul 1998 17:59:04 PDT
Reply-To:     george smith <anirdesh@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         george smith <anirdesh@HOTMAIL.COM>
Content-Type: text/plain

Hi everybody :

I have two datasets as below :

data a;

INFILE CARDS TRUNCOVER ;

input @1 RTYPE $1. @ ; if rtype='L' then input @3 ssn_no $4. @8 cod_1 $3. @12 cod_2 $3. ;

ELSE If rtype='F' then input @4 TYPE $2. @7 amta 5.2 ;

ELSE if rtype='A' then input @4 TYPE $2. @7 amtb 5.2;

cards; L 1001 111 901 F 02 50.50 F 03 25.25 L 1001 112 901 F 02 50.50 L 1003 113 903 A 01 15.15 ; RUN;

DATA DOD; INPUT cod_1 $3. VAL; CARDS; 111 2222 112 3333 ; RUN;

How to accomplish this ?

For each value of COD_1, on the RTYPE='L' in the DATA=A, I would like to get " VAL" FROM DOD dataset, retaining layout of data=a asitis, in other words, get "VAL" for each COD_1, and put it only on the RTYPE='L'. I tried merge,....didn't work.

How output like this can be generated.

L 1001 111 901 2222 F 02 50.50 F 03 25.25 L 1001 112 901 3333 F 02 50.50 L 1003 113 903 .(MISSING) A 01 15.15

thanks in advance....

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


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