Browse Source

Finalize Version 0.2 COSTAGE unload SOS

COStage_0.2_Release
Daniel Quathamer 3 years ago
parent
commit
b5cd84d627
  1. 24
      build.xml
  2. 27
      src-modules/module/costage/rohdaten/COSTAGE_ENV.sam
  3. 46
      src-modules/module/costage/rohdaten/costage_unload.xml
  4. 40
      src-modules/module/costage/rohdaten/csv_unloads2unl.sql
  5. 12
      src-modules/module/costage/rohdaten/db-co.properties.sam
  6. 375
      src-modules/module/costage/rohdaten/sos_costage_unload.x
  7. 0
      src-modules/module/costage/rohdaten/sos_costage_unload.xml
  8. 7685
      src-modules/module/costage/rohdaten/sos_unload_graz_2019.xml
  9. 1
      src-modules/module/costage/rohdaten/superx.datum
  10. 15199
      src-modules/module/sos/rohdaten/sos_costage_unload.x

24
build.xml

@ -1,11 +1,12 @@ @@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="ModuleCreation" default="all" basedir=".">
<!--Aufruf mit
ant -DMODULE_PATH=$COSTAGE_PFAD -DBASE_DIR=. -DMODULE=costage all
So erzeugen Sie dann ein Paket:
cd $COSTAGE_PFAD
ant -f ../../conf/build.xml -DMODULE=costage -DPFAD=/home/superx/fertige_module -DDATABASE=POSTGRES -DENCODING=utf8 -DPLATFORM=superx -DWEBAPP_DIR=$WEBAPP erzeuge_paket
ant -DMODULE_PATH=$COSTAGE_PFAD -DBASE_DIR=. -DWEBAPP=$WEBAPP -DMODULE=costage all
So erzeugen Sie dann ein SuperX-Paket:
ant -DMODULE_PATH=$COSTAGE_PFAD -DWEBAPP_DIR=$WEBAPP -DMODULE=costage dist
-->
<dirname file="${ant.file}" property="moduleCreateBaseDir" />
@ -46,4 +47,19 @@ ant -f ../../conf/build.xml -DMODULE=costage -DPFAD=/home/superx/fertige_module @@ -46,4 +47,19 @@ ant -f ../../conf/build.xml -DMODULE=costage -DPFAD=/home/superx/fertige_module
<fileset dir="${MODULE_PATH}/../../conf" includes="module_scripts_create_ant.xml" />
</subant>
</target>
<target name="dist" description="Create Download package">
<subant target="erzeuge_paket">
<!--<property name="basedir" value="${MODULE_PATH}/../../conf/" />-->
<property name="MODULE" value="${MODULE}" />
<property name="PFAD" value="/home/superx/fertige_module" />
<property name="DATABASE" value="POSTGRES" />
<property name="ENCODING" value="utf8" />
<property name="PLATFORM" value="superx" />
<property name="WEBAPP_EXT_MODULE" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" />
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" />
<property name="SUPERX_BASE" value="${WEBAPP}/WEB-INF" />
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" />
</subant>
</target>
</project>

27
src-modules/module/costage/rohdaten/COSTAGE_ENV.sam

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
#!/bin/bash
#Entladeumgebung für SuperX
#Die folgenden Parameter m<EFBFBD>ssen angepasst werden
# SX_CLIENT ist die Client-Anwendung zum Zugriff auf die DB
SX_CLIENT=jdbc; export SX_CLIENT
DB_PROPERTIES=./db-co.properties
export DB_PROPERTIES
#auch die Logging-Ausgabe kann variiert werden: (./logging.properties.sam umbenennen)
LOGGER_PROPERTIES=$SUPERX_DIR/db/conf/logging.properties
export LOGGER_PROPERTIES
#Für jdbc auch JAVA_OPTS: viel RAM
#JAVA_OPTS="-Xmx500M"
#export JAVA_OPTS
SOURCESYSTEM=co
export SOURCESYSTEM
##Pfad für Entladedaten:
#COSTAGE_LOAD_PFAD=.
#export COSTAGE_LOAD_PFAD
##hier muss Unterverzeichnis unl existieren!
LOG=$COSTAGE_LOAD_PFAD/costage_unload.err
export LOG
DATEFILE=$COSTAGE_LOAD_PFAD/superx.datum
export DATEFILE

