|
|
|
/* COPYRIGHT JÜRGEN REULE 2010-2023 */ |
|
|
|
|
|
|
|
|
PGM |
PARM(&B) |
|
|
|
|
|
|
|
|
DCL |
VAR(&B) TYPE(*CHAR) LEN(2) |
|
|
|
DCL |
VAR(&P) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&T) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&CMD) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&SRC) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&JAVA) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&IMAGE) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&IFRAME) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&RESIZE) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&RESIZE2) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&STERNE) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&STERNE2) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&SPARKLE) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&SPARKLE2) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&SPARKLEX) TYPE(*CHAR) LEN(5000) |
|
|
|
DCL |
VAR(&FILE) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&SAVE) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&LIB) TYPE(*CHAR) LEN(10) |
|
|
|
DCL |
VAR(&CODPAG) TYPE(*CHAR) LEN(5) |
|
|
|
DCL |
VAR(&INDEX) TYPE(*CHAR) LEN(5) |
|
|
|
DCL |
VAR(&INDEXNUM) TYPE(*DEC) LEN(5) |
|
|
|
|
|
|
|
|
MONMSG |
MSGID(CPFA0A0) |
|
|
|
MONMSG |
MSGID(CPFA0A9) |
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(GOTO CMDLBL(ERROR)) |
|
|
|
|
|
|
|
|
/* |
------------ + |
|
|
|
Werte setzen + |
|
|
|
------------ */ |
|
|
|
CHGVAR |
VAR(&FILE) VALUE(SOURCE) |
|
|
|
CHGVAR |
VAR(&SAVE) VALUE(SOURCE#SAV) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&CODPAG) VALUE('819') |
|
|
|
|
|
|
|
|
/* |
----------------------------- + |
|
|
|
Aktuelle Bibliothek ermitteln + |
|
|
|
----------------------------- */ |
|
|
|
RTVJOBA |
CURLIB(&LIB) |
|
|
|
|
|
|
|
|
/* |
---------------------- + |
|
|
|
Quellendatei ermitteln + |
|
|
|
---------------------- */ |
|
|
|
CHGVAR |
VAR(&SRC) VALUE('/QSYS.LIB/' *TCAT + |
|
|
|
|
&LIB *TCAT '.LIB/' *TCAT + |
|
|
|
|
&FILE *TCAT '.FILE/') |
|
|
|
/* |
------- + |
|
|
|
Auswahl + |
|
|
|
------- */ |
|
|
|
IF |
COND(&B *EQ B + |
|
|
|
|
*OR &B *EQ BA) THEN(DO) |
|
|
|
|
|
|
|
|
/* |
--------------------------- + |
|
|
|
Bilderverzeichnis erstellen + |
|
|
|
--------------------------- */ |
|
|
BAR$: |
CRTBNDDIR |
BNDDIR(&LIB/BAR$) TEXT('Bar') |
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(GOTO + |
|
|
|
|
CMDLBL(TN5250S)) |
|
|
|
ADDBNDDIRE |
BNDDIR(&LIB/BAR$) + |
|
|
|
OBJ((QHTTPSVR/QZHBCGI *SRVPGM)) |
|
|
|
|
|
|
|
|
/* |
--------------------------- + |
|
|
|
Bilderverzeichnis erstellen + |
|
|
|
--------------------------- */ |
|
|
TN5250S: |
CRTBNDDIR |
BNDDIR(&LIB/TN5250S) TEXT('TN5250S') |
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(GOTO + |
|
|
|
|
CMDLBL(MAILS)) |
|
|
|
ADDBNDDIRE |
BNDDIR(&LIB/TN5250S) + |
|
|
|
OBJ((QHTTPSVR/QZHBCGI *SRVPGM)) |
|
|
|
|
|
|
|
|
/* |
----------------------------- + |
|
|
|
E-Mail-Quellendatei erstellen + |
|
|
|
----------------------------- */ |
|
|
MAILS: |
CRTSRCPF |
FILE(MAILS) RCDLEN(92) MBR(*FILE) |
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
/* |
---------------------------- + |
|
|
|
Datenwarteschlange erstellen + |
|
|
|
---------------------------- */ |
|
|
|
CRTDTAQ |
DTAQ(ANFRAGEQ) MAXLEN(1500) + |
|
|
|
|
SIZE(*MAX2GB) AUTORCL(*YES) |
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(RCVMSG + |
|
|
|
|
MSGTYPE(*LAST) + |
|
|
|
|
WAIT(0) RMV(*YES)) |
|
|
|
/* |
------- + |
|
|
|
Auswahl + |
|
|
|
------- */ |
|
|
|
IF |
COND(&B *EQ BA) THEN(DO) |
|
|
|
|
|
|
|
|
/* |
---------------------------- + |
|
|
|
Maximale Anzahl Sätze setzen + |
|
|
|
---------------------------- */ |
|
|
|
ALCOBJ |
OBJ((ANFRAGEP *FILE *EXCLRD)) WAIT(0) |
|
|
|
MONMSG |
MSGID(CPF0000) EXEC(GOTO CMDLBL(CMDS)) |
|
|
|
OVRDBF |
FILE(ANFRAGEP) WAITFILE(*IMMED) |
|
|
|
CHGPF |
FILE(ANFRAGEP) SIZE(*NOMAX) |
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
DLTOVR |
FILE(ANFRAGEP) |
|
|
|
DLCOBJ |
OBJ((ANFRAGEP *FILE *EXCLRD)) |
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
/* |
----------------- + |
|
|
|
Objekte erstellen + |
|
|
|
----------------- */ |
|
|
CMDS: |
CRTCMD |
CMD(MAIL) + |
|
|
|
|
PGM(MAIL) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(MAILCMD) |
|
|
|
CRTCMD |
CMD(IMAGE) + |
|
|
|
|
PGM(IMAGE) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(IMAGECMD) |
|
|
|
CRTCMD |
CMD(IMAGEX) + |
|
|
|
|
PGM(IMAGEX) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(IMAGEXCMD) |
|
|
|
CRTCMD |
CMD(TN5250) + |
|
|
|
|
PGM(TN5250) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(TN5250CMD) |
|
|
|
CRTCMD |
CMD(TN5250S) + |
|
|
|
|
PGM(TN5250S) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(TN5250SCMD) |
|
|
|
CRTCMD |
CMD(ANFRAGE) + |
|
|
|
|
PGM(ANFRAGE) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(ANFRAGECMD) |
|
|
|
CRTCMD |
CMD(ANFRAGEN) + |
|
|
|
|
PGM(ANFRAGEN) |
SRCFILE(&LIB/&FILE) + |
|
|
|
SRCMBR(ANFRAGENCM) |
|
|
|
|
|
|
|
|
/* |
----------------- + |
|
|
|
Objekte erstellen + |
|
|
|
----------------- */ |
|
|
|
CRTBNDRPG |
PGM(UTF8) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(MAIL) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(MAILS) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(HTTPX) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(IMAGE) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(IMAGEX) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(TN5250) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(TN5250S) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(ENVVARS) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(KAMERAS) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(SRCINFO) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(SYSINFO) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(ANFRAGE) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(ANFRAGEN) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(HTTPDATE) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(BESUCHER) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(BESUCHERQ) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(IFS$FILE) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(IFS$SEND) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(IFS$STAT) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(IFS$EXIST) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(IFS$WRITE) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(TN5250SEC) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDRPG |
PGM(MULTIPART) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(STATISTIK) |
SRCFILE(&LIB/&FILE) |
|
|
|
CRTBNDCL |
PGM(STATISTIK2) |
SRCFILE(&LIB/&FILE) |
|
|
|
ENDDO |
|
|
|
|
CRTBNDRPG |
PGM(BAR$) |
SRCFILE(&LIB/&FILE) |
|
|
|
ENDDO |
|
|
|
|
/* |
------- + |
|
|
|
Auswahl + |
|
|
|
------- */ |
|
|
|
IF |
COND(&B *EQ BJ + |
|
|
|
|
*OR &B *EQ BA) THEN(DO) |
|
|
|
|
|
|
|
|
/* |
----------- + |
|
|
|
Job beenden + |
|
|
|
----------- */ |
|
|
|
ENDJOB |
JOB(ANFRAGE) OPTION(*CNTRLD) DELAY(300) + |
|
|
|
|
DUPJOBOPT(*MSG) |
|
|
|
MONMSG |
MSGID(CPF0000) |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Pfade setzen und anlegen + |
|
|
|
------------------------ */ |
|
|
|
CHGVAR |
VAR(&JAVA) + |
|
|
|
|
VALUE('/home/AIBOBAR/java/') |
|
|
|
|
|
|
|
|
MKDIR |
DIR(&JAVA) |
|
|
|
|
|
|
|
|
/* |
------------------ + |
|
|
|
Objektnamen setzen + |
|
|
|
------------------ */ |
|
|
|
CHGVAR |
VAR(&IMAGE) + |
|
|
|
|
VALUE(&JAVA *TCAT 'Minibild.java') |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Quellen ins IFS kopieren + |
|
|
|
------------------------ */ |
|
|
|
CPYTOSTMF |
FROMMBR(&SRC *TCAT 'IMAGEJ.MBR') + |
|
|
|
|
TOSTMF(&IMAGE) STMFOPT(*REPLACE) + |
|
|
|
|
ENDLINFMT(*LF) STMFCODPAG(&CODPAG) |
|
|
|
|
|
|
|
|
/* |
---------------------------- + |
|
|
|
Berechtigungen im IFS setzen + |
|
|
|
---------------------------- */ |
|
|
|
CHGAUT |
OBJ(&IMAGE) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
|
|
|
|
|
/* |
---------------------- + |
|
|
|
Java-Klassen erstellen + |
|
|
|
---------------------- */ |
|
|
|
CHGVAR |
VAR(&CMD) + |
|
|
|
|
VALUE('javac -d' *BCAT &JAVA + |
|
|
|
|
*BCAT &IMAGE) |
|
|
|
QSH |
CMD(&CMD) |
|
|
|
|
|
|
|
|
ENDDO |
|
|
|
|
/* |
------- + |
|
|
|
Auswahl + |
|
|
|
------- */ |
|
|
|
IF |
COND(&B *EQ B2 + |
|
|
|
|
*OR &B *EQ BA) THEN(DO) |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Pfade setzen und anlegen + |
|
|
|
------------------------ */ |
|
|
|
CHGVAR |
VAR(&P) + |
|
|
|
|
VALUE('/home/AIBOBAR/www/') |
|
|
|
|
|
|
|
|
MKDIR |
DIR(&P) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&T) + |
|
|
|
|
VALUE('/home/AIBOBAR/test/') |
|
|
|
|
|
|
|
|
MKDIR |
DIR(&T) |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Pfade setzen und anlegen + |
|
|
|
------------------------ */ |
|
|
|
CHGVAR |
VAR(&P) + |
|
|
|
|
VALUE('/home/AIBOBAR/www/objekt/') |
|
|
|
|
|
|
|
|
MKDIR |
DIR(&P) |
|
|
|
|
|
|
|
|
CHGVAR |
VAR(&T) + |
|
|
|
|
VALUE('/home/AIBOBAR/test/objekt/') |
|
|
|
|
|
|
|
|
MKDIR |
DIR(&T) |
|
|
|
|
|
|
|
|
/* |
------------------ + |
|
|
|
Objektnamen setzen + |
|
|
|
------------------ */ |
|
|
|
CHGVAR |
VAR(&IFRAME) VALUE(&P *TCAT 'iframe.js') |
|
|
|
CHGVAR |
VAR(&RESIZE) VALUE(&P *TCAT 'resize.js') |
|
|
|
CHGVAR |
VAR(&RESIZE2) VALUE(&P *TCAT 'resize.gif') |
|
|
|
CHGVAR |
VAR(&STERNE) VALUE(&P *TCAT 'sterne.js') |
|
|
|
CHGVAR |
VAR(&STERNE2) VALUE(&P *TCAT 'sterne.gif') |
|
|
|
CHGVAR |
VAR(&SPARKLE) VALUE(&P *TCAT 'sparkle.js') |
|
|
|
CHGVAR |
VAR(&SPARKLE2) VALUE(&P *TCAT 'sparkle.gif') |
|
|
|
|
|
|
|
|
/* |
------------------------ + |
|
|
|
Quellen ins IFS kopieren + |
|
|
|
------------------------ */ |
|
|
|
CPYTOSTMF |
FROMMBR(&SRC *TCAT 'JS$IFRAME.MBR') + |
|
|
|
|
TOSTMF(&IFRAME) STMFOPT(*REPLACE) + |
|
|
|
|
ENDLINFMT(*LF) STMFCODPAG(&CODPAG) |
|
|
|
|
|
|
|
|
CPYTOSTMF |
FROMMBR(&SRC *TCAT 'JS$RESIZE.MBR') + |
|
|
|
|
TOSTMF(&RESIZE) STMFOPT(*REPLACE) + |
|
|
|
|
ENDLINFMT(*LF) STMFCODPAG(&CODPAG) |
|
|
|
|
|
|
|
|
CPYTOSTMF |
FROMMBR(&SRC *TCAT 'JS$STERNE.MBR') + |
|
|
|
|
TOSTMF(&STERNE) STMFOPT(*REPLACE) + |
|
|
|
|
ENDLINFMT(*LF) STMFCODPAG(&CODPAG) |
|
|
|
|
|
|
|
|
CPYTOSTMF |
FROMMBR(&SRC *TCAT 'JS$SPARKLE.MBR') + |
|
|
|
|
TOSTMF(&SPARKLE) STMFOPT(*REPLACE) + |
|
|
|
|
ENDLINFMT(*LF) STMFCODPAG(&CODPAG) |
|
|
|
|
|
|
|
|
/* |
---------------------------- + |
|
|
|
Berechtigungen im IFS setzen + |
|
|
|
---------------------------- */ |
|
|
|
CHGAUT |
OBJ(&IFRAME) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&RESIZE) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&RESIZE2) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&STERNE) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&STERNE2) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&SPARKLE) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CHGAUT |
OBJ(&SPARKLE2) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
|
|
|
|
|
/* |
----------------------- + |
|
|
|
Objekte im IFS kopieren + |
|
|
|
----------------------- */ |
|
|
|
CPY |
OBJ(&IFRAME) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&RESIZE) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&RESIZE2) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&STERNE) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&STERNE2) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&SPARKLE) TODIR(&T) REPLACE(*YES) |
|
|
|
CPY |
OBJ(&SPARKLE2) TODIR(&T) REPLACE(*YES) |
|
|
|
|
|
|
|
|
/* |
-------------------------------- + |
|
|
|
Einzelne Objekte im IFS kopieren + |
|
|
|
-------------------------------- */ |
|
|
|
CHGVAR |
VAR(&INDEXNUM) VALUE(1) |
|
|
SPARKLE: |
CHGVAR |
VAR(&INDEX) VALUE(&INDEXNUM) |
|
|
|
CHGVAR |
VAR(&INDEX) VALUE(%SST(&INDEX 5 1)) |
|
|
|
CHGVAR |
VAR(&SPARKLEX) VALUE(&P *TCAT 'sparkle' + |
|
|
|
|
*TCAT &INDEX *TCAT '.gif') |
|
|
|
CPY |
OBJ(&SPARKLE2) TOOBJ(&SPARKLEX) + |
|
|
|
|
REPLACE(*YES) |
|
|
|
CHGAUT |
OBJ(&SPARKLEX) USER(*PUBLIC) DTAAUT(*RX) |
|
|
|
CPY |
OBJ(&SPARKLEX) TODIR(&T) REPLACE(*YES) |
|
|
|
CHGVAR |
VAR(&INDEXNUM) VALUE(&INDEXNUM + 1) |
|
|
|
IF |
COND(&INDEXNUM *LE 9) + |
|
|
|
|
THEN(GOTO CMDLBL(SPARKLE)) |
|
|
|
|
|
|
|
|
ENDDO |
|
|
|
|
/* |
--------------- + |
|
|
|
Quellen sichern + |
|
|
|
--------------- */ |
|
|
|
CPYSRCF |
FROMFILE(&LIB/&FILE) TOFILE(&LIB/&SAVE) + |
|
|
|
|
FROMMBR(*ALL) TOMBR(*FROMMBR) + |
|
|
|
|
MBROPT(*REPLACE) |
|
|
|
|
|
|
|
|
IF |
COND('0') THEN(DO) |
|
|
ERROR: |
SNDPGMMSG |
MSGID(CPF9897) MSGF(QCPFMSG) + |
|
|
|
|
MSGDTA('Fehler beim Wandeln') + |
|
|
|
|
MSGTYPE(*ESCAPE) |
|
|
|
ENDDO |
|
|
|
ENDPGM: |
ENDPGM |
|
|