SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
IBM i/DB2 Modernization to SQL
CM First Group. Confidential & Do Not Distribute 2
About Your Presenter
IBM i Professional for 16 Years.
Primary Focus is IBM i Engineering / Programming
Well Versed in 2E.
Well Versed in RPG (All Flavors)
Well Versed in CM Products such as Implementer
Up to Date on Newest SQL/RPG Enhancements.
CM First Group. Confidential & Do Not Distribute 3
Agenda
What Exactly is SQL (Just in case you don’t know. )
Benefits of Moving to SQL Created Objects
SQL Performance Benefits
SQL Objects vs DDS Objects
SQL Source vs DDS Source
Changing a 2E Model to Support SQL
SQL Specific Data Types
CM First Group. Confidential & Do Not Distribute 4
What Exactly is SQL?
SQL Stands for Structured Query Language.
Developed at IBM in the Early 1970s.
Consists of a DDL (Data Definition Language)
IE, CREATE TABLE, CREATE INDEX
Consists of a DML (Data Manipulation Language)
IE, INSERT INTO, UPDATE, DELETE,
To a Large Extent Consists of Simple English
Statements.
CM First Group. Confidential & Do Not Distribute 5
Benefits of Moving to SQL Created Objects
Whole World Uses SQL. New resources are more familiar with
SQL then DDS.
Long Field Names are Available to Outside World. YAY! 
Performance (Further discussion later)
Data is Validated when Written to the Database.
DDL Defined Indexes use a 64K page size vs 8K used by Logical
Files.
Null Capable Fields.
New Data Types (Blob, Clob, Lob) Demo of this!
CM First Group. Confidential & Do Not Distribute 6
Benefits of Moving to SQL Created Objects
No Enhancements to DDS Language.
Constraints are Built into Database.
Built in Encryption.
Easier Modification of Table Layouts.
RPG Programs that Use SQL Access Don’t Need a Re-
compile.
Automatic Identity Columns.
CM First Group. Confidential & Do Not Distribute 7
SQL Performance
In DDS Data is Validated When Read. In SQL Data is
Validated When Written.
This is Important as we Normally do many more reads
vs. writes. Ratio could be as high as 25 to 1.
Data Can Arrive up to 11 Seconds Faster. Especially
Helpful When Loading up Subfiles from Random Keys.
Concurrent Write Support.
Logical Page Size of 64K.
CM First Group. Confidential & Do Not Distribute 8
SQL Performance
In DDS Data is Validated When Read. In SQL Data is
Validated When Written.
This is Important as we Normally do many more reads
vs. writes. Ratio could be as high as 25 to 1.
Data Can Arrive up to 11 Seconds Faster. Especially
Helpful When Loading up Subfiles from Random Keys.
Concurrent Write Support.
Logical Page Size of 64K.
CM First Group. Confidential & Do Not Distribute 9
SQL Objects vs DDS Objects
DDS Objects Create Physical Files & Logical Files
The Object types are *FILE PF and *FILE LF
Most common source is DDS and stored in QDDSSRC.
Source Member type is PF for Physical files, and LF for Logical Files.
Compiled like a program using option 14 from PDM, or using the CRTPF or
CRTLF commands.
SQL Objects create Physical Files & Logical Files as well.
The Object types are *FILE PF and *FILE LF
Most common source is SQL and stored in QSQLSRC.
Source Member type can be named anything.
CM First Group. Confidential & Do Not Distribute 10
SQL Objects vs DDS Objects DSPFD
CM First Group. Confidential & Do Not Distribute 11
SQL Objects vs DDS Objects DSPFD
CM First Group. Confidential & Do Not Distribute 12
SQL Source vs DDS Source
DDS Source is stored in source physical file QDDSSRC (Most Common)
Source is then compiled using CRTPF or CRTLF commands. (Option 14 in PDM)
CM First Group. Confidential & Do Not Distribute 13
SQL Source vs DDS Source
SQL Source is stored in source file QSQLSRC (Most
Common)
Source member type can be named anything.
However, common examples are
SQLT for tables, SQLV for views and SQLI for indexes.
SQL Objects are created using the RUNSQLSTM
command.
CM First Group. Confidential & Do Not Distribute 14
SQL Source vs DDS Source
Example SQL Table Source.
CM First Group. Confidential & Do Not Distribute 15
SQL Source vs DDS Source
Example SQL Table Source.
CM First Group. Confidential & Do Not Distribute 16
SQL Source vs DDS Source
Example SQL View Source.
CM First Group. Confidential & Do Not Distribute 17
SQL Source vs DDS Source
Example SQL View Source.
CM First Group. Confidential & Do Not Distribute 18
SQL Source vs DDS Source
Example SQL Index Source.
CM First Group. Confidential & Do Not Distribute 19
SQL Source vs DDS Source
Items to Note!
SQL objects are created using the RUNSQLSTM Command.
SQL View And Indexes produce separate IBM i Objects. (LFs)
No problem combining SQL Created tables and DDS Created LFs. (Common)
CM First Group. Confidential & Do Not Distribute 20
DML (Data Manipulation Language)
DML is used to manipulate the database.
Examples are,
SELECT ( to read data )
INSERT ( to insert data )
UPDATE (to update data)
DELETE (to delete data)
Big advantage is the use of the DB2 Database Engine for automatic index selection!
If an index exists that matches the search criteria then that index will be used
automatically. In standard record level access from RPG this is not the case.
SQL DML Statements can be incorporated directly into an RPG program! There is no
longer a need to use the traditional record level access provided by RPG.
CM First Group. Confidential & Do Not Distribute 21
DML (Data Manipulation Language)
Select (Statement Example)
CM First Group. Confidential & Do Not Distribute 22
DML (Data Manipulation Language)
Select (Statement Example)
CM First Group. Confidential & Do Not Distribute 23
DML (Data Manipulation Language)
INSERT (Statement Example)
CM First Group. Confidential & Do Not Distribute 24
DML (Data Manipulation Language)
UPDATE (Statement Example)
Can update multiple records at once!
CM First Group. Confidential & Do Not Distribute 25
DML (Data Manipulation Language)
DELETE (Statement Example)
Can delete multiple records at once!
CM First Group. Confidential & Do Not Distribute 26
Change Model to use SQL Support.
Several different approaches can be taken to change a model to support SQL.
You can change the model to use the 2E generated table name, but use longer
field name support. This allows you to expose the longer field names to the
outside world. No change to RPG.
You can change the model to use both the longer table name, and also the
longer field names. Again, easier for the outside world. No change to RPG.
You can change the generated function to use SQL record level access
regardless of the database type.
CM First Group. Confidential & Do Not Distribute 27
Change Model to use SQL Support.
Any change to support SQL is done though the changing of model values.
Name Description Values
YSQLVNM SQL naming *DDS
YDDLDBA Database Access Method *RLA / *SQL
YSQLLEN SQL naming length 10 to 25
YSQLOPT Generate SQL OPTIMIZE clause *NO
YSQLFMT Generate SQL RCDFMT clause *NO
YSQLSTM SQL statement generation type *EXC
YSQLCOL Generate SQL Col/Library Name *YES
YLVLCHK Generate IDX with LVLCHK(*YES) *NO
YDBFGEN Method for database file generation DDS / SQL / DDL
YSQLWHR specifies whether to use OR or NOT logic when generating SQL WHERE clauses. The default is
*OR.
YSQLLCK
CM First Group. Confidential & Do Not Distribute 28
Change Model to use SQL Support.
YSQLVNM relates to the naming scheme used for fields and files.
Values
*DDS – Uses the DDS name
*SQL – Use the names of the objects in the model.
*LNG – Use long names for fields and files
*LNF – Use long field names
*LNT – Use long table names
CM First Group. Confidential & Do Not Distribute 29
Change Model to use SQL Support.
YDDLDBA
specifies a method of accessing the database
Values
*RLA
External function generates with RLA access.
*SQL
External function generates with SQL access.
CM First Group. Confidential & Do Not Distribute 30
Change Model to use SQL Support.
YSQLLEN – The length of field names up to 25 characters.
Values
Any number between 10 and 25.
CM First Group. Confidential & Do Not Distribute 31
Change Model to use SQL Support.
YSQLFMT
Specifies whether the RCDFMT keyword must be generated for SQL tables,
views, and indexes.
Values
*YES
the RCDFMT value is calculated using the same rules as are used when
DDS files are generated.
*NO
the record format is the same as the table, index, or view name.
CM First Group. Confidential & Do Not Distribute 32
Change Model to use SQL Support.
YDBFGEN – Specifies the language used in creating the logical/view over a physical
file/table.
*DDS
*SQL
*DDL
CM First Group. Confidential & Do Not Distribute 33
Change Model to use SQL Support.
YDBFGEN – Specifies the language used in creating the logical/view over a physical
file/table.
*DDS
*SQL
*DDL
CM First Group. Confidential & Do Not Distribute 34
Change existing table to SQL.
Generating SQL files
Extended Names?
Generating SQL Functions?
Generating RLA Functions over SQL Files
CM First Group. Confidential & Do Not Distribute 35
Change existing table to SQL.
There are options to consider when modernizing a file
name to SQL in 2E.
Keep the file and field names the same.
Keep the file name the same, give the fields enhanced
names.
Change the file and fields to enhanced names.
CM First Group. Confidential & Do Not Distribute 36
SQL Record access in Functions
Functions can be changed through model values, or one at a
time to SQL access by the use of function options.
CM First Group. Confidential & Do Not Distribute 37
SQL Specific Data Types
Use BLOB data type of store binary data.
SQL Only Data Type! (No DDS Support)
BLOBs can be up to 2GB in size! YAY!
Created As Column In Table Definition.
Can Store ANY Binary Data (Files, Audio, Emails, .EXE
Files)
Cannot Be Modified Outside of Program. (NOT in IFS)
Takes Advantage of IBM i Security.
Automatic Replication to Target HA System.
CM First Group. Confidential & Do Not Distribute 38
Wrap Up
Questions? Comments?

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (19)

