/*------------------------------------------------------------------------- | | SAS SETUP FILE | NATIONAL SURVEY OF FAMILY GROWTH, CYCLE II, 1976: | INTERVAL FILE | | | SAS setup sections are provided for the ASCII version of this data | collection. These sections are listed below: | | LIBNAME: defines the directory where the permanent SAS data set will be | stored. Users must replace the "data-file-path" with the path specifying | the directory on the user's computer system where the SAS data set will | be written (e.g. "c:\SAS_data_files\Cycle2_data"). | | PROC FORMAT: creates user-defined formats for the variables. Formats | replace original value codes with value code descriptions. Only | variables with user-defined formats are included in this section. | | DATA: begins a SAS data step and names an output SAS data set. | | INFILE: identifies the input file to be read with the input statement. | Users must replace the "data-filename" with a filename specifying the | directory on the user's computer system in which the downloaded and | unzipped data file is physically located (e.g., | "c:\temp\08181-0001-data.txt"). | | INPUT: assigns the name, type, decimal specification (if any), and | specifies the beginning and ending column locations for each variable | in the data file. | | LABEL: assigns descriptive labels to all variables. Variable labels | and variable names may be identical for some variables. | | MISSING VALUE RECODES: sets user-defined numeric missing values to | missing as interpreted by the SAS system. Only variables with | user-defined missing values are included in this section. | | If any variables have more than one missing value, they are assigned | to the standard missing value of a single period (.) in the statement | below. To maintain the original meaning of missing codes, users may want | to take advantage of the SAS missing values (the letters A-Z or an | underscore preceded by a period). | | An example of a standard missing value recode: | | IF (RELATION = 98 OR RELATION = 99) THEN RELATION = .; | | The same example using special missing value recodes: | | IF RELATION = 98 THEN RELATION = .A; | IF RELATION = 99 THEN RELATION = .B; | | FORMAT: associates the formats created by the PROC FORMAT step with | the variables named in the INPUT statement. | | NOTE: Users should modify this setup file to suit their specific needs. | Sections for PROC FORMAT, FORMAT, and MISSING VALUE RECODES have been | commented out (i.e., '/*'). To include these sections in the final SAS | setup, users should remove the SAS comment indicators from the desired | section(s). | |------------------------------------------------------------------------*/ * DEFINING THE PATH TO PERMANENT SAS DATA SET LOCATION; libname "data-file-path"; * SAS PROC FORMAT; PROC FORMAT; VALUE bprec4ff 1='(1) Single live birth' 2='(2) Single pregnancy loss' 3='(3) Multiple live birth' 4='(4) Multiple loss' 5='(5) Live birth plus pregnancy loss' 6='(6) Current pregnancy' ; VALUE bprec5ff 0='(0) Less than one month' 1='(1) One month' 2='(2) Two months' 3='(3) Three months' 4='(4) Four months' 5='(5) Five months' 6='(6) Six months' 7='(7) Seven months' 8='(8) Eight months' 9='(9) Nine months' 98='(98) DK' 99='(99) Not ascertained' ; VALUE bprec6ff 1='(1) Stillbirth' 2='(2) Miscarriage' 3='(3) Abortion' 9='(9) Not ascertained' ; VALUE b5_1ffff 1='(1) Boy' 2='(2) Girl' ; VALUE b6lb_1ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b6oz_1ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b7_1ffff 1='(1) More than 5 1/2 pounds' 2='(2) 5 1/2 pounds or less' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b8_1ffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b9_1ffff 1='(1) (His/Her) own household' 2='(2) Long-term care institution' 3='(3) College/away at school' 4='(4) With (his/her) father' 5='(5) With other relatives' 6='(6) In foster home' 7='(7) With adopted parents' 8='(8) Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE b11_1fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b12_1fff 0='(0) Less than 1 week' 95='(95) Still feeding' 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b5_2ffff 1='(1) Boy' 2='(2) Girl' ; VALUE b6lb_2ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b6oz_2ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b7_2ffff 1='(1) More than 5 1/2 pounds' 2='(2) 5 1/2 pounds or less' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b8_2ffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b9_2ffff 1='(1) (His/Her) own household' 2='(2) Long-term care institution' 3='(3) College/away at school' 4='(4) With (his/her) father' 5='(5) With other relatives' 6='(6) In foster home' 7='(7) With adopted parents' 8='(8) Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE b11_2fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b12_2fff 0='(0) Less than 1 week' 95='(95) Still feeding' 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b5_3ffff 1='(1) Boy' 2='(2) Girl' ; VALUE b6lb_3ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b6oz_3ff 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE b7_3ffff 1='(1) More than 5 1/2 pounds' 2='(2) 5 1/2 pounds or less' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b8_3ffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b9_3ffff 1='(1) (His/Her) own household' 2='(2) Long-term care institution' 3='(3) College/away at school' 4='(4) With (his/her) father' 5='(5) With other relatives' 6='(6) In foster home' 7='(7) With adopted parents' 8='(8) Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE b11_3fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE b12_3fff 0='(0) Less than 1 week' 95='(95) Still feeding' 98='(98) DK, don''t remember' 99='(99) Not ascertained' ; VALUE c2ffffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c3ffffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c4ffffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c5ffffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c6ffffff 1='(1) Before' 2='(2) Later' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c7ffffff 1='(1) Before' 2='(2) Later' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c8ffffff 1='(1) Probably yes' 2='(2) Probably no' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c9ffffff 1='(1) Pregnancy loss' 2='(2) Sooner' 3='(3) Later' 4='(4) Right time' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c10fffff 73='(73) 73 or more months later' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c11fffff 73='(73) 73 or more months later' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c12fffff 1='(1) Yes' 2='(2) No' 3='(3) Not married' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c13fffff 1='(1) Pregnancy loss' 2='(2) Sooner' 3='(3) Later' 4='(4) Right time' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c14fffff 1='(1) Yes' 2='(2) No' 9='(9) Not ascertained' ; VALUE c16fffff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c17_1fff 1='(1) A. Pill' 2='(2) B. Foam' 3='(3) L. Condom' 4='(4) D. Jelly, Cream, Suppository' 5='(5) E. Diaphragm and Jelly' 6='(6) F. Douche' 7='(7) G. IUD, Coil, Loop' 8='(8) H. Abortion' 9='(9) J. Operation: Female Sterilization' 10='(10) K. Operation: Male Sterilization' 11='(11) L. Condom' 12='(12) M. Rhythm (Temperature)' 13='(13) N. Rhythm (Calendar)' 14='(14) P. Withdrawal or coitus interruptus' 15='(15) R. Abstinence (non-intercourse to avoid pregnancy)' 16='(16) S. Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c19_1fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c20_1fff 1='(1) Often' 2='(2) Sometimes' 3='(3) Once/twice' 9='(9) Not ascertained' ; VALUE c17_2fff 1='(1) A. Pill' 2='(2) B. Foam' 3='(3) L. Condom' 4='(4) D. Jelly, Cream, Suppository' 5='(5) E. Diaphragm and Jelly' 6='(6) F. Douche' 7='(7) G. IUD, Coil, Loop' 8='(8) H. Abortion' 9='(9) J. Operation: Female Sterilization' 10='(10) K. Operation: Male Sterilization' 11='(11) L. Condom' 12='(12) M. Rhythm (Temperature)' 13='(13) N. Rhythm (Calendar)' 14='(14) P. Withdrawal or coitus interruptus' 15='(15) R. Abstinence (non-intercourse to avoid pregnancy)' 16='(16) S. Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c19_2fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c20_2fff 1='(1) Often' 2='(2) Sometimes' 3='(3) Once/twice' 9='(9) Not ascertained' ; VALUE c17_3fff 1='(1) A. Pill' 2='(2) B. Foam' 3='(3) L. Condom' 4='(4) D. Jelly, Cream, Suppository' 5='(5) E. Diaphragm and Jelly' 6='(6) F. Douche' 7='(7) G. IUD, Coil, Loop' 8='(8) H. Abortion' 9='(9) J. Operation: Female Sterilization' 10='(10) K. Operation: Male Sterilization' 11='(11) L. Condom' 12='(12) M. Rhythm (Temperature)' 13='(13) N. Rhythm (Calendar)' 14='(14) P. Withdrawal or coitus interruptus' 15='(15) R. Abstinence (non-intercourse to avoid pregnancy)' 16='(16) S. Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c19_3fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c20_3fff 1='(1) Often' 2='(2) Sometimes' 3='(3) Once/twice' 9='(9) Not ascertained' ; VALUE c17_4fff 1='(1) A. Pill' 2='(2) B. Foam' 3='(3) L. Condom' 4='(4) D. Jelly, Cream, Suppository' 5='(5) E. Diaphragm and Jelly' 6='(6) F. Douche' 7='(7) G. IUD, Coil, Loop' 8='(8) H. Abortion' 9='(9) J. Operation: Female Sterilization' 10='(10) K. Operation: Male Sterilization' 11='(11) L. Condom' 12='(12) M. Rhythm (Temperature)' 13='(13) N. Rhythm (Calendar)' 14='(14) P. Withdrawal or coitus interruptus' 15='(15) R. Abstinence (non-intercourse to avoid pregnancy)' 16='(16) S. Other' 98='(98) DK' 99='(99) Not ascertained' ; VALUE c19_4fff 1='(1) Yes' 2='(2) No' 8='(8) DK' 9='(9) Not ascertained' ; VALUE c20_4fff 1='(1) Often' 2='(2) Sometimes' 3='(3) Once/twice' 9='(9) Not ascertained' ; * SAS DATA, INFILE, INPUT STATEMENTS; DATA ; INFILE "c:\temp\1976NSFGData.dat" LRECL=872; INPUT rec_type 6 @; if rec_type<5 then delete; else input ID 1-5 RECTYPE 6 BPREC1 7-8 BPREC2 9-11 BPREC3 12-13 BPREC4 14 BPREC5 15-16 BPREC6 17 CHILDNO_1 18-19 B5_1 20 B6LB_1 21-22 B6OZ_1 23-24 B7_1 25 B8_1 26 B9_1 27-28 B10_1 29-31 B11_1 32 B12_1 33-34 CHILDNO_2 35-36 B5_2 37 B6LB_2 38-39 B6OZ_2 40-41 B7_2 42 B8_2 43 B9_2 44-45 B10_2 46-48 B11_2 49 B12_2 50-51 CHILDNO_3 52-53 B5_3 54 B6LB_3 55-56 B6OZ_3 57-58 B7_3 59 B8_3 60 B9_3 61-62 B10_3 63-65 B11_3 66 B12_3 67-68 C2 69 C3 70 C4 71 C5 72 C6 73 C7 74 C8 75 C9 76 C10 77-78 C11 79-80 C12 81 C13 82 C14 83 C15B_1 84-86 C15E_1 87-89 C15B_2 90-92 C15E_2 93-95 C15B_3 96-98 C15E_3 99-101 C16 102 C17_1 103-104 C18_1 105-107 C19_1 108 C20_1 109 C21_1 110-112 C17_2 113-114 C18_2 115-117 C19_2 118 C20_2 119 C21_2 120-122 C17_3 123-124 C18_3 125-127 C19_3 128 C20_3 129 C21_3 130-132 C17_4 133-134 C18_4 135-137 C19_4 138 C20_4 139 C21_4 140-142 C22 143-145 WTFINAL 146-151 ; * SAS LABEL STATEMENT; LABEL ID = 'ID Number' RECTYPE = 'Record Type' BPREC1 = 'Pregnancy Number Assigned' BPREC2 = 'Month and year pregnancy ended (century month)' BPREC3 = 'Day of month pregnancy ended' BPREC4 = 'Pregnancy type' BPREC5 = 'Number of months pregnant (pregnancy loss)' BPREC6 = 'How pregnancy ended (pregnancy loss)' CHILDNO_1= 'Child Number' B5_1 = 'Sex of child' B6LB_1 = 'Birth weight: pounds' B6OZ_1 = 'Birth weight: ounces' B7_1 = 'Weight more or less than 5 1/2 lbs' B8_1 = 'Is child still living' B9_1 = 'Where is child living' B10_1 = 'When child died (century months)' B11_1 = 'Was child breastfed' B12_1 = 'Weeks child breastfed' CHILDNO_2= 'Child Number' B5_2 = 'Sex of child' B6LB_2 = 'Birth weight: pounds' B6OZ_2 = 'Birth weight: ounces' B7_2 = 'Weight more or less than 5 1/2 lbs' B8_2 = 'Is child still living' B9_2 = 'Where is child living' B10_2 = 'When child died (century months)' B11_2 = 'Was child breastfed' B12_2 = 'Weeks child breastfed' CHILDNO_3= 'Child Number' B5_3 = 'Sex of child' B6LB_3 = 'Birth weight: pounds' B6OZ_3 = 'Birth weight: ounces' B7_3 = 'Weight more or less than 5 1/2 lbs' B8_3 = 'Is child still living' B9_3 = 'Where is child living' B10_3 = 'When child died (century months)' B11_3 = 'Was child breastfed' B12_3 = 'Weeks child breastfed' C2 = 'Respondent use method in interval' C3 = 'Stopped using methods before pregnancy' C4 = 'No use/stopped use because wanted pregnancy' C5 = 'Respondent wanted another baby at time of pregnancy' C6 = 'Felt that pregnancy wanted before or felt that way later' C7 = 'Felt that pregnancy wanted before or felt that way later' C8 = 'Probably wanted or probably unwanted' C9 = 'Timing of pregnancy O-K' C10 = 'How much later wanted to become pregnant' C11 = 'How much sooner wanted to become pregnant' C12 = 'Husband want another baby at time of pregnancy' C13 = 'Timing of pregnancy O-K with husband' C14 = 'Any periods of one month or more not having intercourse' C15B_1 = 'First period begin' C15E_1 = 'First period end' C15B_2 = 'Second period begin' C15E_2 = 'Second period end' C15B_3 = 'Third period begin' C15E_3 = 'Third period end' C16 = 'Ever use contraceptive method during interval' C17_1 = 'First method used in interval' C18_1 = 'Month and year first method begun (century months)' C19_1 = 'Was first method ever skipped' C20_1 = 'How often method skipped' C21_1 = 'Month and year method stopped: First (century months)' C17_2 = 'Second method used in interval' C18_2 = 'Month and year second method begun (century months)' C19_2 = 'Was second method ever skipped' C20_2 = 'How often method skipped' C21_2 = 'Month and year method stopped: Second (century months)' C17_3 = 'Third method used in interval' C18_3 = 'Month and year third method begun (century months)' C19_3 = 'Was third method ever skipped' C20_3 = 'How often method skipped' C21_3 = 'Month and year method stopped: Third (century months)' C17_4 = 'Fourth method used in interval' C18_4 = 'Month and year fourth method begun (century months)' C19_4 = 'Was fourth method ever skipped' C20_4 = 'How often method skipped' C21_4 = 'Month and year method stopped: Fourth (century months)' C22 = 'Month and year became pregnant (century months)' WTFINAL = 'Post-stratified weight' ; * USER-DEFINED MISSING VALUES RECODE TO SAS SYSMIS; IF (BPREC5 = 98 OR BPREC5 = 99) THEN BPREC5 = .; IF (BPREC6 = 9) THEN BPREC6 = .; IF (B6LB_1 = 98 OR B6LB_1 = 99) THEN B6LB_1 = .; IF (B6OZ_1 = 98 OR B6OZ_1 = 99) THEN B6OZ_1 = .; IF (B7_1 = 8 OR B7_1 = 9) THEN B7_1 = .; IF (B8_1 = 8 OR B8_1 = 9) THEN B8_1 = .; IF (B9_1 = 98 OR B9_1 = 99) THEN B9_1 = .; IF (B11_1 = 8 OR B11_1 = 9) THEN B11_1 = .; IF (B12_1 = 98 OR B12_1 = 99) THEN B12_1 = .; IF (B6LB_2 = 98 OR B6LB_2 = 99) THEN B6LB_2 = .; IF (B6OZ_2 = 98 OR B6OZ_2 = 99) THEN B6OZ_2 = .; IF (B7_2 = 8 OR B7_2 = 9) THEN B7_2 = .; IF (B8_2 = 8 OR B8_2 = 9) THEN B8_2 = .; IF (B9_2 = 98 OR B9_2 = 99) THEN B9_2 = .; IF (B11_2 = 8 OR B11_2 = 9) THEN B11_2 = .; IF (B12_2 = 98 OR B12_2 = 99) THEN B12_2 = .; IF (B6LB_3 = 98 OR B6LB_3 = 99) THEN B6LB_3 = .; IF (B6OZ_3 = 98 OR B6OZ_3 = 99) THEN B6OZ_3 = .; IF (B7_3 = 8 OR B7_3 = 9) THEN B7_3 = .; IF (B8_3 = 8 OR B8_3 = 9) THEN B8_3 = .; IF (B9_3 = 98 OR B9_3 = 99) THEN B9_3 = .; IF (B11_3 = 8 OR B11_3 = 9) THEN B11_3 = .; IF (B12_3 = 98 OR B12_3 = 99) THEN B12_3 = .; IF (C2 = 8 OR C2 = 9) THEN C2 = .; IF (C3 = 8 OR C3 = 9) THEN C3 = .; IF (C4 = 8 OR C4 = 9) THEN C4 = .; IF (C5 = 8 OR C5 = 9) THEN C5 = .; IF (C6 = 8 OR C6 = 9) THEN C6 = .; IF (C7 = 8 OR C7 = 9) THEN C7 = .; IF (C8 = 8 OR C8 = 9) THEN C8 = .; IF (C9 = 8 OR C9 = 9) THEN C9 = .; IF (C10 = 98 OR C10 = 99) THEN C10 = .; IF (C11 = 98 OR C11 = 99) THEN C11 = .; IF (C12 = 8 OR C12 = 9) THEN C12 = .; IF (C13 = 8 OR C13 = 9) THEN C13 = .; IF (C14 = 9) THEN C14 = .; IF (C16 = 8 OR C16 = 9) THEN C16 = .; IF (C17_1 = 98 OR C17_1 = 99) THEN C17_1 = .; IF (C19_1 = 8 OR C19_1 = 9) THEN C19_1 = .; IF (C20_1 = 9) THEN C20_1 = .; IF (C17_2 = 98 OR C17_2 = 99) THEN C17_2 = .; IF (C19_2 = 8 OR C19_2 = 9) THEN C19_2 = .; IF (C20_2 = 9) THEN C20_2 = .; IF (C17_3 = 98 OR C17_3 = 99) THEN C17_3 = .; IF (C19_3 = 8 OR C19_3 = 9) THEN C19_3 = .; IF (C20_3 = 9) THEN C20_3 = .; IF (C17_4 = 98 OR C17_4 = 99) THEN C17_4 = .; IF (C19_4 = 8 OR C19_4 = 9) THEN C19_4 = .; IF (C20_4 = 9) THEN C20_4 = .; * SAS FORMAT STATEMENT; FORMAT BPREC4 bprec4ff. BPREC5 bprec5ff. BPREC6 bprec6ff. B5_1 b5_1ffff. B6LB_1 b6lb_1ff. B6OZ_1 b6oz_1ff. B7_1 b7_1ffff. B8_1 b8_1ffff. B9_1 b9_1ffff. B11_1 b11_1fff. B12_1 b12_1fff. B5_2 b5_2ffff. B6LB_2 b6lb_2ff. B6OZ_2 b6oz_2ff. B7_2 b7_2ffff. B8_2 b8_2ffff. B9_2 b9_2ffff. B11_2 b11_2fff. B12_2 b12_2fff. B5_3 b5_3ffff. B6LB_3 b6lb_3ff. B6OZ_3 b6oz_3ff. B7_3 b7_3ffff. B8_3 b8_3ffff. B9_3 b9_3ffff. B11_3 b11_3fff. B12_3 b12_3fff. C2 c2ffffff. C3 c3ffffff. C4 c4ffffff. C5 c5ffffff. C6 c6ffffff. C7 c7ffffff. C8 c8ffffff. C9 c9ffffff. C10 c10fffff. C11 c11fffff. C12 c12fffff. C13 c13fffff. C14 c14fffff. C16 c16fffff. C17_1 c17_1fff. C19_1 c19_1fff. C20_1 c20_1fff. C17_2 c17_2fff. C19_2 c19_2fff. C20_2 c20_2fff. C17_3 c17_3fff. C19_3 c19_3fff. C20_3 c20_3fff. C17_4 c17_4fff. C19_4 c19_4fff. C20_4 c20_4fff. ; RUN ;