Created
August 6, 2014 05:18
-
-
Save cKlee/46471ed32a84b3e9b8af to your computer and use it in GitHub Desktop.
Temporary import/manipulation scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __tempTuebingen(csv) | |
{ | |
var ezb = false; | |
__iterateExemplare( | |
function(i) | |
{ | |
application.activeWindow.command("\\mut e" + i, false); | |
if(!ezb) | |
{ | |
application.activeWindow.title.findTag("4800",0,false,true,false); | |
if(application.activeWindow.title.selection.match(/\!009019286\!/)) | |
{ | |
application.activeWindow.title.findTag("700"+i,0,false,true,false); | |
if(application.activeWindow.title.selection.match(/xze/)) | |
{ | |
ezb = true; | |
} | |
//application.messageBox("", "21", "message-icon"); | |
} | |
return csv.__csvSaveBuffer(false,"Datensatz wurde nicht verändert. Exemplar "+i); | |
} | |
else | |
{ | |
application.activeWindow.title.findTag("700"+i,0,false,true,false); | |
if(application.activeWindow.title.selection.match(/x$/)) | |
{ | |
//application.messageBox("", "x", "message-icon"); | |
application.activeWindow.title.findTag("4800",0,false,true,false); | |
if(!application.activeWindow.title.selection.match(/\!009019286\!/)) | |
{ | |
//application.messageBox("", "!21", "message-icon"); | |
var x = 0; | |
while((feld7135 = application.activeWindow.title.findTag("7135",x,false,true,false)) != "") | |
{ | |
//application.messageBox("", application.activeWindow.title.selection, "message-icon"); | |
if(application.activeWindow.title.selection.match(/ezeit/)) | |
{ | |
application.activeWindow.title.findTag("700"+i,0,false,true,false); | |
var del = application.activeWindow.title.selection.replace(/x$/,'l'); | |
//application.messageBox("", del, "message-icon"); | |
application.activeWindow.title.insertText(del); | |
if (application.activeWindow.status != "ERROR") | |
{ | |
// save buffer | |
return csv.__csvSaveBuffer(true,"Datensatz wurde geändert. Exemplar "+i); | |
} else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR. Exemplar "+i); | |
} | |
//application.messageBox("", "ezeit", "message-icon"); | |
} | |
x++; | |
} | |
} | |
} | |
} | |
return csv.__csvSaveBuffer(false,"Datensatz wurde nicht verändert. Exemplar "+i); | |
} | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function __kat4244bsb(iterator,csv){ | |
// edit record | |
try | |
{ | |
// temp TEST | |
application.activeWindow.command("dow s0 " + iterator ,false); | |
application.activeWindow.command("k " + iterator + " p",false); | |
var idn = application.activeWindow.getVariable("P3GPP"); | |
} | |
catch(e) | |
{ | |
csv.__csvLOG("\tDatensatz kann nicht geoeffnet werden.\nFehlermeldung: " + e); | |
return; | |
} | |
if (application.activeWindow.status != "ERROR") | |
{ | |
var checkDuplicate = function(feld,feldText){ | |
for(var y = 0; y < feld.length; y++) { | |
if(feld[y] == feldText) | |
{ | |
//__zdbError(feld[y] +"\n ==== \n"+feldText); | |
return true; | |
} | |
} | |
return false; | |
} | |
var onlyUnique = function (value, index, self) { | |
return self.indexOf(value) === index; | |
} | |
//--- vars we need | |
var feld4244 = new Array(); | |
//var subfield = ""; | |
var code = ""; | |
var x = 0; | |
var y; | |
var sav = Array("039B","039C","039E","039S"); | |
// save | |
for(var u = 0; u < sav.length; u++) | |
{ | |
y = 0; | |
//__zdbError("find " + sav[u] + "["+y+"]"); | |
while((application.activeWindow.title.findTag(sav[u], y, false, true, false) != "") ){ | |
feld4244[x] = application.activeWindow.title.currentField; | |
x++; | |
y++; | |
} | |
} | |
// delete | |
for(u = 0; u < sav.length; u++) | |
{ | |
application.activeWindow.title.startOfBuffer(false); | |
while(application.activeWindow.title.findTag(sav[u], 0, false, true, false) != ""){ | |
application.activeWindow.title.deleteLine(1); | |
} | |
} | |
// paste | |
var expansion; | |
var feld424XText = new Array(); | |
application.activeWindow.title.endOfBuffer(false); | |
var dublicate = false;; | |
for(var i = 0; i < feld4244.length; i++) | |
{ | |
//__zdbError(feld4244[i]); | |
while(feld4244[i].match(/\$\$/)) | |
{ | |
feld4244[i] = feld4244[i].replace(/\$\$/, "\$"); | |
} | |
//__zdbError(feld4244[i]); | |
while(feld4244[i].match(/[^\s]\$b/)) | |
{ | |
feld4244[i] = feld4244[i].replace(/([^\s])(\$b)/, "$1 / "); | |
} | |
//__zdbError(feld4244[i]); | |
feld4244[i] = feld4244[i].replace(/</, " <"); | |
//__zdbError(feld4244[i]); | |
feld4244[i] = feld4244[i].replace(/(.*--->)(\s?:\s)(.*)/, "$1 $3"); | |
//__zdbError(feld4244[i]); | |
if(feld4244[i].match(/(039S\s.*)--->\s(.*)/)) | |
{ | |
feld4244[i] = feld4244[i].replace(/(039S\s.*)--->\s(.*)/, '$1"$2"'); | |
} | |
//feld4244[i] = feld4244[i].replace(/([^:]*)([^>]*)/, "$1"); // TODO check this | |
while(feld4244[i].match(/\s\s/)) | |
{ | |
feld4244[i] = feld4244[i].replace(/\s\s/, " "); | |
} | |
if(expansion = feld4244[i].match(/\$r(.*)/)) | |
{ | |
expansion = __expansionUF(expansion[1]); | |
feld4244[i] = feld4244[i].replace(/(.*)\$r(.*)/,"$1\$r"+expansion); | |
//__zdbError(feld4244[i]); | |
//application.activeWindow.title.insertText(feld4244[i] + "\n"); | |
} | |
else if(feld4244[i].match(/^039E.*\$b.\$./)) // 4244 | |
{ | |
if(feld4244[i].match(/\$8--[^O]/)) | |
{ | |
code = feld4244[i].match(/\$b./)[0][2]; | |
//---switch the subfields | |
switch(feld4244[i].match(/\$b.\$./)[0][4]){ | |
case "r" : feld424XText.push(feld4244[i].substr(0,5) + "$b" + code + "$r" + feld4244[i].match(/\$b.\$r(.*)/)[1]); | |
break; | |
case "a" : feld424XText.push(feld4244[i].substr(0,5) + "$b" + code + "$r" + feld4244[i].match(/\$b.\$a(.*)\$9/)[1] + " ---> " + __expansionUF(feld4244[i].match(/\$8--[A-Za-z]{4}--:?\s?(.*)/)[1])); | |
break; | |
default : feld424XText.push(feld4244[i].substr(0,5) + "$b" + code + "$r" + __zdbSwitchCode4244(code) + " ---> " + __expansionUF(feld4244[i].match(/\$8--[A-Za-z]{4}--:?\s?(.*)/)[1])); | |
break; | |
} | |
} | |
else | |
{ | |
feld424XText.push(feld4244[i].match(/(.*)\$8/)[1]); | |
} | |
} | |
else if(feld4244[i].match(/^039S.*\$9/)) // 4245 | |
{ | |
if(feld4244[i].match(/\$8--[^O]/)) // not O* | |
{ | |
feld424XText.push(feld4244[i].substr(0,5)+"$r"+feld4244[i].match(/\$a(.*)\$9/)[1] +" \""+__expansionUF(feld4244[i].match(/\$8--[A-Za-z]{4}--:?\s?(.*)/)[1])+"\""); | |
} | |
else | |
{ | |
feld424XText.push(feld4244[i].match(/(.*)\$8/)[1]); | |
} | |
} | |
else if(feld4244[i].match(/^039B.*\$9/)) // 4241 | |
{ | |
if(feld4244[i].match(/\$8--[^O]/)) // not O* | |
{ | |
feld424XText.push(feld4244[i].substr(0,5)+"$rBeil. zu ---> "+__expansionUF(feld4244[i].match(/\$8--[A-Za-z]{4}--:?\s?(.*)/)[1])); | |
} | |
else | |
{ | |
feld424XText.push(feld4244[i].match(/(.*)\$8/)[1]); | |
} | |
} | |
else if(feld4244[i].match(/^039C.*\$9/)) // 4242 | |
{ | |
if(feld4244[i].match(/\$8--[^O]/)) // not O* | |
{ | |
feld424XText.push(feld4244[i].substr(0,5)+"$rBeil. ---> "+__expansionUF(feld4244[i].match(/\$8--[A-Za-z]{4}--:?\s?(.*)/)[1])); | |
} | |
else | |
{ | |
feld424XText.push(feld4244[i].match(/(.*)\$8/)[1]); | |
} | |
} | |
else | |
{ | |
//application.activeWindow.title.insertText(feld4244[i] + "\n"); | |
} | |
} | |
var unique = feld4244.filter( onlyUnique ); | |
//__zdbError(unique); | |
for(var u = 0;u<unique.length;u++) | |
{ | |
//application.activeWindow.clipboard += unique[u]+"\n"; | |
if(unique[u].match(/\$r(.*)/)) | |
{ | |
application.activeWindow.title.insertText(unique[u] + "\n"); | |
} | |
else if(!unique[u].match(/^039E|^039S|^039B|^039C/)) | |
{ | |
application.activeWindow.title.insertText(unique[u] + "\n"); | |
} | |
} | |
//application.activeWindow.clipboard = ""; | |
var uniqueText = feld424XText.filter( onlyUnique ); | |
for(var t = 0;t<uniqueText.length;t++) | |
{ | |
//application.activeWindow.clipboard += feld424XText[t]+"\n"; | |
//duplicate = checkDuplicate(feld4244,feld424XText[t]); | |
//if(!checkDuplicate(feld4244,feld424XText[t])) | |
//if(!checkDuplicate(feld424XText,feld424XText[t])) | |
//{ | |
//application.activeWindow.title.insertText(feld424XText[t] + "\n"); | |
application.activeWindow.title.insertText(uniqueText[t] + "\n"); | |
//} | |
//else | |
} | |
csv.__csvSaveBuffer(true,"424X geaendert."); | |
// temp TEST | |
application.activeWindow.command("dow s0 " + iterator ,false); | |
return; | |
}else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht geoeffnet werden. Status = ERROR."); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function kaun(){ | |
var csv = new CSV(); | |
csv.__csvSetLogFilename("LOG_kaun_Zsn_China_count_prod.csv"); | |
var fileInput = utility.newFileInput(); | |
var record = ""; | |
var deletes = new Object(); | |
var zdbid; | |
var orgkat; | |
var kat4000, kat4000split, kat4213new, verfasser; | |
//var feld4213Inhalt = ""; | |
var feld4213 = ""; | |
var input = false; | |
if(fileInput.openSpecial("ProfD", "\\csv\\Zsn_China_count.txt")) { | |
var aLine = ""; | |
//while(fileInput.isEOF != true) { | |
while((aLine = fileInput.readLine()) != null) { | |
//__zdbError(aLine); | |
//__zdbError(record); | |
if(aLine.substr(0,4) == "0500") input = true; | |
if(aLine != "") | |
{ | |
if(aLine.substr(0,4) == "2110") { | |
zdbid = aLine.substr(5); | |
} | |
else if(input == true) | |
{ | |
if(aLine.match( /^\d\d\d\d\s\$T\d\d\d?\$U/)) | |
{ | |
orgkat = aLine.substr(0,4); | |
deletes[orgkat] = orgkat; | |
record += "\n"+aLine; | |
} | |
if(aLine.substr(0,4) == "4213") | |
{ | |
if(aLine.match(/4213 Abweichende Wortbildung d. Hauptsacht.:\s/)) | |
{ | |
feld4213 = aLine; | |
// feld4213Inhalt = aLine.replace(/4213 Abweichende Wortbildung d. Hauptsacht.:\s/, ""); | |
// __zdbError("4213 "+ feld4213Inhalt); | |
} | |
} | |
} | |
} | |
else | |
{ | |
application.activeWindow.command("f zdb " + zdbid,false); | |
application.activeWindow.command("k",false); | |
application.activeWindow.title.startOfBuffer(false); | |
kat4000 = application.activeWindow.title.findTag("4000",0,false,false,false); | |
if(!kat4000.match(/^\$T\d\d\d?\$U/)) | |
{ | |
//if(feld4213Inhalt != ""){ | |
kat4000split = kat4000.split(/\s[:=]\s/); | |
if(1 < kat4000split.length) | |
{ | |
if(verfasser = kat4000split[kat4000split.length-1].match(/(\s\/\s.*)$/)) | |
{ | |
kat4213new = kat4000split[0] + verfasser[0]; | |
} | |
else | |
{ | |
kat4213new = kat4000split[0]; | |
} | |
} | |
else | |
{ | |
kat4213new = kat4000split[0]; | |
} | |
//} | |
//if(feld4213Inhalt == kat4213new) | |
//{ | |
// __zdbError(feld4213Inhalt +" == "+ kat4213new); | |
// record += "\n"+feld4213; | |
//} | |
//else | |
//{ | |
// __zdbError(feld4213Inhalt +" != "+ kat4213new); | |
record += "\n4213 Abweichende Wortbildung d. Hauptsacht.: " + kat4213new; | |
//} | |
for(var i in deletes) | |
{ | |
while(application.activeWindow.title.findTag(deletes[i], 0, false, true, false) != "") | |
{ | |
application.activeWindow.title.deleteLine(1); | |
} | |
} | |
application.activeWindow.title.endOfBuffer(false); | |
application.activeWindow.title.insertText(record); | |
} | |
else | |
{ | |
if(feld4213) | |
{ | |
if("" == application.activeWindow.title.findTag("4213",0,false,false,false)) | |
{ | |
application.activeWindow.title.endOfBuffer(false); | |
application.activeWindow.title.insertText("\n"+feld4213); | |
} | |
} | |
} | |
if (application.activeWindow.status != "ERROR") { | |
csv.__csvSaveBuffer(true,"Zsn_China_count von " + zdbid); | |
} else { | |
// return undone but write error to a log file | |
csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR.\n"); | |
} | |
input = false; | |
record = ""; | |
zdbid = ""; | |
orgkat = ""; | |
deletes = Object(); | |
delete kat4000, kat4000split, kat4213new, verfasser; | |
//feld4213Inhalt = ""; | |
feld4213 = ""; | |
} | |
} | |
} | |
else | |
{ | |
__zdbError("Error opening file"); | |
} | |
fileInput.close(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mailFernleih(){ | |
var csv = new CSV(); | |
csv.csvFilename = "Konfiguration.csv"; | |
csv.startLine = 1; | |
csv.delimiter = ";"; | |
csv.__mailfernleih = function(){ | |
application.activeWindow.command("k d",false); | |
application.activeWindow.title.endOfBuffer(false); | |
if("" != csv.line['mailpass']) application.activeWindow.title.insertText("\n810 e$d" + csv.line['mailpass']+"\n"); | |
if("" != csv.line['mailact']) application.activeWindow.title.insertText("\n810 f$d" + csv.line['mailact']+"\n"); | |
if (application.activeWindow.status != "ERROR") { | |
return csv.__csvSaveBuffer(true,csv.line['isi']); | |
} else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR.\n"); | |
} | |
} | |
csv.__csvSetProperties(csv.__mailfernleih,["isi","mailact","mailpass"],'isi','isi',false,"LOG_mailFernleih.txt"); | |
try | |
{ | |
csv.__csvAPI(); | |
} | |
catch(e) | |
{ | |
csv.__csvError(e); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function OSM(){ | |
// in proxy_settings.js | |
// pref("network.proxy.type", 2); | |
// pref("network.proxy.autoconfig_url", "...proxy.pac"); | |
if (application.activeWindow.getVariable("scr") != "MI") { | |
__zdbError("Die Funktion kann nur im Korrekturmodus aufgerufen werden."); | |
return; | |
} | |
var iterator = 0; | |
var repl = false; | |
var feld371; | |
var prompter = utility.newPrompter(); | |
while((feld371 = application.activeWindow.title.findTag2("371",iterator,true,true,false)) == "") | |
{ | |
if(feld371.match(/\$2S/)) break; | |
iterator++; | |
} | |
if(feld371.match(/\$k|\$l/)) | |
{ | |
if(!prompter.confirm("OSM Koordinaten", | |
"In diesem Datensatz gibt es bereits Koordinaten. Sollen diese überschrieben werden?")) { | |
return false; | |
} | |
else{ | |
repl = true; | |
} | |
} | |
var street = feld371.match(/371 ([^$]*)/); | |
var city = feld371.match(/\$b([^$]*)/); | |
var plz = feld371.match(/\$e([^$]*)/); | |
var adr = street[1]+" "+plz[1]+" "+city[1]; | |
var msg,xmlrow,display_name,lat,lon; | |
var url = "http://nominatim.openstreetmap.org/search.php?q=" | |
var format = "&format=xml"; | |
var selected = false; | |
var xmlDoc = __zdbGetXML(url+encodeURIComponent(adr)+format); | |
/*if(!xmlDoc || xmlDoc == false) { | |
__zdbError("Keine OSM Daten für Adresse vorhanden"); | |
return false; | |
}*/ | |
var xmlrows = xmlDoc.getElementsByTagName("place"); | |
if(xmlrows.length < 1) | |
{ | |
while(xmlrows.length < 1) | |
{ | |
if(prompter.prompt("OSM Koordinaten","Keine OSM-Daten für diese Adresse. Neuer Versuch mit geänderter Adresse?",adr,"","")) | |
{ | |
adr = prompter.getEditValue(); | |
xmlDoc = __zdbGetXML(url+encodeURIComponent(adr)+format); | |
xmlrows = xmlDoc.getElementsByTagName("place"); | |
} | |
else | |
{ | |
return; | |
} | |
} | |
} | |
else | |
{ | |
application.shellExecute(url+adr,5,"open",""); | |
} | |
var xmlRowsCount = xmlrows.length; | |
var treffer = 0; | |
var latfull,lonfull,ind; | |
for(var r=0; r < xmlRowsCount; r++) { | |
xmlrow = xmlrows[r]; | |
display_name = xmlrow.getAttribute("display_name"); | |
latfull = xmlrow.getAttribute("lat"); | |
ind = latfull.indexOf(".")+6; | |
lat = latfull.substr(0,ind); | |
lonfull = xmlrow.getAttribute("lon"); | |
ind = lonfull.indexOf(".")+6; | |
lon = lonfull.substr(0,ind); | |
treffer++; | |
if(prompter.confirm("OSM Koordinaten", | |
"Sollen diese Koordinaten übernommen werden?\nTreffer: "+treffer+" von "+xmlRowsCount+"\nTitel: "+display_name+"\nLAT: "+lat+"\nLon: "+lon+"\n"+url+adr)) { | |
selected = true; | |
break; | |
} | |
} | |
if(!selected) return; | |
if(repl) | |
{ | |
var re = /\$k[^$]*\$l[^$]*/; | |
var replacementpattern = "$k"+lon+"$l"+lat; | |
var result = feld371.replace(re, replacementpattern); | |
application.activeWindow.title.deleteLine(1); | |
application.activeWindow.title.insertText("\n"+result+"\n"); | |
} | |
else | |
{ | |
var subfields = new Array("$n","$o","$p","$z","$2","$3"); | |
var ind; | |
for(var i = 0;i<subfields.length;i++) | |
{ | |
ind = application.activeWindow.title.currentField.indexOf(subfields[i]); | |
if(ind != -1) | |
{ | |
application.activeWindow.title.charRight(ind,false); | |
application.activeWindow.title.insertText("$k"+lon+"$l"+lat); | |
return; | |
} | |
} | |
} | |
} | |
function __zdbGetXML(url) | |
{ | |
try { | |
var req = Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].createInstance(); | |
req.open('GET', url, false); | |
req.setRequestHeader("Content-Type", "application/xml"); | |
req.send(null); | |
return req.responseXML; | |
} catch(e) { | |
__zdbError("Exception: " + e); | |
return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function vd18(){ | |
var csv = new CSV(); | |
csv.csvFilename = "BSB_ZDBID_VD18.csv"; | |
csv.startLine = 1; | |
csv.delimiter = ";"; | |
csv.__vd18 = function(){ | |
application.activeWindow.simulateIBWKey ("F7"); | |
application.activeWindow.title.endOfBuffer(false); | |
application.activeWindow.title.insertText("\n2199 " + csv.line['vd18']+"\n"); | |
if (application.activeWindow.status != "ERROR") { | |
return csv.__csvSaveBuffer(true,csv.line['vd18']); | |
} else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR"); | |
} | |
} | |
csv.__csvSetProperties(csv.__vd18,["zdb","vd18"],'zdb','zdb',false,"VD18_LOG.txt"); | |
try | |
{ | |
csv.__csvAPI(); | |
} | |
catch(e) | |
{ | |
csv.__csvError(e); | |
} | |
} | |
function vd18_4260(){ | |
var csv = new CSV(); | |
csv.csvFilename = "erg_DE-16.csv"; | |
csv.startLine = 1; | |
csv.delimiter = ";"; | |
csv.__vd18 = function(){ | |
application.activeWindow.simulateIBWKey ("F7"); | |
var x = 1; | |
if(application.activeWindow.title.findTag("4260", 0, true, true, false) != "" ){ | |
application.activeWindow.title.replace("\n4260 "+csv.line['4260']+"\n"); | |
} | |
else | |
{ | |
application.activeWindow.title.replace("\n4260 "+csv.line['4260']+"\n"); | |
} | |
while( application.activeWindow.title.findTag("4260", x, true, true, false) != "" ) | |
{ | |
application.activeWindow.title.replace("\n4260 "+csv.line['4260']+"\n"); | |
x++; | |
} | |
if (application.activeWindow.status != "ERROR") { | |
return csv.__csvSaveBuffer(true,csv.line['4260']); | |
} else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR"); | |
} | |
} | |
csv.__csvSetProperties(csv.__vd18,["zdb","4260"],'zdb','zdb',false,"VD18_4260_LOG.txt"); | |
try | |
{ | |
csv.__csvAPI(); | |
} | |
catch(e) | |
{ | |
csv.__csvError(e); | |
} | |
} | |
function vd18_markieren(){ | |
var csv = new CSV(); | |
csv.csvFilename = "VD18_ZDBIDs_markieren.txt"; | |
csv.startLine = 1; | |
csv.delimiter = ";"; | |
csv.__vd18 = function(){ | |
application.activeWindow.simulateIBWKey ("F7"); | |
var x = 0; | |
var feld4260 = ""; | |
var feld2199 = ""; | |
while( (feld4260 = application.activeWindow.title.findTag2("4260", x, false, true, false)) != "" ) | |
{ | |
if(feld4260.match(/\|b\|DE-.*|\|b\|VD18/)) | |
{ | |
return csv.__csvSaveBuffer(false,"\t4260 mit |b|DE-ISIL besetzt.\n"); | |
} | |
x++; | |
} | |
x = 0; | |
while( (feld2199 = application.activeWindow.title.findTag2("2199", x, false, true, false)) != "" ) | |
{ | |
if(feld2199.match(/VD18\s/)) | |
{ | |
return csv.__csvSaveBuffer(false,"\t2199 mit VD18-Nummer besetzt"); | |
} | |
x++; | |
} | |
application.activeWindow.title.endOfBuffer(false); | |
application.activeWindow.title.insertText("\n4260 |b|VD18"); | |
if (application.activeWindow.status != "ERROR") { | |
return csv.__csvSaveBuffer(true,"4260 |b|VD18 geschrieben"); | |
} else { | |
// return undone but write error to a log file | |
return csv.__csvSaveBuffer(false,"\tDatensatz kann nicht gespeichert werden. Status = ERROR"); | |
} | |
} | |
csv.__csvSetProperties(csv.__vd18,["zdb"],'zdb','zdb',false,"VD18_ZDBIDs_markieren_LOG.txt"); | |
try | |
{ | |
csv.__csvAPI(); | |
} | |
catch(e) | |
{ | |
csv.__csvError(e); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment