/* Dear SEER-Medicare user: */ /* In order to use this program, you must make some modifications. */ /* All lines which may need modifications have the comment USER next to */ /* them so that you can search for them more easily. */ /* */ /* First, change the filenames to match your own directory structure. */ /* You need to have an input PEDSF file (the original file sent to you by */ /* IMS when you received your data request) and an output PREP file name. */ /* You may also have an input ANALYSIS file (the file you have created, */ /* containing your selected cohort and 'cleaned' data) if you wish to use */ /* variables which you have defined/created in the SEER*Stat analyses. */ /* Your analysis file must contain the SEER Registry/Case number as a */ /* length 10 character string and the SEER Sequence number for the tumor */ /* as a length 2 character string. All analysis variables you wish to */ /* use in SEER*Stat must be numeric. You should either have a SAS file */ /* (libname) or a text file (filename) statement for each analysis file, */ /* NOT BOTH. TWO SAMPLE SAS DECLARATIONS ARE PROVIDED, YOU MUST SELECT */ /* ONE. These samples are both commented out. If you wish to use one, */ /* you must uncomment one by removing the * in the first column and */ /* change the directory path/file name to match your file. */ /* */ /* Second, you should review the end of study year and month (EOS_Y and */ /* EOS_M). These are preset to the last month of the Medicare expense */ /* files which were sent to you by IMS. If your analysis ends at an */ /* earlier time, please adjust these 2 variables accordingly. */ /* */ /* Third, you should modify the 'ANALYSIS MERGE SECTION', where the */ /* analysis file is merged to the PEDSF information. A SAS file is */ /* assumed here, so you may have to add an input statement and you will */ /* always have to select which variables you wish to add. Again, this */ /* section is preset to be commented out. To uncomment, delete the 2 */ /* lines 'USER comment out begins' and 'USER comment out ends' */ /* */ /* Finally, if you have added new variables, you must place them in the */ /* output PREP file where the lenX_n variables are shown. X (lenX) tells */ /* you the length of a variable that can be placed in that position. */ /* n (_n) allows you to track how many variables of that length are used. */ /* There are 10 variables of length 1 and 10 of length 2. There are 5 */ /* variables of length 3, 5 of length 4 and 5 of length 5. The total */ /* record length is 674. Your variables MUST be of numeric type and be */ /* sure to use an appropriate length variable. */ /* */ /* ** NOTE: You can NOT use the 90 characters of lenX_n space in any */ /* manner, variables MUST be placed in appropriate sized slots. */ /* */ /* Thank you and please let us know if you have any questions. */ /* IMS support staff */ /* input files */ filename PEDSF '/directory/pedsf.cancer.txt'; /* USER - PEDSF file received from IMS */ *libname ANALYSIS '/directory/'; /* USER - SAS type analysis file */ *filename ANALYSIS '/directory/analysis.txt'; /* USER - Text type analysis file */ /* output file */ filename PREP '/directory/SEERPrep.infile.txd'; /* USER - output file being created. Must have .txd extension for SEER*Prep */ data prep(drop=ctnon90x cthso90x ctscl90x ctcol90x ctblk90x ctwht90x cthsp90x ctpov90x cten590x cten690x povrc90x nonrc90x hsorc90x sclrc90x colrc90x zpnon90x zphso90x zpscl90x zpcol90x zpblk90x zpwht90x zphsp90x zpen590x zpen690x znonrc9x zhsorc9x zsclrc9x zcolrc9x ctnon00x cthso00x ctscl00x ctcol00x ctblk00x ctwht00x cthsp00x ctpov00x cten500x cten600x povrc00x nonrc00x hsorc00x sclrc00x colrc00x zpnon00x zphso00x zpscl00x zpcol00x zpblk00x zpwht00x zphsp00x zpen500x zpen600x znonrc0x zhsorc0x zsclrc0x zcolrc0x ctpci90x ctmed90x zppci90x zpmed90x ctpci00x ctmed00x ctden00x medag00x medrc00x zppci00x zpmed00x zpden00x pos i eos_y eos_m count); /* ctden90x medag90x medrc90x zpden90x */ EOS_Y = '2006'; /* USER - End of Study Year */ EOS_M = '12'; /* USER - End of Study Month */ infile PEDSF lrecl=3543 recfm=f missover pad; input @0001 regcase $char10. @0011 fivepct $char1. @0022 dod_flg $char1. @0024 med_dodm $char2. @0026 med_dodd $char2. @0028 med_dody $char4. @0032 birthm $char2. @0036 birthyr $char4. @0040 m_sex $char1. @0041 race $char1. @0042 rsncd1 $char1. @0043 cur_ent $char1. @0044 chr_esrd $char1. @0045 med_stcd $char2. @0047 STATE $char2. @0049 COUNTY $char3. @0052 zip $char9. /*Special permission required*/ @0061 code_sys $char1. @0062 census $char6. /*Special permission required*/ @0068 census2k $char6. /*Special permission required*/ @0074 HSA $char3. @0077 URBRUR $char1. @0078 URBAN $char2. @0080 ctpci90x $char10. @0090 ctmed90x $char10. /* @0100 ctden90x $char10. all missing*/ @0110 ctnon90x $char6. @0116 cthso90x $char6. @0122 ctscl90x $char6. @0128 ctcol90x $char6. @0134 ctblk90x $char6. @0140 ctwht90x $char6. @0146 cthsp90x $char6. @0152 ctpov90x $char6. @0158 cten590x $char6. @0164 cten690x $char6. /* @0170 medag90x $char10. all missing*/ /* @0180 medrc90x $char10. all missing*/ @0190 povrc90x $char6. @0196 nonrc90x $char6. @0202 hsorc90x $char6. @0208 sclrc90x $char6. @0214 colrc90x $char6. @0220 zppci90x $char10. @0230 zpmed90x $char10. /* @0240 zpden90x $char10. all missing*/ @0250 zpnon90x $char6. @0256 zphso90x $char6. @0262 zpscl90x $char6. @0268 zpcol90x $char6. @0274 zpblk90x $char6. @0280 zpwht90x $char6. @0286 zphsp90x $char6. @0292 zpen590x $char6. @0298 zpen690x $char6. @0304 znonrc9x $char6. @0310 zhsorc9x $char6. @0316 zsclrc9x $char6. @0322 zcolrc9x $char6. @0328 ctpci00x $char10. @0338 ctmed00x $char10. @0348 ctden00x $char10. @0358 ctnon00x $char6. @0364 cthso00x $char6. @0370 ctscl00x $char6. @0376 ctcol00x $char6. @0382 ctblk00x $char6. @0388 ctwht00x $char6. @0394 cthsp00x $char6. @0400 ctpov00x $char6. @0406 cten500x $char6. @0412 cten600x $char6. @0418 medag00x $char10. @0428 medrc00x $char10. @0438 povrc00x $char6. @0444 nonrc00x $char6. @0450 hsorc00x $char6. @0456 sclrc00x $char6. @0462 colrc00x $char6. @0468 zppci00x $char10. @0478 zpmed00x $char10. @0488 zpden00x $char10. @0498 zpnon00x $char6. @0504 zphso00x $char6. @0510 zpscl00x $char6. @0516 zpcol00x $char6. @0522 zpblk00x $char6. @0528 zpwht00x $char6. @0534 zphsp00x $char6. @0540 zpen500x $char6. @0546 zpen600x $char6. @0552 znonrc0x $char6. @0558 zhsorc0x $char6. @0564 zsclrc0x $char6. @0570 zcolrc0x $char6. @0576 reg65 $char2. @0578 S_SEX $char1. @0579 RAC_RECB $char2. @0581 ICD_CODE $char1. @0582 COD89V $char4. @0586 COD10V $char4. @0590 codkm1 $char3. @0593 codpub $char3. @0596 nhiade $char1. @0597 ihsrecl $char1. @0598 SER_DODM $char2. @0600 SER_DODY $char4. @0604 AGE_DX $char3. @0607 sRACE $char2. @0609 ORIGIN $char1. @0610 DX65M $char2. @0612 DX65Y $char4. @0616 RESNREC $char1. @0617 STAT_REC $char1. @0622 cen_cert $char1. @0623 ctcer2k $char1. @0624 plc_brth $char3. @0627 COUNT $char2. @0629 NUMPRIMS $char2. @0631 AGE1DX $char3. @0634 SEQ1OV65 $char1. @0635 MULTSITE $char1. @0636 SEQ1DX $char2. @; /* change text fields to numeric */ if fivepct='N' then fivepct='0'; else fivepct='1'; if chr_esrd='Y' then chr_esrd='1'; if med_dody=' ' then med_dody='0000'; if med_dodm=' ' then med_dodm='00'; if med_dodd=' ' then med_dodd='00'; /* change . to blank, modify lengths */ length ctnon90 cthso90 ctscl90 ctcol90 ctblk90 ctwht90 cthsp90 ctpov90 cten590 cten690 povrc90 nonrc90 hsorc90 sclrc90 colrc90 zpnon90 zphso90 zpscl90 zpcol90 zpblk90 zpwht90 zphsp90 zpen590 zpen690 znonrc90 zhsorc90 zsclrc90 zcolrc90 ctnon00 cthso00 ctscl00 ctcol00 ctblk00 ctwht00 cthsp00 ctpov00 cten500 cten600 povrc00 nonrc00 hsorc00 sclrc00 colrc00 zpnon00 zphso00 zpscl00 zpcol00 zpblk00 zpwht00 zphsp00 zpen500 zpen600 znonrc00 zhsorc00 zsclrc00 zcolrc00 $ 5; length ctpci90 ctmed90 zppci90 zpmed90 ctpci00 ctmed00 ctden00 medag00 medrc00 zppci00 zpmed00 zpden00 $ 6; /* ctden90 medag90 medrc90 zpden90 */ /* replace . with blank, shorten to length 6 */ ctpci90=put(input(substr(ctpci90x,5,6),6.),Z6.); if ctpci90=' .' then ctpci90=' '; ctmed90=put(input(substr(ctmed90x,5,6),6.),Z6.); if ctmed90=' .' then ctmed90=' '; /* ctden90=put(input(substr(ctden90x,5,6),6.),Z6.); if ctden90=' .' then ctden90=' '; */ /* medag90=put(input(substr(medag90x,5,6),6.),Z6.); if medag90=' .' then medag90=' '; */ /* medrc90=put(input(substr(medrc90x,5,6),6.),Z6.); if medrc90=' .' then medrc90=' '; */ zppci90=put(input(substr(zppci90x,5,6),6.),Z6.); if zppci90=' .' then zppci90=' '; zpmed90=put(input(substr(zpmed90x,5,6),6.),Z6.); if zpmed90=' .' then zpmed90=' '; /* zpden90=put(input(substr(zpden90x,5,6),6.),Z6.); if zpden90=' .' then zpden90=' '; */ ctpci00=put(input(substr(ctpci00x,5,6),6.),Z6.); if ctpci00=' .' then ctpci00=' '; ctmed00=put(input(substr(ctmed00x,5,6),6.),Z6.); if ctmed00=' .' then ctmed00=' '; ctden00=put(input(substr(ctden00x,5,6),6.),Z6.); if ctden00=' .' then ctden00=' '; medag00=put(input(substr(medag00x,5,6),6.),Z6.); if medag00=' .' then medag00=' '; medrc00=put(input(substr(medrc00x,5,6),6.),Z6.); if medrc00=' .' then medrc00=' '; zppci00=put(input(substr(zppci00x,5,6),6.),Z6.); if zppci00=' .' then zppci00=' '; zpmed00=put(input(substr(zpmed00x,5,6),6.),Z6.); if zpmed00=' .' then zpmed00=' '; zpden00=put(input(substr(zpden00x,5,6),6.),Z6.); if zpden00=' .' then zpden00=' '; /* replace . with blank, shorten to length 5 */ ctnon90 = put(input(compress(ctnon90x,'.'),6.),Z5.); if ctnon90 =' .' then ctnon90 =' '; cthso90 = put(input(compress(cthso90x,'.'),6.),Z5.); if cthso90 =' .' then cthso90 =' '; ctscl90 = put(input(compress(ctscl90x,'.'),6.),Z5.); if ctscl90 =' .' then ctscl90 =' '; ctcol90 = put(input(compress(ctcol90x,'.'),6.),Z5.); if ctcol90 =' .' then ctcol90 =' '; ctblk90 = put(input(compress(ctblk90x,'.'),6.),Z5.); if ctblk90 =' .' then ctblk90 =' '; ctwht90 = put(input(compress(ctwht90x,'.'),6.),Z5.); if ctwht90 =' .' then ctwht90 =' '; cthsp90 = put(input(compress(cthsp90x,'.'),6.),Z5.); if cthsp90 =' .' then cthsp90 =' '; ctpov90 = put(input(compress(ctpov90x,'.'),6.),Z5.); if ctpov90 =' .' then ctpov90 =' '; cten590 = put(input(compress(cten590x,'.'),6.),Z5.); if cten590 =' .' then cten590 =' '; cten690 = put(input(compress(cten690x,'.'),6.),Z5.); if cten690 =' .' then cten690 =' '; povrc90 = put(input(compress(povrc90x,'.'),6.),Z5.); if povrc90 =' .' then povrc90 =' '; nonrc90 = put(input(compress(nonrc90x,'.'),6.),Z5.); if nonrc90 =' .' then nonrc90 =' '; hsorc90 = put(input(compress(hsorc90x,'.'),6.),Z5.); if hsorc90 =' .' then hsorc90 =' '; sclrc90 = put(input(compress(sclrc90x,'.'),6.),Z5.); if sclrc90 =' .' then sclrc90 =' '; colrc90 = put(input(compress(colrc90x,'.'),6.),Z5.); if colrc90 =' .' then colrc90 =' '; zpnon90 = put(input(compress(zpnon90x,'.'),6.),Z5.); if zpnon90 =' .' then zpnon90 =' '; zphso90 = put(input(compress(zphso90x,'.'),6.),Z5.); if zphso90 =' .' then zphso90 =' '; zpscl90 = put(input(compress(zpscl90x,'.'),6.),Z5.); if zpscl90 =' .' then zpscl90 =' '; zpcol90 = put(input(compress(zpcol90x,'.'),6.),Z5.); if zpcol90 =' .' then zpcol90 =' '; zpblk90 = put(input(compress(zpblk90x,'.'),6.),Z5.); if zpblk90 =' .' then zpblk90 =' '; zpwht90 = put(input(compress(zpwht90x,'.'),6.),Z5.); if zpwht90 =' .' then zpwht90 =' '; zphsp90 = put(input(compress(zphsp90x,'.'),6.),Z5.); if zphsp90 =' .' then zphsp90 =' '; zpen590 = put(input(compress(zpen590x,'.'),6.),Z5.); if zpen590 =' .' then zpen590 =' '; zpen690 = put(input(compress(zpen690x,'.'),6.),Z5.); if zpen690 =' .' then zpen690 =' '; znonrc90= put(input(compress(znonrc9x,'.'),6.),Z5.); if znonrc90=' .' then znonrc90=' '; zhsorc90= put(input(compress(zhsorc9x,'.'),6.),Z5.); if zhsorc90=' .' then zhsorc90=' '; zsclrc90= put(input(compress(zsclrc9x,'.'),6.),Z5.); if zsclrc90=' .' then zsclrc90=' '; zcolrc90= put(input(compress(zcolrc9x,'.'),6.),Z5.); if zcolrc90=' .' then zcolrc90=' '; ctnon00 = put(input(compress(ctnon00x,'.'),6.),Z5.); if ctnon00 =' .' then ctnon00 =' '; cthso00 = put(input(compress(cthso00x,'.'),6.),Z5.); if cthso00 =' .' then cthso00 =' '; ctscl00 = put(input(compress(ctscl00x,'.'),6.),Z5.); if ctscl00 =' .' then ctscl00 =' '; ctcol00 = put(input(compress(ctcol00x,'.'),6.),Z5.); if ctcol00 =' .' then ctcol00 =' '; ctblk00 = put(input(compress(ctblk00x,'.'),6.),Z5.); if ctblk00 =' .' then ctblk00 =' '; ctwht00 = put(input(compress(ctwht00x,'.'),6.),Z5.); if ctwht00 =' .' then ctwht00 =' '; cthsp00 = put(input(compress(cthsp00x,'.'),6.),Z5.); if cthsp00 =' .' then cthsp00 =' '; ctpov00 = put(input(compress(ctpov00x,'.'),6.),Z5.); if ctpov00 =' .' then ctpov00 =' '; cten500 = put(input(compress(cten500x,'.'),6.),Z5.); if cten500 =' .' then cten500 =' '; cten600 = put(input(compress(cten600x,'.'),6.),Z5.); if cten600 =' .' then cten600 =' '; povrc00 = put(input(compress(povrc00x,'.'),6.),Z5.); if povrc00 =' .' then povrc00 =' '; nonrc00 = put(input(compress(nonrc00x,'.'),6.),Z5.); if nonrc00 =' .' then nonrc00 =' '; hsorc00 = put(input(compress(hsorc00x,'.'),6.),Z5.); if hsorc00 =' .' then hsorc00 =' '; sclrc00 = put(input(compress(sclrc00x,'.'),6.),Z5.); if sclrc00 =' .' then sclrc00 =' '; colrc00 = put(input(compress(colrc00x,'.'),6.),Z5.); if colrc00 =' .' then colrc00 =' '; zpnon00 = put(input(compress(zpnon00x,'.'),6.),Z5.); if zpnon00 =' .' then zpnon00 =' '; zphso00 = put(input(compress(zphso00x,'.'),6.),Z5.); if zphso00 =' .' then zphso00 =' '; zpscl00 = put(input(compress(zpscl00x,'.'),6.),Z5.); if zpscl00 =' .' then zpscl00 =' '; zpcol00 = put(input(compress(zpcol00x,'.'),6.),Z5.); if zpcol00 =' .' then zpcol00 =' '; zpblk00 = put(input(compress(zpblk00x,'.'),6.),Z5.); if zpblk00 =' .' then zpblk00 =' '; zpwht00 = put(input(compress(zpwht00x,'.'),6.),Z5.); if zpwht00 =' .' then zpwht00 =' '; zphsp00 = put(input(compress(zphsp00x,'.'),6.),Z5.); if zphsp00 =' .' then zphsp00 =' '; zpen500 = put(input(compress(zpen500x,'.'),6.),Z5.); if zpen500 =' .' then zpen500 =' '; zpen600 = put(input(compress(zpen600x,'.'),6.),Z5.); if zpen600 =' .' then zpen600 =' '; znonrc00= put(input(compress(znonrc0x,'.'),6.),Z5.); if znonrc00=' .' then znonrc00=' '; zhsorc00= put(input(compress(zhsorc0x,'.'),6.),Z5.); if zhsorc00=' .' then zhsorc00=' '; zsclrc00= put(input(compress(zsclrc0x,'.'),6.),Z5.); if zsclrc00=' .' then zsclrc00=' '; zcolrc00= put(input(compress(zcolrc0x,'.'),6.),Z5.); if zcolrc00=' .' then zcolrc00=' '; if code_sys = '.' then code_sys = ' '; if ihsrecl = '.' then ihsrecl = ' '; pos = 1673; if count > '10' then count = '10'; do i = 1 to input(count,2.); input @(pos + 0) seq_num $char2. @(pos + 2) site $char3. @(pos + 5) siterec $char2. @(pos + 7) siterkm $char2. @(pos + 9) site2r $char2. @(pos + 11) hist $char4. @(pos + 15) hist_2 $char4. @(pos + 19) beh $char1. @(pos + 20) beh_2 $char1. @(pos + 21) behtrnd $char1. @(pos + 22) modx $char2. @(pos + 24) yrdx $char4. @(pos + 28) agerec $char2. @(pos + 30) rpt_src $char1. @(pos + 31) hststga $char1. /* @(pos + 32) modajc1 $char2.*/ @(pos + 34) modajc3 $char2. @(pos + 36) ajccstg $char2. @(pos + 38) dajccts $char2. @(pos + 40) dajccms $char2. @(pos + 42) dajccns $char2. @(pos + 44) dajcstg $char2. @(pos + 46) dajcflg $char1. @(pos + 47) dss77s $char1. @(pos + 48) dss77f $char1. @(pos + 49) dss00s $char1. @(pos + 50) dss00f $char1. @(pos + 51) sss77 $char1. @(pos + 52) sssm2z $char1. @(pos + 53) aj5stg $char3. @(pos + 56) aj6stg $char3. @(pos + 59) aj5seer $char3. @(pos + 62) sssm2b $char1. @(pos + 63) spcstg $char2. @(pos + 65) frstprm $char1. @(pos + 66) multprm $char1. @(pos + 67) marital $char1. @(pos + 68) registry $char2. @(pos + 70) monrx $char2. @(pos + 72) yr_rx $char4. @(pos + 76) radiatn $char1. @(pos + 83) othertx $char1. @(pos + 84) radsurg $char1. @(pos + 85) radbrn $char1. @(pos + 86) no_surg $char1. @(pos + 87) grade $char1. @(pos + 88) dxconf $char1. @(pos + 89) lateral $char1. @(pos + 90) ss_surg $char2. @(pos + 92) sx_prim $char2. @(pos + 94) num_nd $char2. @(pos + 96) sx_scop $char1. @(pos + 97) sx_site $char1. @(pos + 98) reconstr $char1. @(pos + 99) sxprif $char2. @(pos +101) sxscof $char1. @(pos +102) sxsitf $char1. @(pos +103) tumor1 $char1. @(pos +104) tumor2 $char1. @(pos +105) tumor3 $char1. @(pos +106) e4size $char2. @(pos +108) e4ext $char1. @(pos +109) e4node $char1. @(pos +110) e10size $char3. @(pos +113) e10ext $char2. @(pos +115) e10node $char1. @(pos +116) e10pn $char2. @(pos +118) e10ne $char2. @(pos +120) e10pe $char2. @(pos +122) eodcde $char1. @(pos +123) cnty $char3. @(pos +126) survm $char2. @(pos +128) survy $char2. @(pos +130) survt $char3. @(pos +133) csex $char2. @(pos +135) cslym $char2. @(pos +137) csmet $char2. @(pos +139) csmt $char1. @(pos +140) csrg $char1. @(pos +141) cssite1 $char3. @(pos +144) cssite2 $char3. @(pos +147) cssite3 $char3. @(pos +150) cssite4 $char3. @(pos +153) cssite5 $char3. @(pos +156) cssite6 $char3. @(pos +159) cstum $char3. @(pos +162) cssch $char2. @(pos +164) csts $char1. @(pos +165) csvf $char2. @(pos +167) csvl $char2. @(pos +169) hisrcb $char2. @(pos +171) icdo $char1. @(pos +172) icd3 $char4. @(pos +176) icd3m $char4. @(pos +180) primstl $char3. @(pos +183) la05_cd $char1. @(pos +184) napia_cd $char2. @; if modx='13' then modx='99'; if monrx='13' then monrx='99'; if SER_DODM='13' then SER_DODM='99'; if sxprif=' 0' then sxprif='00'; /* create unchanging variables */ /* Date of Last Contact: SEER DOD or MEDICARE DOD or END OF STUDY & vital status recode */ if SER_DODY = '0000' then do; if med_dody = ' ' or med_dody < yrdx then do; SER_YOLC = eos_y; SER_MOLC = eos_m; stat_rec = '1'; end; else do; SER_YOLC = med_dody; SER_MOLC = med_dodm; stat_rec = '4'; end; end; else do; SER_YOLC = SER_DODY; SER_MOLC = SER_DODM; stat_rec = '4'; end; if (SER_YOLC > eos_y) or ((SER_YOLC = eos_y) and (SER_MOLC > eos_m)) then do; /* died after end of study */ SER_YOLC = eos_y; SER_MOLC = eos_m; stat_rec = '1'; end; /* create changing variables */ /* eod coding system */ if '1988' <= yrdx then eod_sys='4'; else if '1983' <= yrdx <= '1987' then eod_sys='3'; else eod_sys=' '; /* age at Dx (3 digit) */ AgeDX = input(yrdx,4.) - input(birthyr,4.); if modx <= birthm then agedx = agedx-1; if agedx < 0 then agedx=0; /* type FUP expected */ if rpt_src in ('6' '7') then type_fup = '1'; /* death certificate/autopsy */ else if behtrnd='2' & siterec='47' then type_fup='3'; /* cervix insitu */ else type_fup = '2'; /* active followup */ /* = 4: SanFrancisco? */ output; pos = pos + 187; end; input; proc sort data=prep; by regcase seq_num; run; /* ********* BEGIN ANALYSIS MERGE SECTION ********* */ /* USER - begin edits */ /* USER: keep desired variables. These variables must be numeric. if you */ /* named regcase and seq_num differently, you must rename them and */ /* they must be character strings (regcase $char10, seq_num $char2) */ /* USER comment out begins (delete line if using this section) data analy; set ANALYSIS.analysis(keep=regcase seq_num ); proc sort data=analy; by regcase seq_num; data prep; merge prep(in=p) analy(in=a); by regcase seq_num; if p; if a then cohort='1'; else cohort='0'; run; USER comment out ends */ /* (delete line if using this section) */ /* ********** END ANALYSIS MERGE SECTION ********** */ /* USER - end edits */ data prep(drop=numrec) temp(keep=regcase numrec); set prep; by regcase seq_num; retain numrec seq_rcd; if first.regcase then do; numrec=0; seq_rcd=0; end; if not (first.regcase and last.regcase) then seq_rcd=seq_rcd+1; numrec=numrec+1; output prep; if last.regcase then output temp; data prep; merge prep temp; by regcase; data _null_; set prep; by regcase seq_num; file PREP lrecl=753; put @1 regcase $char10. @11 fivepct $char1. @12 dod_flg $char1. @13 med_dodm $char2. @15 med_dodd $char2. @17 med_dody $char4. @21 birthm $char2. @25 birthyr $char4. @29 m_sex $char1. @30 race $char1. @31 rsncd1 $char1. @32 cur_ent $char1. @33 chr_esrd $char1. @34 med_stcd $char2. @36 STATE $char2. @38 COUNTY $char3. @41 zip $char9. @50 code_sys $char1. @51 census $char6. @57 census2k $char6. @63 hsa $char3. @66 urbrur $char1. @67 urban $char2. @69 ctpci90 $char6. @75 ctmed90 $char6. /* @81 ctden90 $char6. all missing */ @87 ctnon90 $char5. @92 cthso90 $char5. @97 ctscl90 $char5. @102 ctcol90 $char5. @107 ctblk90 $char5. @112 ctwht90 $char5. @117 cthsp90 $char5. @122 ctpov90 $char5. @127 cten590 $char5. @132 cten690 $char5. /* @137 medag90 $char6. all missing */ /* @143 medrc90 $char6. all missing */ @149 povrc90 $char5. @154 nonrc90 $char5. @159 hsorc90 $char5. @164 sclrc90 $char5. @169 colrc90 $char5. @174 zppci90 $char6. @180 zpmed90 $char6. /* @186 zpden90 $char6. all missing */ @192 zpnon90 $char5. @197 zphso90 $char5. @202 zpscl90 $char5. @207 zpcol90 $char5. @212 zpblk90 $char5. @217 zpwht90 $char5. @222 zphsp90 $char5. @227 zpen590 $char5. @232 zpen690 $char5. @237 znonrc90 $char5. @242 zhsorc90 $char5. @247 zsclrc90 $char5. @252 zcolrc90 $char5. @257 ctpci00 $char6. @263 ctmed00 $char6. @269 ctden00 $char6. @275 ctnon00 $char5. @280 cthso00 $char5. @285 ctscl00 $char5. @290 ctcol00 $char5. @295 ctblk00 $char5. @300 ctwht00 $char5. @305 cthsp00 $char5. @310 ctpov00 $char5. @315 cten500 $char5. @320 cten600 $char5. @325 medag00 $char6. @331 medrc00 $char6. @337 povrc00 $char5. @342 nonrc00 $char5. @347 hsorc00 $char5. @352 sclrc00 $char5. @357 colrc00 $char5. @362 zppci00 $char6. @368 zpmed00 $char6. @374 zpden00 $char6. @380 zpnon00 $char5. @385 zphso00 $char5. @390 zpscl00 $char5. @395 zpcol00 $char5. @400 zpblk00 $char5. @405 zpwht00 $char5. @410 zphsp00 $char5. @415 zpen500 $char5. @420 zpen600 $char5. @425 znonrc00 $char5. @430 zhsorc00 $char5. @435 zsclrc00 $char5. @440 zcolrc00 $char5. @445 s_sex $char1. @446 RAC_RECB $char2. @448 ICD_CODE $char1. @449 COD89V $char4. @453 COD10V $char4. @457 codkm1 $char3. @460 codpub $char3. @463 nhiade $char1. @464 ihsrecl $char1. @465 SER_DODM $char2. @467 SER_DODY $char4. @471 srace $char2. @473 origin $char1. @474 stat_rec $char1. @475 seq_num $char2. @477 site $char3. @480 siterec $char2. @482 siterkm $char2. @484 site2r $char2. @486 hist $char4. @490 hist_2 $char4. @494 beh $char1. @495 beh_2 $char1. @496 behtrnd $char1. @497 modx $char2. @499 yrdx $char4. @503 agerec $char2. @505 rpt_src $char1. @506 hststga $char1. /* @507 modajc1 $char2.*/ @509 modajc3 $char2. @511 ajccstg $char2. @513 dajccts $char2. @515 dajccms $char2. @517 dajccns $char2. @519 dajcstg $char2. @521 dajcflg $char1. @522 dss77s $char1. @523 dss77f $char1. @524 dss00s $char1. @525 dss00f $char1. @526 sss77 $char1. @527 sssm2z $char1. @528 frstprm $char1. @529 multprm $char1. @530 marital $char1. @531 registry $char2. @533 monrx $char2. @535 yr_rx $char4. @539 radiatn $char1. @540 othertx $char1. @541 radsurg $char1. @542 radbrn $char1. @543 no_surg $char1. @544 grade $char1. @545 dxconf $char1. @546 lateral $char1. @547 ss_surg $char2. @549 sx_prim $char2. @551 num_nd $char2. @553 sx_scop $char1. @554 sx_site $char1. @555 reconstr $char1. @556 sxprif $char2. @558 sxscof $char1. @559 sxsitf $char1. @560 tumor1 $char1. @561 tumor2 $char1. @562 tumor3 $char1. @563 e4size $char2. @565 e4ext $char1. @566 e4node $char1. @567 e10size $char3. @570 e10ext $char2. @572 e10node $char1. @573 e10pn $char2. @575 e10ne $char2. @577 e10pe $char2. @579 eodcde $char1. @580 cnty $char3. @583 survm $char2. @585 survy $char2. @587 survt $char3. @590 csex $char2. @592 cslym $char2. @594 csmet $char2. @596 csmt $char1. @597 csrg $char1. @598 cssite1 $char3. @601 cssite2 $char3. @604 cssite3 $char3. @607 cssite4 $char3. @610 cssite5 $char3. @613 cssite6 $char3. @616 cstum $char3. @619 cssch $char2. @621 csts $char1. @622 csvf $char2. @624 csvl $char2. @626 hisrcb $char2. @628 icdo $char1. @629 icd3 $char4. @633 icd3m $char4. @637 primstl $char3. @640 la05_cd $char1. @641 napia_cd $char2. @643 plc_brth $char3. @646 numprims $char2. /* created variables */ @648 SER_MOLC $char2. @650 SER_YOLC $char4. @654 stat_rec $char1. @655 agedx Z3. @658 type_fup $char1. @659 numrec Z2. @661 seq_rcd Z2. @663 cohort $char1. /* USER - replace lenX_n variables as needed. */ /* The existing tag must be the appropriate length. */ /* The variables must be numeric. */ @664 len1_1 z1. @665 len1_2 z1. @666 len1_3 z1. @667 len1_4 z1. @668 len1_5 z1. @669 len1_6 z1. @670 len1_7 z1. @671 len1_8 z1. @672 len1_9 z1. @673 len1_10 z1. @674 len2_1 z2. @676 len2_2 z2. @678 len2_3 z2. @680 len2_4 z2. @682 len2_5 z2. @684 len2_6 z2. @686 len2_7 z2. @688 len2_8 z2. @690 len2_9 z2. @692 len2_10 z2. @694 len3_1 z3. @697 len3_2 z3. @700 len3_3 z3. @703 len3_4 z3. @706 len3_5 z3. @709 len4_1 z4. @713 len4_2 z4. @717 len4_3 z4. @721 len4_4 z4. @725 len4_5 z4. @729 len5_1 z5. @734 len5_2 z5. @739 len5_3 z5. @744 len5_4 z5. @749 len5_5 z5. ; run;