Access CA-IDMS from Java |
Overview
Java applications may exchange data with any application running under CA-IDMS/DC/UCF.
Client/Server Communication
The VG-Java Client communicates with the VG-Application Server running under CA-IDMS/DC/UCF (see Servers and Client applications and VG-Application Server for more details)
Communication protocol is TCP/IP.
JDBC
Java Client includes a Type 3 Pure Java JDBC driver. The driver communicates with the VG-Application Server running under CA-IDMS/DC/UCF. The driver internally uses the Java Client API.
Database Support in JDBC
Applications can access CA-IDMS/SQL (CA Server is not needed) including table procedures and CA-IDMS/DML via stored procedures.
DB2 can be accessed via VEGA DB2 interface for CA-IDMS.
JDBC Driver Features
- JDBC 2.1 compatible
- Thread-safe
- Supports stored procedures
- Fully supports the target system SQL
- SQL pass-through (syntax is always checked against the target system)
JDBC Driver Restrictions
- The only supported escape syntax is CALL
- No query timeout (this is handled by IDMS runaway interval)
- BLOBs are not supported
JDBC Stored Procedures
- A stored procedure is a DC-COBOL program. The following samples are available:
- access DB2 using SQL
- access CA-IDMS using DML
- access CA-IDMS using SQL- Stored procedures can use any CA-IDMS service except Mapping
- Stored procedures can also use external services (e.g. DB2, MQ Series, TCP/IP)
- VEGA JDBC Stored procedures are identical to VEGA ODBC Stored procedures
JDBC Stored Procedure Functionality
There are always 3 call parameters
- output scratch name
- permanent work area for the current task
- input from the driver
Required functions
- ’PROCINFO’ function describes result set and input parameters
- ’EXECUTE’ function processes request and returns optional data
Procedure output
Procedures write all output to a scratch area. There will always be at least one record that contains SQL Control Area (sqlca) The first record may be followed by optional data records. The last record is end-of-data record where sqlcode=100.
After the procedure returns, the VG-Application Server sends the data to VG-Java Client.
Java Client version 1.1 new features
VegaMenu.class
This class can be used to start any available tool and sample application.
VegaGen.class
This class can be used to convert a CA-IDD record definition to a Java Class with optional SWING UI and/or to an XML definition.
BinToIdd.class
This class can be used to upload a binary file (e.g. graphics or Java archive) into a CA-IDD load module.
MsgAgent.class
Running the MsgAgent class is highly recommended to show VG-Application Server error messages especially during development and testing. The Server sends error messages to a non-zero port defined in VEGA.PROPERTIES.
IdmsCmdFrm.class
This class executes a given DCMT/DCUF command or a selected command file.
IdmsLogFrm.class
The IdmsLogFrm class can be used to view selected CA-IDMS log records.