/* search FDR database */ /* signal on error */ signal on syntax trace o cgi = 'FINDAID'; vers = '1.2'; errto = 'STMK@VM.MARIST.EDU' e1 = time('R') cmdstat1 = fdrstats() /* vtime ttime reads writes sios */ 'REXX FDRHTTP' cgi vers text = translate(getvar('TEXT')) CELLFORM = 'COLLECTION_NAME;100-BOX;11-JUNK;1-TITLE;255-', 'STARTDAY;2-STARTMO;10-STARTYR;4-ENDDAY;2-ENDMO;10-ENDYR;4' 'OUTPUT

Finding Aids Keyword ' , 'Search Results

' text = fdresc(text) sel = "SELECT collection_name, " , "box_#, title, startday, startmo, " , "startyr, endday, endmo, endyr " , "from FDR.FINDAID where" , "UTITLE like '%"text"%'" /* can't use digits(box_#) due to leading 0, and can't use translate to remove since it does all 0, not just leading */ 'OUTPUT' '' "CALLPIPE (name f03 end ?) sql noind release" sel , "| > FINDAID RAW W" , "| spec 1-100 1 101-104 c2d 101 107-* nw" , "| > FINDAID RAW2 W" , "| c: count lines" , "| rexx stempros "CELLFORM"%&%FINDAID" , "| change /\// |*: " , "?" , "c: | var num" 'OUTPUT

' num ' matches returned.' /*%include fdrsuff */