-
Notifications
You must be signed in to change notification settings - Fork 0
/
949multi.vb
127 lines (117 loc) · 5.89 KB
/
949multi.vb
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
'MacroName:949multi
'MacroDescription:949 multi
sub main
dim CS as object
set CS = CreateObject("Connex.Client")
Dim locs
Dim locs2
Dim locm
Dim barcode
Dim barcode2
Dim tycod
Dim tycod2
Dim copinfo
Dim copinfo2
Dim icode2
Dim info1 as string
Dim info2 as string
Dim formatcode as string
Dim allformats as string
Dim sData as String
dim sdata2 as string
dim m7a as string
userinit = "bjt"
icode2="-"
allformats="a book"&chr$(10)&"0 periodical"&chr$(10)&"@ ebook"&chr$(10)&"g DVD"&chr$(10)&"2 videotape"&chr$(10)&"3 laserdisc"&chr$(10)&"j CD, music"&chr$(10)&"I CD, spoken"&chr$(10)&"8 tape, music"&chr$(10)&"6 tape, spoken"&chr$(10)&"m software"&chr$(10)&"9 website"&chr$(10)&"e map"&chr$(10)&"c music score"&chr$(10)&"t thesis"&chr$(10)&"o kit"&chr$(10)&"r 3D object"&chr$(10)&"4 slide"&chr$(10)&"h record album"&chr$(10)
CS.GetField "007", 1, sData
sdata2=chr$(223)+"a "+mid$(sdata,6)+" "
for x=2 to (len(sdata2)/5)+1
if mid$(getfield (sdata2,x,chr$(223)),1,1)="a" then m7a=mid$(getfield (sdata2,x,chr$(223)),3,1)
if mid$(getfield (sdata2,x,chr$(223)),1,1)="b" then m7b=mid$(getfield (sdata2,x,chr$(223)),3,1)
if mid$(getfield (sdata2,x,chr$(223)),1,1)="e" then m7e=mid$(getfield (sdata2,x,chr$(223)),3,1)
if mid$(getfield (sdata2,x,chr$(223)),1,1)="g" then m7g=mid$(getfield (sdata2,x,chr$(223)),3,1)
next x
CS.GetFixedField "Type", m6type
CS.GetFixedField "blvl", m6blvl
fortype="Unknown, please select"
formatcode="-"
if m6type="a" and m6blvl="m" then fortype="Book":formatcode="a"
if m6type="a" and m6blvl="s" then fortype="Serial" & chr$(10) & chr$(10) & "Please choose whether item is a book (a) or periodical (0)":formatcode="a or 0"
if m6type="m" and m6blvl="m" then fortype="Software":formatcode="m"
if m6type="e" then fortype="Map":formatcode="e"
if m6type="c" then fortype="Music Score":formatcode="c"
if m6type="t" then fortype="Thesis":formatcode="t"
if m6type="o" then fortype="Kit":formatcode="o"
if m6type="r" then fortype="3D Object":formatcode="r"
if m6type="g" and m7a="v" and m7e="v" then fortype="DVD":formatcode="g"
if m6type="g" and m7a="v" and m7e="g" then fortype="Laserdisc":formatcode="3"
if m6type="g" and m7a="v" and m7b="f" then fortype="Videocassette":formatcode="2"
if m6type="g" and m7a="g" and m7e="s" then fortype="Slide":formatcode="4"
if m6type="a" and m6blvl="m" and m7a="c" and m7b="r" then fortype="ebook or website":formatcode="@ or 9"
if m6type="m" and m6blvl="m" and m7a="c" and m7b="r" then fortype="ebook or website":formatcode="@ or 9"
if m6type="j" and m7a="s" and m7b="d" and m7g="g" then fortype="CD, Music":formatcode="j"
if m6type="i" and m7a="s" and m7b="d" and m7g="g" then fortype="CD, Spoken":formatcode="i"
if m6type="j" and m7a="s" and m7b="s" then fortype="tape, Music":formatcode="8"
if m6type="i" and m7a="s" and m7b="s" then fortype="tape, spoken":formatcode="6"
if m6type="i" and m7a="s" and m7b="d" and m7g<>"g" then fortype="Record Album":formatcode="h"
if m6type="j" and m7a="s" and m7b="d" and m7g<>"g" then fortype="Record Album":formatcode="h"
CS.GetField "050", 1, lc_call
if lc_call="" then goto skipcall
callloc=""
if asc(mid$(lc_call,6,1))<=75 then callloc="c3rd"
if asc(mid$(lc_call,6,1))>=76 then callloc="c4th"
skipcall:
locs=InputBox$("#1"&chr(10)&chr(10)&"Enter location:","949 multi",callloc)
bci:
if locs="" then goto out
locm=locs
info1=" loc= " & locs & " "
barcode=InputBox$("#1" & info1 & chr(10) & chr(10)& "Scan barcode:","949 multi")
if barcode="" then goto out
if len(barcode)<>14 then
goto bci:
end if
tycod=InputBox$("#1" & info1 & chr(10)& chr(10)& "Enter TY code:","949 multi","0")
if tycod="" then goto out
info1=info1 + "TY code= " & tycod & " "
copinfo=InputBox$("#1" & info1 & chr(10) & chr(10) & "copy=","949 multi")
if copinfo="" then goto out
info1="#1" & info1+"cop= " & copinfo & chr(10) & chr(10)
locs2=InputBox$(info1 & chr(10) & "#2"&chr(10)&chr(10)&"Enter location:","949 multi",locs)
bci2:
if locs2="" then goto out
if locs2<>locs then locm="multi"
info2=" loc= "& locs2 & " "
barcode2=InputBox$ (info1 & chr(10) & "#2" & info2 & chr(10) & chr(10) & "Scan barcode:","949 multi")
if barcode2="" then goto out
if len(barcode2)<>14 then
goto bci2:
end if
tycod2=InputBox$(info1 & chr(10) & "#2" & info2 & chr(10) & chr(10) & "Enter TY code:","949 multi",tycod)
if tycod2="" then goto out
info2=info2 + "TY code: " & tycod2 & chr(10)
copinfo2=InputBox$(info1 & chr(10) & "#2" & info2 & chr(10) & chr(10) & "copy=","949 multi")
if copinfo2="" then goto out
noformat:
curformat=formatcode
formatcode=inputbox$("Format:"&chr$(10)&chr$(10)&"Suggested code: "& fortype & chr$(10) & chr$(10) & "Enter 'list' to see available codes.","949",formatcode)
if formatcode="" then goto out
if formatcode="list" then msgbox (allformats): formatcode=curformat: goto noformat:
if len(formatcode) <> 1 then goto noformat:
noicode2:
icode2=inputbox$("Icode2:" & chr$(10) & chr$(10) & "Choose from:" & chr$(10) & "- None" & chr$(10) & "a CONTENT ADDED" & chr$(10) & "b SUBJECT ADDED" & chr$(10)& "c NOTE/SUB ADDED","949",icode2)
if icode2="" then goto out
if len(icode2) <> 1 then goto noicode2
i_status:
istat=inputbox$("Item Status:" & chr$(10) & chr$(10) & "Choose from:" & chr$(10) & "- Available" & chr$(10) & "p In Process","949","p")
if istat="" then goto i_status
if istat="p" then goto make949
if istat="-" then goto make949
goto i_status
make949:
CS.addfieldline 1,"949 *recs=b;ins=" & userinit & ";i=" & barcode & "/sta=" & istat & "/loc=" & locs & "/ty=" & tycod & "/cop=" & copinfo & "/i2=" & icode2 & "/b2=" & formatcode & ";i=" & barcode2 & "/sta=" & istat & "/loc=" & locs2 & "/ty=" & tycod2 & "/cop=" & copinfo2 & ";"
'CS.Cursorrow=1
'CS.Cursorcolumn=24
'cs.insertmode=false
out:
end sub