' MacroName: Change049 ' MacroDescription: Change the info in an 049 to the desired ' holding symbol ' 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" 'To add/delete 3-letter holding symbols, simply add a line 'where you want the new symbol to be or delete the desired 'symbol, and shift all of the other numbers in parentheses 'accordingly, then change the number in "Dim Hold$(##)" to 'match the number of the final entry. To change the possible 'fourth letters, see the next section. Dim Hold$(24) Hold$(0)="JED" Hold$(1)="C2Y" Hold$(2)="GEZ" Hold$(3)="IHN" Hold$(4)="JEB" Hold$(5)="JEE" Hold$(6)="JEF" Hold$(7)="JEG" Hold$(8)="JEI" Hold$(9)="JEJ" Hold$(10)="JEK" Hold$(11)="JEL" Hold$(12)="JEM" Hold$(13)="JEN" Hold$(14)="JEO" Hold$(15)="JEP" Hold$(16)="JEQ" Hold$(17)="JEW" Hold$(18)="JXC" Hold$(19)="KAJ" Hold$(20)="KAO" Hold$(21)="JE2" Hold$(22)="JE3" Hold$(23)="JE4" Hold$(24)="JUB" 'Following is the list of all of the possible fourth letters 'currently available to CCS libraries. No attempt has been 'made to include any sort of verification that a particular 'letter is used by a particular library; that is left up to 'the person using the macro. To alter this list, simple 'add or delete a line, and shift the numbers accordingly, 'then change the number in "Dim Div$(##)" to match the 'number in the final entry. Dim Div$(35) Div$(0)="A" Div$(1)="B" Div$(2)="C" Div$(3)="D" Div$(4)="E" Div$(5)="F" Div$(6)="G" Div$(7)="H" Div$(8)="I" Div$(9)="J" Div$(10)="K" Div$(11)="L" Div$(12)="M" Div$(13)="N" Div$(14)="O" Div$(15)="P" Div$(16)="Q" Div$(17)="R" Div$(18)="S" Div$(19)="T" Div$(20)="U" Div$(21)="V" Div$(22)="W" Div$(23)="X" Div$(24)="Y" Div$(25)="Z" Div$(26)="0" Div$(27)="1" Div$(28)="2" Div$(29)="3" Div$(30)="4" Div$(31)="5" Div$(32)="6" Div$(33)="7" Div$(34)="8" Div$(35)="9" 'Set up instructions to be displayed in the dialog box Instruct$="Pick the desired 3-letter code and 4th letter. " Instruct$=Instruct$+"Either use the mouse, or type the first " Instruct$=Instruct$+"letter (repeatedly, if necessary) and Tab " Instruct$=Instruct$+"to move to the next field." 'Set up and run the dialog box Begin Dialog newdlg 75, 54, 141, 73 Caption "Change 049" Text 1, 3, 140, 32, Instruct$ DropListBox 12, 40, 28, 14, Hold(), .Library DropListBox 40, 40, 17, 12, Div(), .Division OkButton 12, 54, 28, 14 CancelButton 40, 54, 28, 14 End Dialog Dim HoldSymbols as newdlg result = Dialog(HoldSymbols) If result = 0 Then Goto Done 'Use the information gathered from the dialog box to 'create the desired holding symbol HSymb$=Hold$(HoldSymbols.Library)+Div$(HoldSymbols.Division) CS.PutText "tag 049", 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText HSymb$, 6, 16 CS.ToggleEdit ' Send an Alt-F10 to send the change RunMacro "PRSMUTIL!SendEdits" ' Automatically update record CS.MoveCursor 1, 1 CS.PutText "u" RunMacro "PRSMUTIL!SendCommand" Done: end sub