The AS400LobServer application demonstrates how to access DB2/400 LOBs (BLOBs and CLOBs) using the AS/400 Toolbox for Java. There are three requirements for successful installation and execution of the application: 1. A client workstation with a Java 2 JRE or SDK installed must be used. The application uses the JDBC 2.0 scrollable cursor support which requires a Java 2 JRE or SDK. 2. A recent (September '99 or later modified date) version of the jt400.jar or jt400.zip needs to be in the workstation's classpath. 3. A database must be created on the AS/400 which contains one or more LOB (BLOB or CLOB) fields. The actual BLOBs and CLOBs can be named anything you wish. But, a traditional character or varchar field with a specific naming convention MUST be added for each BLOB or CLOB you wish to access with this application. For instance, if you already have a BLOB field called 'PHOTO' in the database, please add a character field specifically named 'PHOTO_ID'. This field will be used to store the original name and extension of the LOB file when the 'Update Lob' button is clicked. Likewise, the 'Retrieve Lob' option will return the information stored in that field, along with the LOB itself, so that it is a usable object when it is dropped to your PC file system from DB2/400. If a field having the naming convention ' + _ID' is not added to your database for every LOB that you wish to access, the application will return a message stating that it doesn't exist. Adding the additional field(s) will solve the problem. In summary, you can name the actual CLOB or BLOB fields anything you wish. But, for this particular application to work properly, the additional character fields with the aforementioned naming convention must be added for LOB identification purposes since the files are being transferred back and forth between a PC file system (which contains the file name and extension type) and a database (which loses the file name and extension type if it is not stored elsewhere). The following is an example of the interactive SQL commands that may be issued via an AS/400 5250 session to create a minimal database that may be used in conjunction with this AS400LobServer application: STRSQL CREATE COLLECTION PHOTOS CREATE TABLE PHOTOS/CUSTOMER (CSTNBR INT NOT NULL, PHOTO BLOB ( 1M), PHOTO_ID CHAR( 100)) INSERT INTO PHOTOS/CUSTOMER (CSTNBR) VALUES(1) Next, extract the AS400LobServer.zip application to a root drive on your workstation, choosing to preserve the directory structure during the extraction process. Then, perform the following DOS commands to run the application: : cd \ cd Blob java SignOnScreen Use the 'UPDATE LOB' button to insert an image file into the CUSTOMER database from your PC file system. If the image update is successful, you can then click the 'DISPLAY GIF/JPG' button to view the image that was just inserted into the database. The 'RETRIEVE LOB' button is used to transfer a Lob from DB2/400 to your PC file system for viewing at a later time. All of the class, source, and resource files for this application are stored within the 'Blob' folder. All of the source code which actually manipulates a BLOB/CLOB is contained in the DisplayBlob and LobServer .java files. The other classes are simply used to build and display some of the GUI frames used in the application. The SignOnScreen.gif, LobHandler.gif, and DisplayBlob.gif are screenshots of the frames used in the application with example input data shown in the text fields.