/usr/share/lifelines/ssdi_aid.ll is in lifelines-reports 3.0.61-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | /*
* @progname ssdi_aid.ll
* @version 3
* @author Jim Eggert (eggertj@ll.mit.edu)
* @category
* @output Text
* @description
This LifeLines report program generates a text file that lists
people who are likely to be in the Social Security Death Index.
The SSDI starts in 1962 and is periodically updated to include
more recent years. This program guesses birth and death years
to make its determinations. If it finds a person likely to be
in the SSDI, it searches for the string SSDI in their notes to
indicate that an SSDI entry has already been found. If not, it
outputs a line about that person.
The output persons are in database order. Women are output in
with their last married name. To alphabetize the names in the text
report, you can use Unix sort:
sort -b +1 ss.out > ss.sort
The program optionally generates HTML output with buttons to search
the Rootsweb online SSDI database.
ssdi_aid - a LifeLines program to aid in the use of the U.S. Social
Security Death Index
by Jim Eggert (eggertj@ll.mit.edu)
Version 1, 28 June 1995
Version 2, 22 November 1996
Version 3, 11 January 2005 (changed to Rootsweb site)
*/
global(byear_delta)
global(byear_est)
global(byear_est_delta)
global(mother_age)
global(father_age)
global(years_between_kids)
global(oldage)
proc main() {
indiset(pset)
set(mother_age,23) /* assumed age of first motherhood */
set(father_age,25) /* assumed age of first fatherhood */
set(years_between_kids,2) /* assumed years between children */
set(oldage,90) /* normal maximum death age */
set(byearstart,1850) /* no one born before then can be in the SSDI */
set(unknownname,"<") /* for women, any spouse whose surname contains this
is considered to have an unknown surname */
getindi(person)
while(person) {
addtoset(pset,person,1)
getindi(person)
}
getintmsg(minage,"Enter minimum age for listing:")
getintmsg(html,"Enter 0 for text, 1 for html output:")
if (html) {
getintmsg(includebyears,"Enter 1 to include birth years in database query")
"<HTML>\n"
"<HEAD>\n"
"<TITLE> SSDI Aid Report </TITLE>\n"
"</HEAD>\n"
"<BODY>\n"
"Press a button to query Rootsweb's online SSDI database
for that individual."
"<HR>\n"
}
set(namewidth,50) /* change this value as needed */
"key" col(8) "@LAST, First Middle [MAIDEN]"
set(bcol,add(8,namewidth))
col(bcol) "Birthdate"
set(dcol,add(25,namewidth))
col(dcol) "Death\n"
print("Finding descendants")
set(pset,union(pset,spouseset(pset)))
set(pset,union(pset,descendantset(pset)))
print("' spouses")
set(pset,union(pset,spouseset(pset)))
print("' descendants")
set(pset,union(pset,descendantset(pset)))
print("... done.\n")
set(thisyear,atoi(year(gettoday())))
set(byearend,sub(thisyear,minage))
print("Traversing individuals...")
forindiset(pset,person,pval,pnum) {
set(star,1)
fornotes(inode(person),note) {
if (index(note,"SSDI:",1)) { set(star,0) }
}
if (star) {
set(byear,0)
set(bdate,"")
if (b,birth(person)) {
extractdate(b,bday,bmonth,byear)
set(bdate,date(b))
}
if (not(byear)) {
if (b,baptism(person)) {
set(bdate,date(b))
}
}
call estimate_byear(person)
/* set(byear,sub(byear_est,byear_est_delta)) */
if(and(byear_est,not(strlen(bdate)))) {
set(bdate,save(concat("c ",d(byear_est))))
}
set(dyear,0)
if (d,death(person)) {
extractdate(d,dday,dmonth,dyear)
}
if (not(dyear)) {
if(d,burial(person)) {
extractdate(d,dday,dmonth,dyear)
}
}
if (dyear) {
if (or(index(date(d),"ABT",1),eq(dmonth,0))) { set(dyear,add(dyear,5)) }
if (index(date(d),"AFT",1)) {
set(oldyear,add(byear,oldage))
if (gt(oldyear,dyear)) { set(dyear,oldyear) }
}
}
if (or(ge(dyear,1940),
and(not(dyear),le(byear,byearend),ge(byear,byearstart)))) {
set(nfam,nfamilies(person))
set(myname,fullname(person,1,0,namewidth))
set(mysurname,surname(person))
if (and(female(person),ne(nfam,0))) {
set(maidenname,save(concat(", ",fullname(person,1,1,100))))
families(person,fam,spouse,famnum) {
if (spousesurname,surname(spouse)) {
if (strlen(spousesurname)) {
if (not(index(spousesurname,unknownname,1))) {
set(mysurname,spousesurname)
set(myname,
trim(concat(upper(spousesurname),maidenname),namewidth))
if (ne(famnum,nfam)) {
set(myname,
trim(concat("+",myname),namewidth))
}
}
}
}
}
}
if (html) {
"<form method=post action=" qt()
"http://ssdi.rootsweb.com/cgi-bin/ssdi.cgi" qt()
"><input type=hidden name=lastname value=" qt()
mysurname qt()
"><input type=hidden name=firstname value=" qt()
list(givennamelist)
extracttokens(givens(person),givennamelist,nnames," ")
dequeue(givennamelist) qt() ">"
if (includebyears) {
if (lt(byear_est_delta,2)) {
"<input type=hidden name=birth value=" qt()
d(byear) qt() ">"
}
}
"<input type=submit name=submit value=" qt() key(person) qt()
"><input type=hidden name=nt value=" qt() "exact" qt() ">"
} else {
key(person) col(8)
}
myname
if (html) {
" " bdate " " long(d) "</form>"
}
else {
col(bcol) bdate col(dcol) long(d)
}
nl()
}
}
}
if (html) {
"</BODY>\n"
"</HTML>\n"
}
}
proc estimate_byear(person) {
set(byear_est,0)
set(byear_est_delta,neg(1))
if (byear,get_byear(person)) {
set(byear_est,byear)
set(byear_est_delta,byear_delta)
}
else { /* estimate from siblings */
set(older,person)
set(younger,person)
set(yeardiff,0)
set(border,0)
set(this_uncertainty,1)
while (and(not(byear_est),or(older,younger))) {
set(older,prevsib(older))
set(younger,nextsib(younger))
set(yeardiff,add(yeardiff,years_between_kids))
set(this_uncertainty,add(this_uncertainty,1))
if (older) {
set(border,add(border,1))
if (byear,get_byear(older)) {
set(byear_est,add(byear,yeardiff))
set(byear_est_delta,this_uncertainty)
}
}
if (and(not(byear_est),younger)) {
if (byear,get_byear(younger)) {
set(byear_est,sub(byear,yeardiff))
set(byear_est_delta,this_uncertainty)
}
}
}
}
if (not(byear_est)) { /* estimate from parents' marriage */
if (m,marriage(parents(person))) { extractdate(m,bd,bm,my) }
if (my) {
set(byear_est,add(add(my,mul(years_between_kids,border)),1))
set(byear_est_delta,add(border,1))
}
}
if (not(byear_est)) { /* estimate from first marriage */
families(person,fam,spouse,fnum) {
if (eq(fnum,1)) {
if (b,birth(spouse)) { extractdate(b,bd,bm,by) }
if (m,marriage(fam)) { extractdate(m,bd,bm,my) }
if (by) {
if (female(person)) {
set(byear_est,add(by,sub(father_age,mother_age)))
}
else {
set(byear_est,sub(by,sub(father_age,mother_age)))
}
set(byear_est_delta,5)
}
elsif (my) {
if (female(person)) { set(byear_est,sub(my,mother_age)) }
else { set(byear_est,sub(my,father_age)) }
set(byear_est_delta,5)
}
else {
children(fam,child,cnum) {
if (not(byear_est)) {
if (byear,get_byear(child)) {
if (female(person)) {
set(byear_est,sub(sub(byear,
mul(sub(cnum,1),years_between_kids)),
mother_age))
}
else {
set(byear_est,sub(sub(byear,
mul(sub(cnum,1),years_between_kids)),
father_age))
}
set(byear_est_delta,add(5,cnum))
}
}
}
}
}
}
}
if (not(byear_est)) { /* estimate from parents' birthyear */
if (byear,get_byear(mother(person))) {
set(byear_est,add(byear,mother_age))
}
else {
if (byear,get_byear(father(person))) {
set(byear_est,add(byear,father_age))
}
}
if (byear) {
set(byear_est_delta,5)
set(older,person)
while(older,prevsib(older)) {
set(byear_est,add(byear_est,years_between_kids))
set(byear_est_delta,add(byear_est_delta,1))
}
}
}
}
func get_byear(person) {
set(byear,0)
if (person) {
if (b,birth(person)) { extractdate(b,day,month,byear) }
if (byear) {
set(byear_delta,0)
set(dstring,trim(date(b),3))
if (not(strcmp(dstring,"BEF"))) { set(byear_delta,3) }
elsif (not(strcmp(dstring,"AFT"))) { set(byear_delta,3) }
elsif (not(strcmp(dstring,"ABT"))) { set(byear_delta,2) }
}
else {
if (b,baptism(person)) { extractdate(b,day,month,byear) }
if (byear) {
set(byear_delta,1)
set(dstring,trim(date(b),3))
if (not(strcmp(dstring,"BEF"))) { set(byear_delta,3) }
elsif (not(strcmp(dstring,"AFT"))) { set(byear_delta,3) }
elsif (not(strcmp(dstring,"ABT"))) { set(byear_delta,2) }
}
}
}
return(byear)
}
|