Sql tutorial-Structured query language
Sql tutorial-Structured query languageSql tutorial-Structured query language
Sql tutorial-Structured query language
 
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
SQL202.1 Accelerated Introduction to SQL Using SQL Server Module 1
 
Intro to T-SQL – 2nd session
Intro to T-SQL – 2nd sessionIntro to T-SQL – 2nd session
Intro to T-SQL – 2nd session
 
Sql a practical introduction
Sql   a practical introductionSql   a practical introduction
Sql a practical introduction
 
Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)Database Systems - Introduction to SQL (Chapter 3/1)
Database Systems - Introduction to SQL (Chapter 3/1)
 
Sql server T-sql basics ppt-3
Sql server T-sql basics  ppt-3Sql server T-sql basics  ppt-3
Sql server T-sql basics ppt-3
 
Xml Session No 1
Xml Session No 1Xml Session No 1
Xml Session No 1
 
Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)Presentation slides of Sequence Query Language (SQL)
Presentation slides of Sequence Query Language (SQL)
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Sql 2009
Sql 2009Sql 2009
Sql 2009
 
SQL and NoSQL in SQL Server
SQL and NoSQL in SQL ServerSQL and NoSQL in SQL Server
SQL and NoSQL in SQL Server
 
Top 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and AnswersTop 100 SQL Interview Questions and Answers
Top 100 SQL Interview Questions and Answers
 
