Präsentation herunterladen
Die Präsentation wird geladen. Bitte warten
Veröffentlicht von:Werner Durner Geändert vor über 10 Jahren
1
Web Programmierung mit CGI, ILE RPG und SQL
Andreas Prouza © Andreas Prouza 2011
2
Themen CGI Technik Installation Webserver
Aufruf von CGI (RPG) Programmen via HTTP Kommunikation Client mit RPG Programm SQL Optimierung © Andreas Prouza 2011
3
Abkürzungen CGI RPG SQL Common Gateway Interface
Report Program Generator SQL Structured Query Language © Andreas Prouza 2011
4
CGI Technik © Andreas Prouza 2011
5
Installation Webserver
/www/WebServer/conf/httpd.conf STRTCPSVR SERVER(*HTTP) HTTPSVR(*ADMIN) Mit QSECOFR oder gleichwertigen User anmelden PDF Anleitung © Andreas Prouza 2011
6
RPG Aufruf (httpd.conf)
LIB: WFM40OBJ PGM: DFMTEST © Andreas Prouza 2011
7
Kommunikation Client RPG
HTML-Buffer einlesen QtmhRdStin HTML-Buffer ausgeben QtmhWrStout Umgebungs-Variable einlesen QtmhGetEnv © Andreas Prouza 2011
8
QtmhRdStin D*===================================== D*?API StdIn DAPIStdIn C 'QtmhRdStin' DInData S 4096A INZ DInDataln S 9B 0 INZ(4096) DInActLn S 9B 0 © Andreas Prouza 2011
9
QtmhWrStout D*====================================== D*?API StdOut DAPIStdOut C 'QtmhWrStout' DOutBuff S 4096A INZ DOutBuffln S 9B 0 INZ(4096) © Andreas Prouza 2011
10
Programm-Beispiel RPG
C*================================ C** ?Buffer C ' ' checkr OutBuff in C CALLB APIStdOut C PARM OutBuff C PARM in OutBuffLn C PARM QUSEC © Andreas Prouza 2011
11
RPG Aufruf © Andreas Prouza 2011
12
RPG Aufruf 2 (LOGIN) © Andreas Prouza 2011
13
PGM-Aufruf via HTML <form action="/pgms/WFM30AX.PGM" name="login" method="POST"> © Andreas Prouza 2011
14
Programm-Beispiel RPG
C*================================ C** ?Buffer C CALLB APIStdIn C PARM ' ' INData C PARM INDataLn C PARM INActLn C PARM QUSEC © Andreas Prouza 2011
15
Webseite © Andreas Prouza 2011
16
Datenstrom Client PGM
&Feld=Wert Konvertierung von Zeichen & %50 Blank + © Andreas Prouza 2011
17
HTML-Beispiele Workflows Stammdaten Client/Server Filter
Firmenabgleich Dynamischer SQL Aufbau © Andreas Prouza 2011
18
Index Binary Radix Tree Index Logischer Baum
Encoded Vector Index (EVI) Auch Bitmap Index genannt © Andreas Prouza 2011
19
Binary Radix Tree Index
Seit 1988 Verwendung Auswahlkriterien Sortierung Summe der DS < 70 % - 80 % Entscheidung vom Optimizer © Andreas Prouza 2011
20
Binary Radix Tree Index
© Andreas Prouza 2011
21
Encoded Vector Index (EVI)
Seit 1998 (10 Jahre später) Verwendung Gruppierung Zeilenauswahl Logische Operationen (AND, OR, …) Summe der DS 20 % – 70 % Entscheidung vom Optimizer © Andreas Prouza 2011
22
Encoded Vector Index (EVI)
System Tabelle Unique-Key Statistiken Vector © Andreas Prouza 2011
23
DB2 Engine SQE (SQL Query Engine) CQE (Classic Query Engine)
Eingeführt ab V5R2 CQE (Classic Query Engine) © Andreas Prouza 2011
24
CQE © Andreas Prouza 2011
25
SQE © Andreas Prouza 2011
26
DDS vs. DDL DDL Data Definition Language
CREATE TABLE DDS Data Description Specifications © Andreas Prouza 2011
27
DDS vs. DDL DDS ist stabilisiert Keine Neuheiten
DDS ist potentielle Gefahr für SQE DDL bieten viele Möglichkeiten (Index, MQTs, UDF, SP, …) © Andreas Prouza 2011
28
Native I/O vs. SQL Native I/O (z.B. in RPG) SQL READE WRITE DELETE
UPDATE SQL SELECT * FROM TABLE © Andreas Prouza 2011
29
Native I/O Fixer Zugriffspfad Dadurch kein Overhead wie bei SQL
Direkter Datenzugriff © Andreas Prouza 2011
30
SQL Dynamischer Zugriffspfad Internationale Sprache
Immer der Optimale Internationale Sprache Anpassungen sind einfacher Plattform unabhängiger Zugriff Monitoring © Andreas Prouza 2011
31
SQL Vielfalt an Funktionen (Order By)
Mehrere Cursor für den gleichen Zugriffsplan möglich Keine Abstürze von Programmen Error Handling SQL (und SQE) wird weiter entwickelt uvm. © Andreas Prouza 2011
32
Index Advisor Vorschläge vom System Mit statistische Informationen
Art des Vorschlages (Binär, EVI) © Andreas Prouza 2011
33
Materialized Query Table
Eine Tabelle ähnlich wie ein View erstellt. Daten sind Physisch vorhanden Aktualisierung der Daten geschieht manuell © Andreas Prouza 2011
34
MQT Vorteil Nachteil Schneller Zugriff durch Aufteilung
Zusätzliche Indizes möglich Nachteil Speicherverbrauch Know-How © Andreas Prouza 2011
35
Stored Procedure (SP) SQL Prozedur Externe Prozedur
© Andreas Prouza 2011
36
User-Defined Function
Sourced UDF SQL UDF External UDF © Andreas Prouza 2011
37
Tuning des Systems Aktivierungsgruppen Indizes MQTs
DDS LF mit Select/Omit Spezifikation SQL immer auf Basistabellen Select Into Dynamisches SQL wieder verwenden In Blöcke einlesen © Andreas Prouza 2011
38
Error Handling Whenever Statement Get Diagnostic Statement
© Andreas Prouza 2011
39
Workflow-System http://tasklink.com/ TQS EDV-Software GesmbH
Tel.: +43 (2252) Fax: +43 (2252) © Andreas Prouza 2011
40
DB2 und RPG Schulungen http://www.erfolgsbildung.at/
DB2 Optimierung und Tuning ILE RPG Auf Anfrage mit 1 oder 2 Tage auch: CGI mit RPG © Andreas Prouza 2011
41
Danke! Fragen? Andreas Prouza Andreas.Prouza@tasklink.com
Ähnliche Präsentationen
© 2024 SlidePlayer.org Inc.
All rights reserved.