ibm-information-center/dist/eclipse/plugins/i5OS.ic.ddp_5.4.0.1/rbal1program.htm

118 lines
8.0 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="concept" />
<meta name="DC.Title" content="Application development" />
<meta name="abstract" content="Programmers can write high-level language programs that use SQL statements for iSeries distributed application programs." />
<meta name="description" content="Programmers can write high-level language programs that use SQL statements for iSeries distributed application programs." />
<meta name="DC.subject" content="writing Distributed Relational Database applications, applications, writing Distributed Relational Database, SQL package, definition" />
<meta name="keywords" content="writing Distributed Relational Database applications, applications, writing Distributed Relational Database, SQL package, definition" />
<meta name="DC.Relation" scheme="URI" content="rbal1kickoff.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1progdrd.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1pdrdp.htm" />
<meta name="DC.Relation" scheme="URI" content="rbal1wrkpkg.htm" />
<meta name="DC.Relation" scheme="URI" content="../cl/crtsqlpkg.htm" />
<meta name="DC.Relation" scheme="URI" content="../sqlp/rbafykickoff.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1998, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="rbal1program" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>Application development</title>
</head>
<body id="rbal1program"><a name="rbal1program"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">Application development</h1>
<div><p>Programmers can write high-level language programs that use SQL
statements for <span class="keyword">iSeries™</span> distributed
application programs.</p>
<p>The main differences from programs written for local processing only are
the ability to connect to remote databases and to create SQL packages. The
CONNECT SQL statement can be used to explicitly connect an application requester
to an application server, or the name of the relational database can be specified
when the program is created to allow an implicit connection to occur. Also,
the SET CONNECTION, RELEASE, and DISCONNECT statements can be used to manage
connections for applications that use distributed unit of work.</p>
<p>An <dfn class="term">SQL package</dfn> is an <span class="keyword">iSeries</span> object
used only for distributed relational databases. It can be created as a result
of the precompile process of SQL or can be created from a compiled program
object. An SQL package resides on the application server. It contains SQL
statements, host variable attributes, and access plans which the application
server uses to process an application requester's request.</p>
<p>Because application programs can connect to many different servers, programmers
might need to pay more attention to data conversion between servers. The <span class="keyword">iSeries server</span> provides for conversion of
various types of data, including coded character set identifier (CCSID) support
for the management of character information.</p>
<p>You can create and maintain programs for a distributed relational database
on the <span class="keyword">iSeries server</span> using the SQL
language the same way you use it for local-processing applications. You can
embed static and dynamic Structured Query Language (SQL) statements with any
one or more of the following high-level languages: </p>
<ul><li><span class="keyword">iSeries</span> PL/I</li>
<li>ILE C/400<sup>®</sup></li>
<li>COBOL/400<sup>®</sup></li>
<li>ILE COBOL/400</li>
<li>FORTRAN/400</li>
<li>RPG/400<sup>®</sup></li>
<li>ILE RPG/400</li>
</ul>
<p>The process of developing distributed applications is similar to that of
developing SQL applications for local processing. The difference is that the
application for distributed processing must specify the name of the relational
database to which it connects. This might be done when you precompile the
program or within the application.</p>
<p>The same SQL objects are used for both local and distributed applications,
except that one object, the SQL package, is used exclusively for distributed
relational database support. You create the program using the Create SQL program
(CRTSQL<em>xxx</em>) command. The <em>xxx</em> in this command refers to the host
language CI, CBL, CBLI, FTN, PLI, RPG, or RPGI. The SQL package might be a
product of the precompile in this process. The <span class="cmdname">Create Structured
Query Language Package (CRTSQLPKG)</span> command creates SQL packages
for existing distributed SQL programs.</p>
<p>You must have the <span class="keyword">DB2<sup>®</sup> UDB Query Manager and SQL Development Kit</span> licensed
program installed to precompile programs with SQL statements. However, you
can create SQL packages from existing distributed SQL programs with only the
compiled program installed on your server. The <span class="keyword">DB2 UDB Query Manager and SQL Development Kit</span> licensed
program also allows you to use Interactive SQL to access a distributed relational
database. This is helpful when you are debugging programs because it allows
you to test SQL statements without having to precompile and compile a program.</p>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rbal1progdrd.htm">Programming considerations for a distributed relational database application</a></strong><br />
Programming considerations for a distributed relational database
application on an <span class="keyword">iSeries server</span> fall
into two main categories: those that deal with a function that
is supported on the local server and those that are a result of having to
connect to other servers. </li>
<li class="ulchildlink"><strong><a href="rbal1pdrdp.htm">Prepare distributed relational database programs</a></strong><br />
When you write a program using SQL, you can embed the SQL statements in a host program.</li>
<li class="ulchildlink"><strong><a href="rbal1wrkpkg.htm">Work with SQL packages</a></strong><br />
An <dfn class="term">SQL package</dfn> is an SQL object used
specifically by distributed relational database applications. It contains
control structures for each SQL statement that accesses data on an application
server (AS).</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rbal1kickoff.htm" title="Distributed database programming describes the distributed relational database management portion of the i5/OS licensed program. Distributed relational database management provides applications with access to data that is external to the applications and typically located across a network of computers.">Distributed database programming</a></div>
</div>
<div class="relinfo"><strong>Related information</strong><br />
<div><a href="../cl/crtsqlpkg.htm">Create Structured Query Language Package (CRTSQLPKG) command</a></div>
<div><a href="../sqlp/rbafykickoff.htm">SQL programming</a></div>
</div>
</div>
</body>
</html>