Sql server
Sql serverSql server
Sql server
 
SQL, Oracle, Joins
SQL, Oracle, JoinsSQL, Oracle, Joins
SQL, Oracle, Joins
 
Glossary
GlossaryGlossary
Glossary
 
SQL overview and software
SQL overview and softwareSQL overview and software
SQL overview and software
 
SQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRysSQLPASS AD501-M XQuery MRys
SQLPASS AD501-M XQuery MRys
 
Ms sql-server
Ms sql-serverMs sql-server
Ms sql-server
 
Oracle advanced queuing
Oracle advanced queuingOracle advanced queuing
Oracle advanced queuing
 

Andere mochten auch

Institución educativa fiscal andrés f córdoba
Institución educativa fiscal andrés f córdobaInstitución educativa fiscal andrés f córdoba
Institución educativa fiscal andrés f córdobaWasho Jmc
 
Horton,Ciera__Poetics&Praise
Horton,Ciera__Poetics&PraiseHorton,Ciera__Poetics&Praise
Horton,Ciera__Poetics&PraiseCiera Horton
 
WCEC's 7 Favourite things about Yorkshire
WCEC's 7 Favourite things about Yorkshire WCEC's 7 Favourite things about Yorkshire
WCEC's 7 Favourite things about Yorkshire Anna Kemp
 
MauroCoppola_Presentazione
MauroCoppola_PresentazioneMauroCoppola_Presentazione
MauroCoppola_PresentazioneMauro Coppola
 
