pmfullagar
07-02-02, 00:48
| From JAVA how can I read the following element in a IBM mainframe DB2 table using DB2Connect. I need to access the 6th occurance of the data embedded within this DB2 column. The DB2 column name is G_AGCY_CO_STAT_TB It consists of 54 characters. In COBOL the DCLGEN of this 54 bytes is defined as 05 G-AGCY-CO-STAT-TB. 05 G-tab redefines G-AGCY-CO-STAT-TB occurs 6 times. 10 G-CO-STATUS PIC X. 10 G-CO-END-DATE PIX 9(7) COMP-3. 10 G-CO-FINAL-END-DATE PIX 9(7) COMP-3. What I need to do with this data. I need the 6th occurance to test values in G-CO-STATUS. And I have to compare each date with other dates entered by the user. The edit is to verify a company is still active and for how long. My concern is that I donot know how to access this segment of the data. I can create a SQL statement to access G_AGCY_CO_STAT_TB. Using a SQL statement in QMF, the resulting display is unreadable. How does DB2Connect handle comp-3 data and how do you write a SQL (non-COBOL) statement from Java to access the 6th occurance of the data in this field? I am concerned about comp-3 packed data. and the translation of the data when calling from an ASCII machine to an EDBDIC machine. Please help. Thanks. |