' MacroName: UnExportedSearch ' MacroDescription: Search the OCLC Save file for unexported ' records, and resave those records ' Macro written by: Joel Hahn, Niles Public Library District 'Note: must have already done an "si" command to use this macro. 'Also, to search *everything* in the save file, you have to 'be looking at the first page of the save list when you run the 'macro. 'Note: Macro is currently optimized for use in a consortium, as 'it only resaves records that also have a specific holding symbol sub main Dim CS as Session Set CS=CurrentSession 'Put your library's four-letter holdings symbol here Agency$="####" SaveString$="" CheckEnd$="" i=1 Do While CheckEnd$<>"You are already at the end of the list." For j=6 to 24 CS.GetTextInRegion SaveNum$, j, 2, j, 5 CS.GetChar Exported$, Attrib%, j, 79 'MsgBox SaveNum$ & "|" & Exported$ If SaveNum$=" " Then Exit Do If Exported$="n" Then SaveString$=SaveString$+LTrim(SaveNum$)+"+" Next j RunMacro "PRSMUTIL!PageDown" CS.GetTextInRegion CheckEnd$, 2, 1, 2, 39 'MsgBox "|" & CheckEnd$ & "|" i=i+1 If i>90 Then Exit Do Loop If Len(SaveString$)>0 Then SaveString$=Left(SaveString$, Len(SaveString$)-1) c=1 Check$="+" TestNum$=SaveString$ For i=1 to Len(TestNum$) TestNum2$=Mid(TestNum$,i,1) If Asc(TestNum2$)=Asc(Check$) Then c=c+1 Next i 'Main loop cc=1 CS.Wait 1 Do If GetField(SaveString$,cc,"+")="" then goto Looper RecNum$="/"+GetField(SaveString$,cc,"+") CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" CurPage=1 Pager: CS.Send "tag 049" If CS.Find(Agency$, 6, 1, 1) Then CS.PutText "s", 1, 1 RunMacro "PRSMUTIL!SendCommand" End If Looper: cc=cc+1 CS.Wait 1 Loop Until cc>=c+1 Goto done 'Go to the end of the macro ErrHandler: MsgBox "Error " & Err & "(" & Erl & "): " & Error Resume done done: CS.PutText Chr(0), 1, 1 end sub