Goldilocks lucas p
Goldilocks lucas pGoldilocks lucas p
Goldilocks lucas pLucas Palmer
 
GuidePédagogique-logicielMultimedia_ENGLISH
GuidePédagogique-logicielMultimedia_ENGLISHGuidePédagogique-logicielMultimedia_ENGLISH
GuidePédagogique-logicielMultimedia_ENGLISHRaquel Pollo Gonzalez
 
5 of WCEC's Favourite Retail Projects
5 of WCEC's Favourite Retail Projects 5 of WCEC's Favourite Retail Projects
5 of WCEC's Favourite Retail Projects Anna Kemp
 
Silabo deontologia
Silabo deontologiaSilabo deontologia
Silabo deontologiaobfloresc
 
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в роки Другої світово...
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в  роки Другої світово...Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в  роки Другої світово...
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в роки Другої світово...painAlex
 
Mekesson Quarterly Reports 2008 1st
Mekesson Quarterly Reports 2008  1stMekesson Quarterly Reports 2008  1st
Mekesson Quarterly Reports 2008 1stfinance2
 

Andere mochten auch (15)

Institución educativa fiscal andrés f córdoba
Institución educativa fiscal andrés f córdobaInstitución educativa fiscal andrés f córdoba
Institución educativa fiscal andrés f córdoba
 
Horton,Ciera__Poetics&Praise
Horton,Ciera__Poetics&PraiseHorton,Ciera__Poetics&Praise
Horton,Ciera__Poetics&Praise
 
WCEC's 7 Favourite things about Yorkshire
WCEC's 7 Favourite things about Yorkshire WCEC's 7 Favourite things about Yorkshire
WCEC's 7 Favourite things about Yorkshire
 
Adf results 2014
Adf results 2014Adf results 2014
Adf results 2014
 
MauroCoppola_Presentazione
MauroCoppola_PresentazioneMauroCoppola_Presentazione
MauroCoppola_Presentazione
 
NFS Trifold
NFS TrifoldNFS Trifold
NFS Trifold
 
Goldilocks lucas p
Goldilocks lucas pGoldilocks lucas p
Goldilocks lucas p
 
CV Hamzah
CV HamzahCV Hamzah
CV Hamzah
 
GuidePédagogique-logicielMultimedia_ENGLISH
GuidePédagogique-logicielMultimedia_ENGLISHGuidePédagogique-logicielMultimedia_ENGLISH
GuidePédagogique-logicielMultimedia_ENGLISH
 
5 of WCEC's Favourite Retail Projects
5 of WCEC's Favourite Retail Projects 5 of WCEC's Favourite Retail Projects
5 of WCEC's Favourite Retail Projects
 
Silabo deontologia
Silabo deontologiaSilabo deontologia
Silabo deontologia
 
CV engleza actualizat
CV engleza actualizatCV engleza actualizat
CV engleza actualizat
 
Ada 1 agmh
Ada 1 agmhAda 1 agmh
Ada 1 agmh
 
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в роки Другої світово...
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в  роки Другої світово...Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в  роки Другої світово...
Героїчний подвиг АВГУСТИ ПІВЕНЬ – вчительки-партизанки в роки Другої світово...
 
Mekesson Quarterly Reports 2008 1st
Mekesson Quarterly Reports 2008  1stMekesson Quarterly Reports 2008  1st
Mekesson Quarterly Reports 2008 1st
 

Ähnlich wie Jason Olson - IBM i DB2 Modernization to SQL

System i - DDL vs DDS Presentation
System i - DDL vs DDS PresentationSystem i - DDL vs DDS Presentation
System i - DDL vs DDS PresentationChuck Walker
 
DDL And DML
DDL And DMLDDL And DML
DDL And DMLpnp @in
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredDanish Mehraj
 
DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3YOGESH SINGH
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries Database Management Lab -SQL Queries
Database Management Lab -SQL Queries shamim hossain
 
CA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_iCA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_iGeorge Jeffcock
 
SQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential KnowledgeSQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential KnowledgeJerry Yang
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instancesMohammad Khan
 
Structured query language
Structured query languageStructured query language
Structured query languageRashid Ansari
 
SQL/MED: Doping for PostgreSQL
SQL/MED: Doping for PostgreSQLSQL/MED: Doping for PostgreSQL
SQL/MED: Doping for PostgreSQLPeter Eisentraut
 

