LegacyJ CICS and COBOL technology for the J2EE Enterprise Environment

Products     Services     Support     Sales     News     Partners     Contact

  

Academic
Programs

Customer
Information

News &
Information

Technical
Information

White
Papers

About Us

Frequently Asked Questions

PERCobol with DB2 on the iSeries

PERCobol supports database access through jdbc via EXEC-SQL statements, but can also access remote indexed files on the AS400 via the standard indexed file COBOL statements.  Here are the steps needed to setup this support:

1. Make sure that you have an AS/400 license key and a DDS Plugin key
in the license manager.

2.  Make sure that the DDM server is started on iSeries or AS/400:

Run "STRTCPSVR SERVER(*DDM)"

3.  Make sure that jt400.jar is in the build path.  Right click
on project, choose properties->Java build path->libraries.
(If you selected the "AS/400 compatibility" project template when
initially creating the project, this jar file should be there.)

4. In the ASSIGN TO put:

ASSIGN TO "AS400:<ip-address or
hostname>:/QSYS.LIB/<mylib>.LIB/<myfile>.FILE/%FILE%.MBR"

(Change the above to match the IFS location of your indexed file.
The %FILE% means that the member has the same name as the file.)


NOTE:  If you would like to keep the ASSIGN TO DATABASE-<name>
and not change the cobol program itself, you can alias the filename
in the additional parameters field of the runtime settings of the
launch configuration (Run->Run... menu item):


-DDATABASE-<name>=<same as assign to clause above>

5. When the OPEN occurs, a dialog should appear asking for your
user name and password.


6. If you have trouble narrowing down any problems, add this line
to the additional parameters field of the runtime settings of the
launch configuration:

-DTRACE_REMOTE_AS400=true

This will send trace information to sysout (the console).

NOTE:  LegacyJ does not support logical DDS files that have multiple record definitions or REFerencing statements.  LegacyJ does however strongly recommend using the DDS copy statement for indexed files, as this will allow PERCobol to automatically match the file descriptor to the JTOpen Java interface (PERCobol requires that these match).  Simply put the DDS file in the resources folder for the project and then use the DDS style copy statement.  Don't bother adding 'OF xxx' to the copy statement, as this requires a subdirectory be added matching xxx.  Also, you can turn on list file production to see how the DDS copy gets expanded in the data section (right click on project->properties->PERCobol compiler settings).

Make sure that the DDM server is running on the AS/400:

Run "STRTCPSVR SERVER(*DDM)"

Make sure that a dialog has not popped up behind your other windows, as a dialog normally pops up to ask for name and password.

 

PERCobol

Home         About Us         Privacy        Legal        
© Copyright LegacyJ Corp. 1998, 2005
All Rights Reserved.

All trademarks are the properties of their respective owners or licensers.