Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

JDBC Connector to Cobol - URL path

Dears,

I'm trying to connect to files created in cobol.

For that, I installed the jdbc connector (32bit) and used the library file Cobol_JDBC30.jar.

After which I was able to see the JDBCConnector.dll (32) in the list of databases in the edit script.

It's now asking for a url to be configured.

Can anyone provide some tips for how to create this url ?

Thx.

Tags (3)
1 Solution

Accepted Solutions
MVP
MVP

Re: Re: Re: JDBC Connector to Cobol - URL path

To unnest OCCURS n TIMES columns you have to address them by index in the SELECT statement:

SELECT mycolumn(0) as mycolumn1, mycolumn(1) as mycolumn2, ... etc.

21 Replies
MVP
MVP

Re: JDBC Connector to Cobol - URL path

Hi Jean-Pierre,

you will find everything on the HXTT site:

installation.html - HXTT Cobol JDBC Drivers for Cobol FB VB data file v2.0

It's very dependend on the COBOL dialect.

- Ralf

Not applicable

Re: Re: JDBC Connector to Cobol - URL path

Hi Ralf,

Thx for your answer, the url works fine.

The customer uses Cobol MicroFocus version 5.

Files created are .dat files (but cannot be read as Table Files) with an index file.

Based on the attached error, we either need files with specific extensions or a Create Table statement.

I doubt that we can get those extensions, but I'll be checking that later today on client site.

On the other hand, can you suggest a skeleton code of how to include the sql "create table" statement within the qv script ?

Appreciate your help.

Not applicable

Re: Re: Re: JDBC Connector to Cobol - URL path

I'm attaching a sample cobol file (dat and idx).

Appreciate suggestions of how to load it into QV.

MVP
MVP

Re: Re: Re: JDBC Connector to Cobol - URL path

I guess you will need a copybook file (cpy) also to describe the data structure.

Not applicable

Re: Re: Re: JDBC Connector to Cobol - URL path

Thx Ralf.

As you suggested, I just had to add the .cpy named same as the cobol data file and the reload worked fine.

But I got a little more complex file regarding its structure with one of the fields declared as:

02 ragtab.

      03 ragmon pic s9(14)v999 occurs 12 times.

Seems that the connector doesn't recognize it, and the reload is creating 1 field (ragmon) with all values similar to: [Ljava.lang.Object;@bb1bc4

I also tried using a newer library Cobol_JDBC40.jar (instead of Cobol_JDBC30) but I got this error:

Failed to load table WRAG000:Unsupported index file format 3 now.

Have you come across such case ?

Is there any workaround or new library/driver that may recognize the "occurs" syntax ?

Appreciate your time and help.

MVP
MVP

Re: Re: Re: JDBC Connector to Cobol - URL path

Cannot say what the reason is, this has worked before. Could be a config problem or a case for our professional services.

Not applicable

Re: Re: Re: JDBC Connector to Cobol - URL path

I see, so if the demo file on your community blog works fine for "occurs", the difference is using the 64-bit connector (JDBCConnector_x64.dll).

I downloaded a 64-bit version of the jvm.dll from a website and replaced the one under C:\Program Files (x86)\Java\jre7\bin\client and placed it also under C:\Windows\SysWOW64.

However I'm not able to fully register the dll (regsvr32 command) as I'm getting below error:

Regsvr32 jvm.jpg

I'd be thankful if you can confirm that the "occurs" syntax works or doesn't work with a 32-bit connector.

And how can I get the 64-bit dll to work fine.

Many thanks.

MVP
MVP

Re: Re: Re: JDBC Connector to Cobol - URL path

Where you've downloaded the program?? The only working solution is the actual trial download from our website! All other versions hanging around sonewhere are not legal nor supported anymore. However, your problem is not related to 32bit or 64bit version!

MVP
MVP

Re: Re: Re: JDBC Connector to Cobol - URL path

Btw the program comes with an comfortable installer, no need for dll hacking. If you want to try the trial you have to remove and deregister all former versions..

Community Browser