Ähnlich wie Jason Olson - IBM i DB2 Modernization to SQL (20)

System i - DDL vs DDS Presentation
System i - DDL vs DDS PresentationSystem i - DDL vs DDS Presentation
System i - DDL vs DDS Presentation
 
DDL And DML
DDL And DMLDDL And DML
DDL And DML
 
SQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics CoveredSQL Complete Tutorial. All Topics Covered
SQL Complete Tutorial. All Topics Covered
 
SQL 3.pptx
SQL 3.pptxSQL 3.pptx
SQL 3.pptx
 
DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3DEE 431 Introduction to Mysql Slide 3
DEE 431 Introduction to Mysql Slide 3
 
Database Management Lab -SQL Queries
Database Management Lab -SQL Queries Database Management Lab -SQL Queries
Database Management Lab -SQL Queries
 
my sql
my sqlmy sql
my sql
 
CA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_iCA_Plex_SupportForModernizingIBM_DB2_for_i
CA_Plex_SupportForModernizingIBM_DB2_for_i
 
SQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential KnowledgeSQL Server 2000 Research Series - Essential Knowledge
SQL Server 2000 Research Series - Essential Knowledge
 
S3 l3 db2 environment - instances
S3 l3   db2 environment - instancesS3 l3   db2 environment - instances
S3 l3 db2 environment - instances
 
Structured query language
Structured query languageStructured query language
Structured query language
 
Sq lite module5
Sq lite module5Sq lite module5
Sq lite module5
 
SQL/MED: Doping for PostgreSQL
SQL/MED: Doping for PostgreSQLSQL/MED: Doping for PostgreSQL
SQL/MED: Doping for PostgreSQL
 
DBMS Part-3.pptx
DBMS Part-3.pptxDBMS Part-3.pptx
DBMS Part-3.pptx
 
PT- Oracle session01
PT- Oracle session01 PT- Oracle session01
PT- Oracle session01
 
Ddl vs dml
Ddl vs dmlDdl vs dml
Ddl vs dml
 
Sql tutorial
Sql tutorialSql tutorial
Sql tutorial
 
SQL2.pptx
SQL2.pptxSQL2.pptx
SQL2.pptx
 
Sqlite
SqliteSqlite
Sqlite
 
lovely
lovelylovely
lovely
 

Mehr von John Zozzaro

Steve Solomon - iCAthon 2016 and CA Plex 721 Final
Steve Solomon - iCAthon 2016 and CA Plex 721 FinalSteve Solomon - iCAthon 2016 and CA Plex 721 Final
Steve Solomon - iCAthon 2016 and CA Plex 721 FinalJohn Zozzaro
 
Rolf Stephan - Axon Ivy Intro
Rolf Stephan -  Axon Ivy IntroRolf Stephan -  Axon Ivy Intro
Rolf Stephan - Axon Ivy IntroJohn Zozzaro
 
Mark Schroeder - Considering APIs?
Mark Schroeder - Considering APIs?Mark Schroeder - Considering APIs?
Mark Schroeder - Considering APIs?John Zozzaro
 
Marcel Pruegel - RESTful APIs & Automated Workflows
Marcel Pruegel - RESTful APIs & Automated WorkflowsMarcel Pruegel - RESTful APIs & Automated Workflows
Marcel Pruegel - RESTful APIs & Automated WorkflowsJohn Zozzaro
 
Marcel Pruegel - Building an Automated Process That Interacts With Different ...
Marcel Pruegel - Building an Automated Process That Interacts With Different ...Marcel Pruegel - Building an Automated Process That Interacts With Different ...
Marcel Pruegel - Building an Automated Process That Interacts With Different ...John Zozzaro
 
Kiyoshi Terasawa - Build Plex XAML UI – Advanced Training
Kiyoshi Terasawa - Build Plex XAML UI – Advanced TrainingKiyoshi Terasawa - Build Plex XAML UI – Advanced Training
Kiyoshi Terasawa - Build Plex XAML UI – Advanced TrainingJohn Zozzaro
 
John Rhodes - CA Plex for CA 2E Shops
John Rhodes - CA Plex for CA 2E ShopsJohn Rhodes - CA Plex for CA 2E Shops
John Rhodes - CA Plex for CA 2E ShopsJohn Zozzaro
 
