Reading COBOL sources via JDBC directly

    Hi all,


    this example shows basically how you could read COBOL sources directly via JDBC.


    You need tho following things:


    1. the QlikView JDBC Connector:

    2. the HXTT Cobol JDBC driver:

    2. the COBOL files (.DAT, .IDX, .CPY, .FD), the copybook file or other structural information is required.


    The example loads the employee master audit file (PR22EMA.DAT) from the Deltek solution GCS Premier.


    - Ralf


    Some more hints:

    - in some cases you have to square bracket the columns names manuelly: [YOUR-COBOL-COLUMN-NAME]

    - sometimes field groupes get not un-nested by the driver: you can specify the grouped fields directly as listed in the .FD file

    - columns with "occurs" clause get concatenated: XYZ OCCURS 5 TIMES -> returns as value "[0,0,0,0,0]"

      Update: this seems not to work in all cases, sometimes it returns a JAVA_OBJECT. In this case you have to address

      column by index to unnest: SELECT XYZ(0) as XYZ1, XYZ(1) as XYZ2 .. XYZ(4) as XYZ5 ...