ࡱ>     !"#Root Entryb`%`߾8DeleteHoldings.SRC& DeleteHoldings.DES& =DeleteHoldings.BIN&! "#$%&'()*+,-./0123456789:;<=>?ABCDEFGHIJLMNOPQRSTVWXZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}' MacroName: DeleteHoldings ' MacroDescription: Takes an input list of OCLC #'s and ' deletes holdings on each record in turn ' Macro written by: Joel Hahn, Niles Public Library District sub main ' Set up session abbreviation & variable strings dim CS as session set CS = CurrentSession Dim Check$, DelNums$, RecNum$, TestNum$, TestNum2$ On Error Goto ErrHandler ' Set up input window, get input Begin Dialog DHolds 320, 52 Caption "OCLC records to delete holdings for" Text 1, 1, 140, 11, "Drop '#', separate numbers with '+'" Text 14, 13, 50, 11, "OCLC #'s:" TextBox 50, 13, 212, 11, .Nums OkButton 5, 28, 40, 20 CancelButton 55, 28, 40, 20 End Dialog dim NChoice as DHolds dialog NChoice ' Count total of entered record numbers c=1 Check$="+" TestNum$=NChoice.Nums 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 Do If GetField(NChoice.Nums,cc,"+")="" then goto Looper RecNum$="#"+GetField(NChoice.Nums,cc,"+") CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" Goto Choice Ret: 'Choice "Ok" return point #1 CS.PutText "delh", 1, 1 RunMacro "PRSMUTIL!SendCommand" Looper: 'Choice "Skip" return point. cc=cc+1 Loop Until cc>=c+1 Goto done 'Go to the end of the macro 'Choose whether to continue with procedure on current record, 'skip current record and go on to the next, or abort altogether Choice: Begin Dialog Glitch 320, 100, 44, 65 Caption "Stopper" ButtonGroup .bg PushButton 2, 2, 40, 20, "Ok" PushButton 2, 22, 40, 20, "Skip" PushButton 2, 42, 40, 20, "Quit" End Dialog Dim Stopper as Glitch Dialog Stopper SChoices=Stopper.bg Select Case SChoices Case 2 'Quit Goto done 'End macro Case 1 'Skip Goto Looper Case 0 'Ok Goto Ret End Select ErrHandler: MsgBox "Error " & Err & "(" & Erl & "): " & Error Resume done done: end sub Takes a list of OCLC #'s and deletes holdings on each in turnQ2$w#{#OCLC records to delete holdings for#Drop '#', separate numbers with '+' OCLC #'s:__Nums__+#PRSMUTIL!SendCommand delhStopperOkSkipQuit #bg___Error (): O(#V F" ,@P (`p08"@ "CS_NChoicecCheckTestNumi____TestNum2_cc_RecNum_StopperSChoices________main  F FmK+Passport  ~u2\[  @4 j  5  j  5 + j 2 5 Q j2Ԝ j( j7( j5 ]jj5 n;>?@@AnE5 `ea5 f#5l"jFIu +Q&VNumsDHolds$PbgGlitchySessionApplicationUpdate.SRC@Update.DESYUpdate.BINKZUpdateHoldings.SRC&U ' MacroName: Update ' MacroDescription: Automatically changes 049 to local symbol and ' updates the record ' Macro written by: Joel Hahn, Niles Public Library District sub main dim CS as session 'Set up "CS" as an alternative set CS = CurrentSession 'to "CurrentSession" 'Put your library's four-letter agency code here Agency$="####" CS.PutText "tag 049", 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText Agency$, 6, 16 CS.ToggleEdit RunMacro "PRSMUTIL!SendEdits" ' Automatically update record CS.MoveCursor 1, 1 CS.PutText "u" RunMacro "PRSMUTIL!SendCommand" end sub JQc$&3#7####tag 049PRSMUTIL!SendCommand  PRSMUTIL!SendEdits uJ#V FCSAgency_main  #7F FmK+Passport. ~u2\[5 q5 2\u5 2\6 q2\ q2\< u5 C2\6q2\Xq5 _2\u5 2\6 SessionApplication' MacroName: UpdateHoldings ' MacroDescription: Input a list of OCLC record #'s and macro ' will update holdings of each in turn ' Macro written by: Joel Hahn, Niles Public Library District Declare Sub Update(Agency$) sub main Revised KAJA placement ' Set up session abbreviation & variable strings Dim CS as session 'Set up "CS" as an alternative Set CS = CurrentSession 'to "CurrentSession" Dim Check$, DelNums$, RecNum$, TestNum$, TestNum2$, Agency$ 'Put your library's four-letter holdings code here Agency$="####" On Error Goto Errhandler ' Set up input window, get input Begin Dialog UHolds 320, 52 Caption "OCLC records to update holdings for" Text 1, 1, 140, 11, "Drop '#', separate numbers with '+'" Text 14, 13, 50, 11, "OCLC #'s:" TextBox 50, 13, 212, 11, .Nums OkButton 5, 28, 40, 20 CancelButton 55, 28, 40, 20 End Dialog Dim NChoice as UHolds Dialog NChoice ' Count total of entered record numbers c=1 Check$="+" TestNum$=NChoice.Nums place=0 Do place=InStr(place+1, TestNum$, Check$) If place<>0 then c=c+1 Loop While place<>0 'Main loop cc=1 Do If GetField(NChoice.Nums,cc,"+")="" then goto Looper RecNum$="#"+GetField(NChoice.Nums,cc,"+") CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" Goto Choice Ret: 'Choice "Ok" return point #1 Call Update(Agency$) Looper: 'Choice "Skip" return point. cc=cc+1 Loop Until cc>=c+1 Goto done 'Go to the end of the macro 'Choose whether to continue with procedure on current record, 'skip current record and go on to the next, or abort altogether Choice: Begin Dialog Glitch 320, 100, 44, 65 Caption "Stopper" ButtonGroup .bg PushButton 2, 2, 40, 20, "Ok" PushButton 2, 22, 40, 20, "Skip" PushButton 2, 42, 40, 20, "Quit" End Dialog Dim Stopper as Glitch Dialog Stopper SChoices=Stopper.bg Select Case SChoices Case 2 'Quit Goto done 'End macro Case 1 'Skip Goto Looper Case 0 Goto Ret End Select ErrHandler: MsgBox "Error " & Err & "(" & Erl & "): " & Error Resume done done: end sub sub Update(Agency$) Dim CS as session Set CS = CurrentSession CS.PutText "tag 049", 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText Agency$, 6, 16 CS.ToggleEdit ' Send an Alt-F10 to send the changes RunMacro "PRSMUTIL!SendEdits" ' Automatically update record CS.PutText "u", 1, 1 RunMacro "PRSMUTIL!SendCommand" end sub +Q \$######OCLC records to update holdings for#Drop '#', separate numbers with '+' OCLC #'s:__Nums__+#PRSMUTIL!SendCommand StopperOkSkipQuit #bg___Error (): tag 049 PRSMUTIL!SendEditsuU+#XiAl?@\@AB;BCDDEI5 <eaL5\l f#|5l jJM& ~u2\[q5 2\}u5 2\qޗ2\}q2\ u5 2\q6 2\}u5 2\u +Q&[E:NumsUHolds$PbgGlitchAgencySessionApplication' MacroName: UpdateHoldingsFromFile ' MacroDescription: Update holdings from a pre-created file of ' OCLC numbers ' Macro written by: Joel Hahn, Niles Public Library District Declare Sub Update(Agency$, OCLCNum$) sub main Dim CS as Session Set CS = CurrentSession 'Put your library's 4-letter holdings code here Agency$="####" 'Put the full path of the file where the OCLC numbers are here filename$="C:\UPDATE.TXT" filenum%=FreeFile Open filename$ For Input As filenum% x=1 Do Until x=Lof(1) Line Input #filenum%, OCLCNum$ Call Update(Agency$, OCLCNum$) x=x+1 y=Seek(1) If y>Lof(1) then x=Lof(1) Else Seek 1,y End If Loop Close filenum% Kill filename$ end sub sub Update(Agency$, OCLCNum$) dim CS as Session set CS = CurrentSession RecNum$="#"+OCLCNum$ CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText "tag 049", 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText Agency$, 6, 16 CS.ToggleEdit RunMacro "PRSMUTIL!SendEdits" CS.MoveCursor 1, 1 CS.PutText "u" RunMacro "PRSMUTIL!SendCommand" ' CS.Receive 5, "updated" end sub Qw$;C#G#### C:\UPDATE.TXT#PRSMUTIL!SendCommand tag 049 PRSMUTIL!SendEdits u$#&9&ݽV F&6CSAgencyfilenamefilenumxOCLCNum_yV FCS_RecNummainUpdate  #7F FmK+Passporth ~u2\[5 5  eA8 jC   fB jjOjI & fE66 fB fB 6jFaj>j:. ~u2\[5 ښq2\ u5 )2\@q5 F2\ u5 )2\@ qޗ2\  q2\P u5 W2\@q2\lq5 s2\ u5 )2\@ AgencyOCLCNumSessionApplicationDelete holdings from a pre-created file of OCLC numbers' MacroName: DeleteHoldingsFromFile ' MacroDescription: Delete Update holdings from a file of OCLC numbersholdings from a pre-created file of OCLC numbers ' Macro written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS = CurrentSession 'Put the full path of the file where the OCLC numbers are here filename$="G:\DELETE.TXT" filenum%=FreeFile Open filename$ For Input As filenum% UpdateHoldingsFromFile.BIN6jDeleteHoldingsFromFile.DES6 7DeleteHoldingsFromFile.SRC6DeleteHoldingsFromFile.BIN6x=1 Do Until x=Lof(1) Line Input #filenum%, OCLCNum$ RecNum$="#"+OCLCNum$ CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText "delh", 1, 1 RunMacro "PRSMUTIL!SendCommand" x=x+1 y=Seek(1) If y>Lof(1) then x=Lof(1) Else Seek 1,y End If Loop Close filenum% Kill filename$ end sub nQF-3$J# G:\DELETE.TXT#PRSMUTIL!SendCommand delh"gn# V F&6CSfilenamefilenumxOCLCNum_RecNum_ymain  F FmK+Passportp ~u2\[5 eA8jC  fB jjOjI 5  q2\ u5 "2\9q5 ?2\u5 "2\9 & fE66 fB fB 6jFj>j: SessionApplication