John Rhodes - DevOps Automated Testing
John Rhodes - DevOps Automated TestingJohn Rhodes - DevOps Automated Testing
John Rhodes - DevOps Automated TestingJohn Zozzaro
 
Jason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJohn Zozzaro
 
James Higginbotham - API Design
James Higginbotham - API DesignJames Higginbotham - API Design
James Higginbotham - API DesignJohn Zozzaro
 
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile app
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile appAndrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile app
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile appJohn Zozzaro
 

Mehr von John Zozzaro (11)

Steve Solomon - iCAthon 2016 and CA Plex 721 Final
Steve Solomon - iCAthon 2016 and CA Plex 721 FinalSteve Solomon - iCAthon 2016 and CA Plex 721 Final
Steve Solomon - iCAthon 2016 and CA Plex 721 Final
 
Rolf Stephan - Axon Ivy Intro
Rolf Stephan -  Axon Ivy IntroRolf Stephan -  Axon Ivy Intro
Rolf Stephan - Axon Ivy Intro
 
Mark Schroeder - Considering APIs?
Mark Schroeder - Considering APIs?Mark Schroeder - Considering APIs?
Mark Schroeder - Considering APIs?
 
Marcel Pruegel - RESTful APIs & Automated Workflows
Marcel Pruegel - RESTful APIs & Automated WorkflowsMarcel Pruegel - RESTful APIs & Automated Workflows
Marcel Pruegel - RESTful APIs & Automated Workflows
 
Marcel Pruegel - Building an Automated Process That Interacts With Different ...
Marcel Pruegel - Building an Automated Process That Interacts With Different ...Marcel Pruegel - Building an Automated Process That Interacts With Different ...
Marcel Pruegel - Building an Automated Process That Interacts With Different ...
 
Kiyoshi Terasawa - Build Plex XAML UI – Advanced Training
Kiyoshi Terasawa - Build Plex XAML UI – Advanced TrainingKiyoshi Terasawa - Build Plex XAML UI – Advanced Training
Kiyoshi Terasawa - Build Plex XAML UI – Advanced Training
 
John Rhodes - CA Plex for CA 2E Shops
John Rhodes - CA Plex for CA 2E ShopsJohn Rhodes - CA Plex for CA 2E Shops
John Rhodes - CA Plex for CA 2E Shops
 
John Rhodes - DevOps Automated Testing
John Rhodes - DevOps Automated TestingJohn Rhodes - DevOps Automated Testing
John Rhodes - DevOps Automated Testing
 
Jason Olson - Test What You've Built
Jason Olson - Test What You've BuiltJason Olson - Test What You've Built
Jason Olson - Test What You've Built
 
