249 lines
13 KiB
HTML
249 lines
13 KiB
HTML
|
<?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="reference" />
|
||
|
<meta name="DC.Title" content="Examples: Access classes" />
|
||
|
<meta name="abstract" content="" />
|
||
|
<meta name="description" content="" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="exples3" />
|
||
|
<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>Examples: Access classes</title>
|
||
|
</head>
|
||
|
<body id="exples3"><a name="exples3"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Examples: Access classes</h1>
|
||
|
<div><p></p>
|
||
|
<div class="section"><p>This section lists the code examples that are provided throughout
|
||
|
the documentation of the IBM<sup>®</sup> Toolbox for Java™ access classes.</p>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">AS400JPing</h4><ul><li> <a href="as400jping.htm#as400jping__as400jpingex">Example: Using AS400JPing
|
||
|
within a Java program</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">BidiTransform</h4><ul><li> <a href="biditransform.htm#biditransform__bidiex">Example: Using the
|
||
|
AS400BidiTransform class to transform bidirectional text</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">CommandCall</h4><ul><li> <a href="cmdc.htm#cmdc__cmdcex1">Example: Using CommandCall to run
|
||
|
a command on the server</a></li>
|
||
|
<li><a href="commandcallexample.htm#commandcallexample">Example: Using
|
||
|
CommandCall to prompt for the name of the server, command to run, and print
|
||
|
the result</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">ConnectionPool</h4><ul><li><a href="connectpoolexample.htm#connectpoolexample">Example: Using
|
||
|
AS400ConnectionPool to create connections to the server</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">DataArea</h4><ul><li> <a href="dataarea.htm#dataarea__dataareaex">Example: Creating and
|
||
|
writing to a decimal data area</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Data conversion and description</h4><ul><li><a href="recordxmp.htm#recordxmp">Examples: Using the FieldDescription,
|
||
|
RecordFormat, and Record classes</a></li>
|
||
|
<li><a href="dqproducerexample.htm#dqproducerexample">Example: Putting
|
||
|
data on a queue</a></li>
|
||
|
<li><a href="dqconsumerexample.htm#dqconsumerexample">Example: Reading
|
||
|
data from a queue</a></li>
|
||
|
<li><a href="dtxmp.htm#dtxmp">Example: Using AS400DataType classes with
|
||
|
ProgramCall</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">DataQueue</h4><ul><li> <a href="dtaq.htm#dtaq__dqex1">Example: How to create a DataQueue
|
||
|
object, read data, and disconnect</a></li>
|
||
|
<li><a href="dqproducerexample.htm#dqproducerexample">Example: Putting
|
||
|
data on a queue</a></li>
|
||
|
<li><a href="dqconsumerexample.htm#dqconsumerexample">Example: Reading
|
||
|
data from a queue</a></li>
|
||
|
<li><a href="dqkeyedproducerexample.htm#dqkeyedproducerexample">Example:
|
||
|
Using KeyedDataQueue to put items on a queue</a></li>
|
||
|
<li><a href="dqkeyedconsumerexample.htm#dqkeyedconsumerexample">Example:
|
||
|
Using KeyedDataQueue to take items off a queue</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Digital certificate</h4><ul><li> <a href="dcert.htm#dcert__dcertex1">Example: Listing digital certificates
|
||
|
that belong to a user</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">EnvironmentVariable</h4><ul><li> <a href="environmentvariable.htm#environmentvariable__envvarex">Example:
|
||
|
Creating, setting, and getting environment variables</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Exceptions</h4><ul><li> <a href="except.htm#except__excex1">Example: Catching a thrown exception,
|
||
|
retrieving the return code, and displaying the exception text</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">FTP</h4><ul><li> <a href="ftp.htm#ftp__class">Example: Using the FTP class to Copy
|
||
|
a set of files from a server directory</a></li>
|
||
|
<li> <a href="ftp.htm#ftp__subclass">Example: Using the AS400FTP class
|
||
|
to copy a set of files from a directory</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Integrated file system</h4><ul><li><a href="ifsfileexamples.htm#ifsfileexamples">Examples: Using IFSFile</a></li>
|
||
|
<li><a href="ifslistfilezexample.htm#ifslistfilezexample">Example: Using
|
||
|
the IFSFile.listFiles() method to list the contents of a directory</a></li>
|
||
|
<li><a href="ifscopyfileexample.htm#ifscopyfileexample">Example: Using
|
||
|
IFSFile classes to copy files</a></li>
|
||
|
<li><a href="ifslistexample.htm#ifslistexample">Example: Using IFSFile
|
||
|
classes to list the contents of a directory</a></li>
|
||
|
<li> <a href="ifsjava.htm#ifsjava__ifsjex">Example: How to use IFSJavaFile
|
||
|
instead of java.io.File</a></li>
|
||
|
<li><a href="ifslistexample.htm#ifslistexample">Example: Using the IFSFile
|
||
|
classes to list the contents of a directory on the server</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">JavaApplicationCall</h4><ul><li> <a href="jac.htm#jac__jacex">Example: Running a program on the server
|
||
|
from the client that outputs "Hello World!"</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">JDBC</h4><ul><li><a href="jdbcpopulateexample.htm#jdbcpopulateexample">Example: Using
|
||
|
the JDBC driver to create and populate a table</a></li>
|
||
|
<li><a href="jdbcqueryexample.htm#jdbcqueryexample">Example: Using the
|
||
|
JDBC driver to query a table and output its contents</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Jobs</h4><ul><li> <a href="jobs.htm#jobs__cutjob">Example: Retrieving and changing job
|
||
|
information using the cache</a></li>
|
||
|
<li> <a href="joblist.htm#joblist__jbltex1">Example: Listing all active
|
||
|
jobs</a></li>
|
||
|
<li> <a href="joblog.htm#joblog__jblgex1">Example: Printing all of the
|
||
|
messages in the job log for a specific user</a></li>
|
||
|
<li><a href="listjobs2.htm#listjobs2">Example: Listing the job identification
|
||
|
information for a specific user</a></li>
|
||
|
<li><a href="listjobs.htm#listjobs">Example: Getting a list of jobs on
|
||
|
the server and listing the job status and the job identifier</a></li>
|
||
|
<li><a href="joblogexample.htm#joblogexample">Example: Displaying messages
|
||
|
in the job log for a job that belongs to the current user</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Message queue</h4><ul><li> <a href="msg.htm#msg__msgex1">Example: How to use the message queue
|
||
|
object</a></li>
|
||
|
<li> <a href="msg.htm#msg__msgex2">Example: Printing the contents of the
|
||
|
message queue</a></li>
|
||
|
<li> <a href="msg.htm#msg__msgex4">Example: Retrieving and printing a message</a></li>
|
||
|
<li> <a href="msg.htm#msg__msgex3">Example: Listing the contents of the
|
||
|
message queue</a></li>
|
||
|
<li><a href="commandcallexample.htm#commandcallexample">Example: Using
|
||
|
AS400Message with CommandCall</a></li>
|
||
|
<li><a href="pcsystemstatexample.htm#pcsystemstatexample">Example: Using
|
||
|
AS400Message with ProgramCall</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">NetServer™</h4><ul><li> <a href="netserver.htm#netserver__netsrvex">Example: Using a NetServer object
|
||
|
to change the name of the NetServer</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Print</h4><ul><li><a href="npexamplelistsplfasynch.htm#npexamplelistsplfasynch">Example:
|
||
|
Asynchronously listing all spooled files using the PrintObjectListListener
|
||
|
interface</a></li>
|
||
|
<li><a href="npexamplelistsplfasynch2.htm#npexamplelistsplfasynch2">Example:
|
||
|
Asynchronously listing all spooled files <em>without</em> using the PrintObjectListListener
|
||
|
interface</a></li>
|
||
|
<li> <a href="printcopy.htm#printcopy__copyspooledfile">Example: Copying
|
||
|
a spooled file using SpooledFile.copy()</a></li>
|
||
|
<li><a href="npexamplecreatesplf.htm#npexamplecreatesplf">Example: Creating
|
||
|
a spooled file from an input stream</a></li>
|
||
|
<li><a href="npexamplecreatescssplf.htm#npexamplecreatescssplf">Example:
|
||
|
Generating an SCS data stream using the SCS3812Writer class</a></li>
|
||
|
<li><a href="npexamplereadsplf.htm#npexamplereadsplf">Example: Reading
|
||
|
an existing spooled file</a></li>
|
||
|
<li><a href="transinstr.htm#transinstr">Example: Reading and transforming
|
||
|
spooled files</a></li>
|
||
|
<li><a href="npexamplelistsplfsynch.htm#npexamplelistsplfsynch">Example:
|
||
|
Synchronously listing all spooled files</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Permission</h4><ul><li> <a href="prmintro.htm#prmintro__ex3">Example: Set the authority of
|
||
|
an AS400 object</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Program call</h4><ul><li> <a href="pgmc.htm#pgmc__pgmcex1">Example: Using ProgramCall</a></li>
|
||
|
<li><a href="pcsystemstatexample.htm#pcsystemstatexample">Example: Using
|
||
|
ProgramCall to retrieve system status</a></li>
|
||
|
<li> <a href="pgmc.htm#pgmc__pgmcex2">Example: Passing parameter data with
|
||
|
a Program parameter object</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">QSYSObjectPathName</h4><ul><li> <a href="qsyspath.htm#qsyspath__qsysex1">Example: Building an integrated
|
||
|
file system name</a></li>
|
||
|
<li> <a href="qsyspath.htm#qsyspath__qsysex2">Example: Using QSYSObjectPathName.toPath()
|
||
|
to build an AS400 object name</a></li>
|
||
|
<li> <a href="qsyspath.htm#qsyspath__qsysex3">Example: Using QSYSObjectPathName
|
||
|
to parse the integrated file system path name</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Record-level access</h4><ul><li><a href="rlsequentialaccexample.htm#rlsequentialaccexample">Example:
|
||
|
Sequentially accessing a file</a></li>
|
||
|
<li><a href="rlreadfileexample.htm#rlreadfileexample">Example: Using the
|
||
|
record-level access classes to read a file</a></li>
|
||
|
<li><a href="rlkeyedfileexample.htm#rlkeyedfileexample">Example: Using
|
||
|
the record-level access classes to read records by key</a></li>
|
||
|
<li> <a href="dtadldrw.htm#dtadldrw__dtadldrwex">Example: Using the LineDataRecordWriter
|
||
|
class</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Service program call</h4><ul><li><a href="javadoc/com/ibm/as400/access/ServiceProgramCall.html">Example: Using ServiceProgramCall to call a procedure</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">SystemStatus</h4><ul><li> <a href="systats.htm#systats__systatzexample1">Example: Use caching
|
||
|
with the SystemStatus class</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">SystemPool</h4><ul><li> <a href="syspool.htm#syspool__syspoolexample1">Example: Setting the
|
||
|
maximum faults size for SystemPool</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">SystemValue</h4><ul><li> <a href="sysval.htm#sysval">Example: Using SystemValue and SystemValueList</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">Trace</h4><ul><li> <a href="trace.htm#trace__traceex1">Example: Using the Trace.setTraceOn()
|
||
|
method</a></li>
|
||
|
<li> <a href="trace.htm#trace__traceex2">Example: Preferred way to use
|
||
|
Trace</a></li>
|
||
|
<li> <a href="trace.htm#trace__traceex3">Example: Using component tracing</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">UserGroup</h4><ul><li> <a href="usrgrp.htm#usrgrp__usgex1">Example: Retrieving a list of
|
||
|
users</a></li>
|
||
|
<li><a href="userlistexample.htm#userlistexample">Example: Listing all
|
||
|
the users of a group</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><h4 class="sectiontitle">UserSpace</h4><ul><li> <a href="uspace.htm#uspace__uspex1">Example: How to create a user
|
||
|
space</a></li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="section"><p>The following disclaimer applies to all of the IBM Toolbox for Java examples:</p>
|
||
|
<blockquote><strong>Code
|
||
|
example disclaimer</strong> <p>IBM grants you a nonexclusive copyright license to use
|
||
|
all programming code examples from which you can generate similar function
|
||
|
tailored to your own specific needs.</p>
|
||
|
<p>All sample code is provided by IBM for
|
||
|
illustrative purposes only. These examples have not been thoroughly tested
|
||
|
under all conditions. IBM, therefore, cannot guarantee or imply reliability,
|
||
|
serviceability, or function of these programs.</p>
|
||
|
<p>All programs contained
|
||
|
herein are provided to you "AS IS" without any warranties of any kind. The
|
||
|
implied warranties of non-infringement, merchantability and fitness for a
|
||
|
particular purpose are expressly disclaimed.</p>
|
||
|
</blockquote>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|