IMHO, it would be much simpler to use a RETAIN statement creating these
additional variables from file B. Here is a solution for one of your
variables from file b.
data ab ;
set a ;
retain d1 "1. Used words I could understand (no medical jargon)" ;
If you have several variables in file b then reading the dictionary tables
may help in macrotizing the retain statement.
From: Jamil Ibrahim [mailto:jibrahim@IR.UMSMED.EDU]
Sent: Wednesday, February 11, 2004 11:46 AM
HI sas users:
I need help in matching two files.
sample:one file A has 5 obs with 25 vars. the other file B has only
one obs with 7 vars I want this 20 vars in B to be merged with each obs
the first file A and form file AB.
NPUT @1 (q1-q20) (1.) @22 S_ID $CHAR4. @27 P_ID $CHAR4. @32 rot
@34 group $CHAR1. @36 date $CHAR6. ;
11111110111101100 11 0001 1111 1 4 020504
11111110111101101011 0001 1112 1 4 020504
1111111111110110 111 0001 1113 1 4 020504
1111111 111111111111 0001 1114 1 4 020504
11111111111101111111 0001 1115 1 4 020504
@1 D1 $CHAR100./
@1 D2 $CHAR100./
@1 D3 $CHAR100./
@1 D4 $CHAR100./
@1 D5 $CHAR100./
@1 D6 $CHAR100./
@1 D7 $CHAR100.
1. Used words I could understand (no medical jargon)
2. Used open-ended and closed-ended questions appropriately
3. Maintained eye contact much of the time but not excessively
4. Did not interrupt while I was talking
5. Checked out my feelings and concerns regarding my situation
6. Encouraged me to ask questions
7. Directly answered my questions and clearly explained things
the results should be in data ab with 32 vars from both files;
Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.