James Higginbotham - API Design
James Higginbotham - API DesignJames Higginbotham - API Design
James Higginbotham - API Design
 
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile app
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile appAndrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile app
Andrew leggett & Abram Darnutzer - How to build CA Plex Web & mobile app
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Jason Olson - IBM i DB2 Modernization to SQL

  • 2. CM First Group. Confidential & Do Not Distribute 2 About Your Presenter IBM i Professional for 16 Years. Primary Focus is IBM i Engineering / Programming Well Versed in 2E. Well Versed in RPG (All Flavors) Well Versed in CM Products such as Implementer Up to Date on Newest SQL/RPG Enhancements.
  • 3. CM First Group. Confidential & Do Not Distribute 3 Agenda What Exactly is SQL (Just in case you don’t know. ) Benefits of Moving to SQL Created Objects SQL Performance Benefits SQL Objects vs DDS Objects SQL Source vs DDS Source Changing a 2E Model to Support SQL SQL Specific Data Types
  • 4. CM First Group. Confidential & Do Not Distribute 4 What Exactly is SQL? SQL Stands for Structured Query Language. Developed at IBM in the Early 1970s. Consists of a DDL (Data Definition Language) IE, CREATE TABLE, CREATE INDEX Consists of a DML (Data Manipulation Language) IE, INSERT INTO, UPDATE, DELETE, To a Large Extent Consists of Simple English Statements.
  • 5. CM First Group. Confidential & Do Not Distribute 5 Benefits of Moving to SQL Created Objects Whole World Uses SQL. New resources are more familiar with SQL then DDS. Long Field Names are Available to Outside World. YAY!  Performance (Further discussion later) Data is Validated when Written to the Database. DDL Defined Indexes use a 64K page size vs 8K used by Logical Files. Null Capable Fields. New Data Types (Blob, Clob, Lob) Demo of this!
  • 6. CM First Group. Confidential & Do Not Distribute 6 Benefits of Moving to SQL Created Objects No Enhancements to DDS Language. Constraints are Built into Database. Built in Encryption. Easier Modification of Table Layouts. RPG Programs that Use SQL Access Don’t Need a Re- compile. Automatic Identity Columns.
  • 7. CM First Group. Confidential & Do Not Distribute 7 SQL Performance In DDS Data is Validated When Read. In SQL Data is Validated When Written. This is Important as we Normally do many more reads vs. writes. Ratio could be as high as 25 to 1. Data Can Arrive up to 11 Seconds Faster. Especially Helpful When Loading up Subfiles from Random Keys. Concurrent Write Support. Logical Page Size of 64K.
  • 8. CM First Group. Confidential & Do Not Distribute 8 SQL Performance In DDS Data is Validated When Read. In SQL Data is Validated When Written. This is Important as we Normally do many more reads vs. writes. Ratio could be as high as 25 to 1. Data Can Arrive up to 11 Seconds Faster. Especially Helpful When Loading up Subfiles from Random Keys. Concurrent Write Support. Logical Page Size of 64K.
  • 9. CM First Group. Confidential & Do Not Distribute 9 SQL Objects vs DDS Objects DDS Objects Create Physical Files & Logical Files The Object types are *FILE PF and *FILE LF Most common source is DDS and stored in QDDSSRC. Source Member type is PF for Physical files, and LF for Logical Files. Compiled like a program using option 14 from PDM, or using the CRTPF or CRTLF commands. SQL Objects create Physical Files & Logical Files as well. The Object types are *FILE PF and *FILE LF Most common source is SQL and stored in QSQLSRC. Source Member type can be named anything.
  • 10. CM First Group. Confidential & Do Not Distribute 10 SQL Objects vs DDS Objects DSPFD
  • 11. CM First Group. Confidential & Do Not Distribute 11 SQL Objects vs DDS Objects DSPFD
  • 12. CM First Group. Confidential & Do Not Distribute 12 SQL Source vs DDS Source DDS Source is stored in source physical file QDDSSRC (Most Common) Source is then compiled using CRTPF or CRTLF commands. (Option 14 in PDM)
  • 13. CM First Group. Confidential & Do Not Distribute 13 SQL Source vs DDS Source SQL Source is stored in source file QSQLSRC (Most Common) Source member type can be named anything. However, common examples are SQLT for tables, SQLV for views and SQLI for indexes. SQL Objects are created using the RUNSQLSTM command.
  • 14. CM First Group. Confidential & Do Not Distribute 14 SQL Source vs DDS Source Example SQL Table Source.
  • 15. CM First Group. Confidential & Do Not Distribute 15 SQL Source vs DDS Source Example SQL Table Source.
  • 16. CM First Group. Confidential & Do Not Distribute 16 SQL Source vs DDS Source Example SQL View Source.
  • 17. CM First Group. Confidential & Do Not Distribute 17 SQL Source vs DDS Source Example SQL View Source.
  • 18. CM First Group. Confidential & Do Not Distribute 18 SQL Source vs DDS Source Example SQL Index Source.
  • 19. CM First Group. Confidential & Do Not Distribute 19 SQL Source vs DDS Source Items to Note! SQL objects are created using the RUNSQLSTM Command. SQL View And Indexes produce separate IBM i Objects. (LFs) No problem combining SQL Created tables and DDS Created LFs. (Common)
  • 20. CM First Group. Confidential & Do Not Distribute 20 DML (Data Manipulation Language) DML is used to manipulate the database. Examples are, SELECT ( to read data ) INSERT ( to insert data ) UPDATE (to update data) DELETE (to delete data) Big advantage is the use of the DB2 Database Engine for automatic index selection! If an index exists that matches the search criteria then that index will be used automatically. In standard record level access from RPG this is not the case. SQL DML Statements can be incorporated directly into an RPG program! There is no longer a need to use the traditional record level access provided by RPG.
  • 21. CM First Group. Confidential & Do Not Distribute 21 DML (Data Manipulation Language) Select (Statement Example)
  • 22. CM First Group. Confidential & Do Not Distribute 22 DML (Data Manipulation Language) Select (Statement Example)
  • 23. CM First Group. Confidential & Do Not Distribute 23 DML (Data Manipulation Language) INSERT (Statement Example)
  • 24. CM First Group. Confidential & Do Not Distribute 24 DML (Data Manipulation Language) UPDATE (Statement Example) Can update multiple records at once!
  • 25. CM First Group. Confidential & Do Not Distribute 25 DML (Data Manipulation Language) DELETE (Statement Example) Can delete multiple records at once!
  • 26. CM First Group. Confidential & Do Not Distribute 26 Change Model to use SQL Support. Several different approaches can be taken to change a model to support SQL. You can change the model to use the 2E generated table name, but use longer field name support. This allows you to expose the longer field names to the outside world. No change to RPG. You can change the model to use both the longer table name, and also the longer field names. Again, easier for the outside world. No change to RPG. You can change the generated function to use SQL record level access regardless of the database type.
  • 27. CM First Group. Confidential & Do Not Distribute 27 Change Model to use SQL Support. Any change to support SQL is done though the changing of model values. Name Description Values YSQLVNM SQL naming *DDS YDDLDBA Database Access Method *RLA / *SQL YSQLLEN SQL naming length 10 to 25 YSQLOPT Generate SQL OPTIMIZE clause *NO YSQLFMT Generate SQL RCDFMT clause *NO YSQLSTM SQL statement generation type *EXC YSQLCOL Generate SQL Col/Library Name *YES YLVLCHK Generate IDX with LVLCHK(*YES) *NO YDBFGEN Method for database file generation DDS / SQL / DDL YSQLWHR specifies whether to use OR or NOT logic when generating SQL WHERE clauses. The default is *OR. YSQLLCK
  • 28. CM First Group. Confidential & Do Not Distribute 28 Change Model to use SQL Support. YSQLVNM relates to the naming scheme used for fields and files. Values *DDS – Uses the DDS name *SQL – Use the names of the objects in the model. *LNG – Use long names for fields and files *LNF – Use long field names *LNT – Use long table names
  • 29. CM First Group. Confidential & Do Not Distribute 29 Change Model to use SQL Support. YDDLDBA specifies a method of accessing the database Values *RLA External function generates with RLA access. *SQL External function generates with SQL access.
  • 30. CM First Group. Confidential & Do Not Distribute 30 Change Model to use SQL Support. YSQLLEN – The length of field names up to 25 characters. Values Any number between 10 and 25.
  • 31. CM First Group. Confidential & Do Not Distribute 31 Change Model to use SQL Support. YSQLFMT Specifies whether the RCDFMT keyword must be generated for SQL tables, views, and indexes. Values *YES the RCDFMT value is calculated using the same rules as are used when DDS files are generated. *NO the record format is the same as the table, index, or view name.
  • 32. CM First Group. Confidential & Do Not Distribute 32 Change Model to use SQL Support. YDBFGEN – Specifies the language used in creating the logical/view over a physical file/table. *DDS *SQL *DDL
  • 33. CM First Group. Confidential & Do Not Distribute 33 Change Model to use SQL Support. YDBFGEN – Specifies the language used in creating the logical/view over a physical file/table. *DDS *SQL *DDL
  • 34. CM First Group. Confidential & Do Not Distribute 34 Change existing table to SQL. Generating SQL files Extended Names? Generating SQL Functions? Generating RLA Functions over SQL Files
  • 35. CM First Group. Confidential & Do Not Distribute 35 Change existing table to SQL. There are options to consider when modernizing a file name to SQL in 2E. Keep the file and field names the same. Keep the file name the same, give the fields enhanced names. Change the file and fields to enhanced names.
  • 36. CM First Group. Confidential & Do Not Distribute 36 SQL Record access in Functions Functions can be changed through model values, or one at a time to SQL access by the use of function options.
  • 37. CM First Group. Confidential & Do Not Distribute 37 SQL Specific Data Types Use BLOB data type of store binary data. SQL Only Data Type! (No DDS Support) BLOBs can be up to 2GB in size! YAY! Created As Column In Table Definition. Can Store ANY Binary Data (Files, Audio, Emails, .EXE Files) Cannot Be Modified Outside of Program. (NOT in IFS) Takes Advantage of IBM i Security. Automatic Replication to Target HA System.
  • 38. CM First Group. Confidential & Do Not Distribute 38 Wrap Up Questions? Comments?