46
src-modules/module/costage/rohdaten/costage_unload.xml

@ -3,20 +3,14 @@ @@ -3,20 +3,14 @@
<module id="costage" version="0.1b" systeminfo_id="310">COSTAGE-Modul</module>
<parameters>
<param name="COSTAGE_UNL_COMPLETE" defaultValue="true" description="Komplett entladen"><comment>Sollen alle Datensätze entladen werden, oder nur die geänderten?(true,false).</comment></param>
<param name="VERSION" defaultValue="2" description="Datenbank-Version"><comment>CO-Version, möglich sind 2,3. </comment></param>
<param name="start_costage_stud_sem" defaultValue="19911" description="Startsemester Studierende"><comment>Ab welchem Semester sollen Studierende entladen werden? z.B. 20011 für SS 2001</comment></param>
<param name="start_costage_pruef_sem" defaultValue="19911" description="Startsemester Prüfungen"><comment>Ab welchem Semester sollen Prüfungen entladen werden? z.B. 20021 für SS 2002</comment></param>
<param name="COSTAGE_UNL_ANON" defaultValue="false" description="Pseudonymisierung"><comment>Matrikelnummern pseudonymisieren (true, false). Muss bei Datenquelle HISinOne auf "false" gesetzt sein.</comment></param>
<param name="COSTAGE_PNR" defaultValue="0" ><comment>Welche Prüfungsnummern (Vor- Hauptprüfun../../../superx/WEB-INF/web.xmlgen) sollen entladen werden? Wird bei Datenquelle HISinOne nicht ausgewertet.</comment></param>
<param name="COSTAGE_STUDENT_FILTER" defaultValue=" AND 1=1 " ><comment>Filter für Studierende, um z.B. Teststudenten nicht zu entladen (nur HISinOne).</comment></param>
<param name="VERSION" defaultValue="2" description="Datenbank-Version"><comment>CO-Version, wird derzeit ignoriert</comment></param>
</parameters>
<sourcesystems>
<sourcesystem name="co" description="CampusOnline-Datenbank" default="true"/>
</sourcesystems>
<unload-job id="costage_st_abschlussziele_amtstat" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_amtstat.unl" >
<unload-job id="px_st_abschlussziele_amtstat_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_amtstat.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -32,7 +26,7 @@ FROM px_st_abschlussziele_amtstat_v @@ -32,7 +26,7 @@ FROM px_st_abschlussziele_amtstat_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_abschlussziele_lokal" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_lokal.unl" >
<unload-job id="px_st_abschlussziele_lokal_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_abschlussziele_lokal.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -47,7 +41,7 @@ FROM px_st_abschlussziele_lokal_v @@ -47,7 +41,7 @@ FROM px_st_abschlussziele_lokal_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_fachsemester" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fachsemester.unl" >
<unload-job id="px_st_fachsemester_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fachsemester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -62,7 +56,7 @@ FROM px_st_fachsemester_v @@ -62,7 +56,7 @@ FROM px_st_fachsemester_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_fakultaeten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fakultaeten.unl" >
<unload-job id="px_st_fakultaeten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_fakultaeten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -81,7 +75,7 @@ FROM px_st_fakultaeten_v @@ -81,7 +75,7 @@ FROM px_st_fakultaeten_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_hauptstudien" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hauptstudien.unl" >
<unload-job id="px_st_hauptstudien_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hauptstudien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -95,7 +89,7 @@ FROM px_st_hauptstudien_v @@ -95,7 +89,7 @@ FROM px_st_hauptstudien_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_hoererstatus" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hoererstatus.unl" >
<unload-job id="px_st_hoererstatus_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_hoererstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -110,7 +104,7 @@ FROM px_st_hoererstatus_v @@ -110,7 +104,7 @@ FROM px_st_hoererstatus_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_laender" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_laender.unl" >
<unload-job id="px_st_laender_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_laender.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -122,7 +116,7 @@ SELECT st_land_nr, @@ -122,7 +116,7 @@ SELECT st_land_nr,
statistik_code,
adresse,
hzb,
staatsbuergerschaft
null as staatsbuergerschaft
FROM px_st_laender_v
;
@ -130,7 +124,7 @@ FROM px_st_laender_v @@ -130,7 +124,7 @@ FROM px_st_laender_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_land_regionen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_land_regionen.unl" >
<unload-job id="px_st_land_regionen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_land_regionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -163,7 +157,7 @@ FROM px_st_personen_v @@ -163,7 +157,7 @@ FROM px_st_personen_v
</extraction-sql>
</unload-job>-->
<unload-job id="costage_st_semester" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_semester.unl" >
<unload-job id="px_st_semester_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_semester.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -179,7 +173,7 @@ FROM px_st_semester_v @@ -179,7 +173,7 @@ FROM px_st_semester_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studien" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien.unl" >
<unload-job id="px_st_studien_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -195,7 +189,7 @@ FROM px_st_studien_v @@ -195,7 +189,7 @@ FROM px_st_studien_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studien_spoversionen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien_spoversionen.unl" >
<unload-job id="px_st_studien_spoversionen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studien_spoversionen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -214,7 +208,7 @@ FROM px_st_studien_spoversionen_v @@ -214,7 +208,7 @@ FROM px_st_studien_spoversionen_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienarten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienarten.unl" >
<unload-job id="px_st_studienarten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienarten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -228,7 +222,7 @@ FROM px_st_studienarten_v @@ -228,7 +222,7 @@ FROM px_st_studienarten_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienfaecher" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienfaecher.unl" >
<unload-job id="px_st_studienfaecher_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienfaecher.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -243,7 +237,7 @@ FROM px_st_studienfaecher_v @@ -243,7 +237,7 @@ FROM px_st_studienfaecher_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studiengaenge" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge.unl" >
<unload-job id="px_st_studiengaenge_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -266,7 +260,7 @@ FROM px_st_studiengaenge_v @@ -266,7 +260,7 @@ FROM px_st_studiengaenge_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studiengaenge_mtsg" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge_mtsg.unl" >
<unload-job id="px_st_studiengaenge_mtsg_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studiengaenge_mtsg.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -280,7 +274,7 @@ FROM px_st_studiengaenge_mtsg_v @@ -280,7 +274,7 @@ FROM px_st_studiengaenge_mtsg_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienkennzahlen" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienkennzahlen.unl" >
<unload-job id="px_st_studienkennzahlen_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienkennzahlen.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -298,7 +292,7 @@ FROM px_st_studienkennzahlen_v @@ -298,7 +292,7 @@ FROM px_st_studienkennzahlen_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studienstatus" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienstatus.unl" >
<unload-job id="px_st_studienstatus_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studienstatus.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[
@ -315,7 +309,7 @@ FROM px_st_studienstatus_v @@ -315,7 +309,7 @@ FROM px_st_studienstatus_v
</extraction-sql>
</unload-job>
<unload-job id="costage_st_studierendenstammdaten" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studierendenstammdaten.unl" >
<unload-job id="px_st_studierendenstammdaten_v" extraction-table="" extraction-script="" transfer-unload-file="unl/costage_st_studierendenstammdaten.unl" >
<comment> </comment>
<extraction-sql sourcesystem="co" database="" version="">
<![CDATA[

40
src-modules/module/costage/rohdaten/csv_unloads2unl.sql

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
--Freemarker Template
<#assign files = [
{"srcfile":"px_st_abschlussziele_amtstat_v.csv", "targettable":"costage_st_abschlussziele_amtstat", "targetfile":"costage_st_abschlussziele_amtstat.unl"},
{"srcfile":"px_st_abschlussziele_lokal_v.csv", "targettable":"costage_st_abschlussziele_lokal", "targetfile":"costage_st_abschlussziele_lokal.unl"},
{"srcfile":"px_st_fachsemester_v.csv", "targettable":"costage_st_fachsemester", "targetfile":"costage_st_fachsemester.unl"},
{"srcfile":"px_st_fakultaeten_v.csv", "targettable":"costage_st_fakultaeten", "targetfile":"costage_st_fakultaeten.unl"},
{"srcfile":"px_st_hauptstudien_v.csv", "targettable":"costage_st_hauptstudien", "targetfile":"costage_st_hauptstudien.unl"},
{"srcfile":"px_st_hoererstatus_v.csv", "targettable":"costage_st_hoererstatus", "targetfile":"costage_st_hoererstatus.unl"},
{"srcfile":"px_st_laender_v.csv", "targettable":"costage_st_laender", "targetfile":"costage_st_laender.unl"},
{"srcfile":"px_st_land_regionen_v.csv", "targettable":"costage_st_land_regionen", "targetfile":"costage_st_land_regionen.unl"},
{"srcfile":"px_st_semester_v.csv", "targettable":"costage_st_semester_neu", "targetfile":"costage_st_semester.unl"},
{"srcfile":"px_st_studienarten_v.csv", "targettable":"costage_st_studienarten", "targetfile":"costage_st_studienarten.unl"},
{"srcfile":"px_st_studienfaecher_v.csv", "targettable":"costage_st_studienfaecher", "targetfile":"costage_st_studienfaecher.unl"},
{"srcfile":"px_st_studiengaenge_mtsg_v.csv", "targettable":"costage_st_studiengaenge_mtsg", "targetfile":"costage_st_studiengaenge_mtsg.unl"},
{"srcfile":"px_st_studiengaenge_v.csv", "targettable":"costage_st_studiengaenge_neu", "targetfile":"costage_st_studiengaenge.unl"},
{"srcfile":"px_st_studienkennzahlen_v.csv", "targettable":"costage_st_studienkennzahlen", "targetfile":"costage_st_studienkennzahlen.unl", "specialrule":"delete from costage_st_studienkennzahlen where unikey != '8140'"},
{"srcfile":"px_st_studienstatus_v.csv", "targettable":"costage_st_studienstatus", "targetfile":"costage_st_studienstatus.unl"},
{"srcfile":"px_st_studien_spoversionen_v.csv", "targettable":"costage_st_studien_spoversionen", "targetfile":"costage_st_studien_spoversionen.unl"},
{"srcfile":"px_st_studien_v.csv", "targettable":"costage_st_studien", "targetfile":"costage_st_studien.unl"},
{"srcfile":"px_st_studierendenstammdaten_v.csv", "targettable":"costage_st_studierendenstammdaten_neu", "targetfile":"costage_st_studierendenstammdaten.unl", "specialrule":"update costage_st_studierendenstammdaten_neu set aufnahmedatum=now() where st_studstamm_nr=419856"}
] />
<#foreach file in files>
truncate table ${file.targettable};
vacuum full ${file.targettable};
\copy ${file.targettable} from 'unl/${file.srcfile}' with delimiter ',' quote '"' null as '' csv header encoding 'LATIN-1'
<#if file.specialrule?exists>
${file.specialrule};
</#if>
\! sx_unload_table.x ${file.targettable} unl/${file.targetfile}
</#foreach>

12
src-modules/module/costage/rohdaten/db-co.properties.sam

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
#SuperX DB.properties for CO
driverName=oracle.jdbc.OracleDriver
maxIdle=
logLevelXML=FINEST
maxActive=
connectionName=CO_INTERFACE_PX_SUPERX
minIdle=5
logLevelSQL=FINEST
connectionURL=jdbc\:oracle\:thin\:@192.168.0.11\:1521\:coprod
developmentMode=true
connectionPassword=sx_des\#-1\#108\#-75\#72\#-110\#-117\#-34\#-94\#116\#120\#-97\#-28\#-54\#-55\#11\#8

375
src-modules/module/costage/rohdaten/sos_costage_unload.x

@ -0,0 +1,375 @@ @@ -0,0 +1,375 @@
#!/bin/bash
#Extraction Script for SuperX.
#Bitte nicht ändern, diese Datei ist automatisch generiert.
SRC_PFAD=$SOS_LOAD_PFAD
. $SUPERX_DIR/db/bin/SQL_ENV
if [ "$SRC_PFAD" = "" ]
then
SRC_PFAD=.
fi
SX_CLIENT=jdbc
export SX_CLIENT
SOURCESYSTEM=co
export SOURCESYSTEM
if [ "$outFormat" = "" ]
then
outFormat=txt
fi
DATUM=`cat $SRC_PFAD/superx.datum`
ERR=sos_unload.err
cp $SRC_PFAD/superx.datum $SRC_PFAD/superx.datum.alt
##Löschen der alten Dateien
rm $SRC_PFAD/unl/*unl >/dev/null 2>&1
date +'%d.%m.%Y' > $SRC_PFAD/superx.datum ##neues Entladedatum
HEUTE=`date +'%d.%m.%Y'`
echo "Letztes Update-Datum: " $DATUM >$ERR
echo "DATABASE: $DATABASE" >>$ERR
echo "VERSION: $VERSION" >>$ERR
echo "SX_CLIENT: $SX_CLIENT" >>$ERR
echo "1.2b^"$HEUTE"^" >$SRC_PFAD/unl/superx_unload_version.unl
cd $SRC_PFAD >>$ERR 2>&1
CP=".:$JDBC_CLASSPATH:$XML_CLASSPATH"
cat /dev/null >unload_params.txt
if [ "$SOS_UNL_COMPLETE" = "" ]
then
SOS_UNL_COMPLETE="true"
export SOS_UNL_COMPLETE
fi
echo "Parameter SOS_UNL_COMPLETE: $SOS_UNL_COMPLETE" >>$ERR
echo "\$SOS_UNL_COMPLETE=$SOS_UNL_COMPLETE" >>unload_params.txt
if [ "$VERSION" = "" ]
then
VERSION="13"
export VERSION
fi
echo "Parameter VERSION: $VERSION" >>$ERR
echo "\$VERSION=$VERSION" >>unload_params.txt
if [ "$start_stud_sem" = "" ]
then
start_stud_sem="19911"
export start_stud_sem
fi
echo "Parameter start_stud_sem: $start_stud_sem" >>$ERR
echo "\$start_stud_sem=$start_stud_sem" >>unload_params.txt
if [ "$start_pruef_sem" = "" ]
then
start_pruef_sem="19911"
export start_pruef_sem
fi
echo "Parameter start_pruef_sem: $start_pruef_sem" >>$ERR
echo "\$start_pruef_sem=$start_pruef_sem" >>unload_params.txt
if [ "$SOS_UNL_ANON" = "" ]
then
SOS_UNL_ANON="false"
export SOS_UNL_ANON
fi
echo "Parameter SOS_UNL_ANON: $SOS_UNL_ANON" >>$ERR
echo "\$SOS_UNL_ANON=$SOS_UNL_ANON" >>unload_params.txt
if [ "$POS_PNR" = "" ]
then
POS_PNR="0"
export POS_PNR
fi
echo "Parameter POS_PNR: $POS_PNR" >>$ERR
echo "\$POS_PNR=$POS_PNR" >>unload_params.txt
if [ "$LAB_FILTER" = "" ]
then
LAB_FILTER=" AND (lab.panerk is null or lab.panerk != 'J') "
export LAB_FILTER
fi
echo "Parameter LAB_FILTER: $LAB_FILTER" >>$ERR
echo "\$LAB_FILTER=$LAB_FILTER" >>unload_params.txt
if [ "$STUDENT_FILTER" = "" ]
then
STUDENT_FILTER=" AND 1=1 "
export STUDENT_FILTER
fi
echo "Parameter STUDENT_FILTER: $STUDENT_FILTER" >>$ERR
echo "\$STUDENT_FILTER=$STUDENT_FILTER" >>unload_params.txt
if [ "$STUDENT_SOSPOS_FILTER" = "" ]
then
STUDENT_SOSPOS_FILTER=" AND 1=1 "
export STUDENT_SOSPOS_FILTER
fi
echo "Parameter STUDENT_SOSPOS_FILTER: $STUDENT_SOSPOS_FILTER" >>$ERR
echo "\$STUDENT_SOSPOS_FILTER=$STUDENT_SOSPOS_FILTER" >>unload_params.txt
if [ "$DATUM" = "" ]
then
DATUM="01.01.1900"
export DATUM
fi
echo "Parameter DATUM: $DATUM" >>$ERR
echo "\$DATUM=$DATUM" >>unload_params.txt
if [ "$STUD_IDENT" = "" ]
then
STUD_IDENT="false"
export STUD_IDENT
fi
echo "Parameter STUD_IDENT: $STUD_IDENT" >>$ERR
echo "\$STUD_IDENT=$STUD_IDENT" >>unload_params.txt
if [ "$PRUEFER_NAME" = "" ]
then
PRUEFER_NAME="false"
export PRUEFER_NAME
fi
echo "Parameter PRUEFER_NAME: $PRUEFER_NAME" >>$ERR
echo "\$PRUEFER_NAME=$PRUEFER_NAME" >>unload_params.txt
if [ "$DIPL_THEMA" = "" ]
then
DIPL_THEMA="false"
export DIPL_THEMA
fi
echo "Parameter DIPL_THEMA: $DIPL_THEMA" >>$ERR
echo "\$DIPL_THEMA=$DIPL_THEMA" >>unload_params.txt
if [ "$PERSONATTRIBUTE_IDS" = "" ]
then
PERSONATTRIBUTE_IDS="0"
export PERSONATTRIBUTE_IDS
fi
echo "Parameter PERSONATTRIBUTE_IDS: $PERSONATTRIBUTE_IDS" >>$ERR
echo "\$PERSONATTRIBUTE_IDS=$PERSONATTRIBUTE_IDS" >>unload_params.txt
if [ "$stu_prot_maxid" = "" ]
then
stu_prot_maxid="0"
export stu_prot_maxid
fi
echo "Parameter stu_prot_maxid: $stu_prot_maxid" >>$ERR
echo "\$stu_prot_maxid=$stu_prot_maxid" >>unload_params.txt
if [ "$stu_updated_at" = "" ]
then
stu_updated_at="1900-01-01"
export stu_updated_at
fi
echo "Parameter stu_updated_at: $stu_updated_at" >>$ERR
echo "\$stu_updated_at=$stu_updated_at" >>unload_params.txt
if [ "$exa_prot_maxid" = "" ]
then
exa_prot_maxid="0"
export exa_prot_maxid
fi
echo "Parameter exa_prot_maxid: $exa_prot_maxid" >>$ERR
echo "\$exa_prot_maxid=$exa_prot_maxid" >>unload_params.txt
if [ "$exa_updated_at" = "" ]
then
exa_updated_at="1900-01-01"
export exa_updated_at
fi
echo "Parameter exa_updated_at: $exa_updated_at" >>$ERR
echo "\$exa_updated_at=$exa_updated_at" >>unload_params.txt
if [ "$sos_pord_pltxt1" = "" ]
then
sos_pord_pltxt1="null::char(1)"
export sos_pord_pltxt1
fi
echo "Parameter sos_pord_pltxt1: $sos_pord_pltxt1" >>$ERR
echo "\$sos_pord_pltxt1=$sos_pord_pltxt1" >>unload_params.txt
if [ "$sos_pord_pltxt2" = "" ]
then
sos_pord_pltxt2="null::char(1)"
export sos_pord_pltxt2
fi
echo "Parameter sos_pord_pltxt2: $sos_pord_pltxt2" >>$ERR
echo "\$sos_pord_pltxt2=$sos_pord_pltxt2" >>unload_params.txt
if [ "$sos_pord_pltxt3" = "" ]
then
sos_pord_pltxt3="null::char(1)"
export sos_pord_pltxt3
fi
echo "Parameter sos_pord_pltxt3: $sos_pord_pltxt3" >>$ERR
echo "\$sos_pord_pltxt3=$sos_pord_pltxt3" >>unload_params.txt
if [ "$sos_pord_pltxt4" = "" ]
then
sos_pord_pltxt4="null::char(1)"
export sos_pord_pltxt4
fi
echo "Parameter sos_pord_pltxt4: $sos_pord_pltxt4" >>$ERR
echo "\$sos_pord_pltxt4=$sos_pord_pltxt4" >>unload_params.txt
if [ "$SOURCESYSTEM" = "" ]
then
SOURCESYSTEM="hisinone"
export SOURCESYSTEM
fi
echo "Parameter SOURCESYSTEM: $SOURCESYSTEM" >>$ERR
echo "\$SOURCESYSTEM=$SOURCESYSTEM" >>unload_params.txt
#jdbc zum Entladen
if [ "$SX_CLIENT" = "jdbc" ]
then
java $JAVA_OPTS -cp $CP de.superx.bin.SxExtractor -logger:$LOGGER_PROPERTIES -dbproperties:$DB_PROPERTIES -xml:sos_costage_unload.xml -outFormat:$outFormat -delim:$DBDELIMITER -header:$header -database:$DATABASE -version:$VERSION -unload_params:unload_params.txt >>$ERR 2>&1
exit 0
fi
#Nachbearbeitung der unl-Dateien:
#Zumächst maskierte "\ " entfernen, Postgres kommt damit nicht klar
sed '/\\ /s///g' unl/konstanten.unl >tmp.unl
mv tmp.unl unl/konstanten.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_studenten.unl >tmp.unl
mv tmp.unl unl/sos_studenten.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_hzb.unl >tmp.unl
mv tmp.unl unl/sos_hzb.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_faecher.unl >tmp.unl
mv tmp.unl unl/sos_faecher.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pord_to_stg.unl >tmp.unl
mv tmp.unl unl/sos_pord_to_stg.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pruefungenext.unl >tmp.unl
mv tmp.unl unl/sos_pruefungenext.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pruefungen.unl >tmp.unl
mv tmp.unl unl/sos_pruefungen.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_lab_astat_attributes.unl >tmp.unl
mv tmp.unl unl/sos_lab_astat_attributes.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_stud_loe.unl >tmp.unl
mv tmp.unl unl/sos_stud_loe.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_faecher_ext.unl >tmp.unl
mv tmp.unl unl/sos_faecher_ext.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_faecher_kontrolle.unl >tmp.unl
mv tmp.unl unl/sos_faecher_kontrolle.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pruefungen_kontrolle.unl >tmp.unl
mv tmp.unl unl/sos_pruefungen_kontrolle.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_anschri.unl >tmp.unl
mv tmp.unl unl/sos_anschri.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_parstg.unl >tmp.unl
mv tmp.unl unl/sos_parstg.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_hsnr.unl >tmp.unl
mv tmp.unl unl/sos_hsnr.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/semester.unl >tmp.unl
mv tmp.unl unl/semester.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/cif.unl >tmp.unl
mv tmp.unl unl/cif.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/cifx.unl >tmp.unl
mv tmp.unl unl/cifx.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/k_pvers.unl >tmp.unl
mv tmp.unl unl/k_pvers.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/k_stg.unl >tmp.unl
mv tmp.unl unl/k_stg.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/k_stgext.unl >tmp.unl
mv tmp.unl unl/k_stgext.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/k_abstgv.unl >tmp.unl
mv tmp.unl unl/k_abstgv.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pord.unl >tmp.unl
mv tmp.unl unl/sos_pord.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_dipl.unl >tmp.unl
mv tmp.unl unl/sos_dipl.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_minder.unl >tmp.unl
mv tmp.unl unl/sos_minder.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_stud_d.unl >tmp.unl
mv tmp.unl unl/sos_stud_d.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pords.unl >tmp.unl
mv tmp.unl unl/sos_pords.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_porg.unl >tmp.unl
mv tmp.unl unl/sos_porg.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_labzuord.unl >tmp.unl
mv tmp.unl unl/sos_labzuord.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pnrzuord.unl >tmp.unl
mv tmp.unl unl/sos_pnrzuord.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_gewichtungsvariante.unl >tmp.unl
mv tmp.unl unl/sos_gewichtungsvariante.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_gewichtungregel_filter.unl >tmp.unl
mv tmp.unl unl/sos_gewichtungregel_filter.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_gewichtungregel.unl >tmp.unl
mv tmp.unl unl/sos_gewichtungregel.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/personattribute.unl >tmp.unl
mv tmp.unl unl/personattribute.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/personattributetype.unl >tmp.unl
mv tmp.unl unl/personattributetype.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/personattribute_value_list.unl >tmp.unl
mv tmp.unl unl/personattribute_value_list.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/stu_update_prot.unl >tmp.unl
mv tmp.unl unl/stu_update_prot.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/exa_update_prot.unl >tmp.unl
mv tmp.unl unl/exa_update_prot.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_accredited_ects.unl >tmp.unl
mv tmp.unl unl/sos_accredited_ects.unl >>$ERR 2>&1
sed '/\\ /s///g' unl/sos_pord_orgeinheit.unl >tmp.unl
mv tmp.unl unl/sos_pord_orgeinheit.unl >>$ERR 2>&1
chmod go+r $ERR
chmod go+r $SRC_PFAD/superx.datum
chmod go+r $SRC_PFAD/superx.datum.alt
chmod go+w $SRC_PFAD/superx.datum
chmod go+w $SRC_PFAD/superx.datum.alt
chmod go+r $SRC_PFAD/unl/*
##Herstellen altes Entladedatum bei Fehler
fgrep -s "not found" $ERR >/dev/null
FLAG1=$?
fgrep -i -s "nicht gefunden" $ERR >/dev/null
FLAG2=$?
fgrep -i -s "error" $ERR >/dev/null
FLAG3=$? >/dev/null
fgrep -i -s "exception" $ERR >/dev/null
FLAG4=$? >/dev/null
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 -o $FLAG4 -eq 0 ]
then
echo "Fehler beim Entladen. Das Datum wird zurückgesetzt."
echo "---------------------------------------"
echo "Prüfen Sie Fehlerprotokoll: $ERR"
echo "---------------------------------------"
cp $SRC_PFAD/superx.datum.alt $SRC_PFAD/superx.datum
fi

0
src-modules/module/sos/rohdaten/sos_costage_unload.xml → src-modules/module/costage/rohdaten/sos_costage_unload.xml

7685
src-modules/module/costage/rohdaten/sos_unload_graz_2019.xml

File diff suppressed because it is too large Load Diff

1
src-modules/module/costage/rohdaten/superx.datum

@ -0,0 +1 @@ @@ -0,0 +1 @@
29.08.2016

15199
src-modules/module/sos/rohdaten/sos_costage_unload.x

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save