Jump to content


Photo
- - - - -

c-isam datafile viewer


6 replies to this topic

#1 George Macken

George Macken

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 248 posts
  • Gender:Male
  • Location:Co. Wicklow, Ireland

Posted 07 November 2006 - 05:40 PM

Hi

I am working on a C-ISAM database and carrying out an exercise to analyse the files/tables to identify the fields columns that have the largest values stored.

We are looking to see if some fields are close to their defined field size, trying to ensure the field will not blow-out at some point in time.

On an ORACLE DB this exercise was achieved by

SELECT Key_columns, MAX(column_name) from (table_name).

repeated for each numeric amount column in each table.

For C-ISAM on AIX how could we achieve this without having to write too much code, we could write pro-iv programmes to do it but it would be drudgery.

Is there a third-party viewer/tool thru-which a c-isam table "filename.dat" could be viewed, like columns in a spreadsheet that would allow the data be sorted by clicking on a column. Or that the tool easily converts a c-isam file to a comma delimited textfile which could then be viewed/analysed in spreadsheet.

I'd appreciate any thoughts/help with this, I will take a google to see what's available, but thought it would be best to see if anyone else here has done something similar.

Rgds

George



#2 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 07 November 2006 - 06:17 PM

Hi,

Unfortunatly CISAM files dont hold any info as to the field types.

The .dat file is just a big long string of data, with all the fields next to each other, and it even hold deleted records (spaced out, but the record is still there), which is why CISAM files become so fragmented and need looking after.

Therefor your program needs to know the file layout for it to read the file.

You could do this in C code directly, and it would read the file alot quicker than ProIV would, but there is no way to write a generic reader, AFAIK

Rob.

#3 Rick Young

Rick Young

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 265 posts
  • Gender:Male
  • Location:Guelph, Canada

Posted 07 November 2006 - 06:18 PM

I believe .dat's are "mostly" text...you may be able to get away with importing it directly into Excel - although I guess, even if this would work, you probably have too many records

#4 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,640 posts
  • Gender:Male
  • Location:Spain

Posted 07 November 2006 - 06:23 PM

Hi,

Numerics are held as alpha if they have been defined as ZONED in ProIV.

If they have been defined as COMP3, then they are BCD encoded, and cannot be read as text...

It all depends on what EXT type you have got setup in the File def for numerics.

Rob.

#5 Cleve Haynes

Cleve Haynes

    Expert

  • Members
  • PipPipPipPip
  • 172 posts
  • Gender:Male

Posted 07 November 2006 - 09:19 PM

Hi

I am working on a C-ISAM database and carrying out an exercise to analyse the files/tables to identify the fields columns that have the largest values stored.

We are looking to see if some fields are close to their defined field size, trying to ensure the field will not blow-out at some point in time.

On an ORACLE DB this exercise was achieved by

SELECT Key_columns, MAX(column_name) from (table_name).

repeated for each numeric amount column in each table.

For C-ISAM on AIX how could we achieve this without having to write too much code, we could write pro-iv programmes to do it but it would be drudgery.

Is there a third-party viewer/tool thru-which a c-isam table "filename.dat" could be viewed, like columns in a spreadsheet that would allow the data be sorted by clicking on a column. Or that the tool easily converts a c-isam file to a comma delimited textfile which could then be viewed/analysed in spreadsheet.

I'd appreciate any thoughts/help with this, I will take a google to see what's available, but thought it would be best to see if anyone else here has done something similar.

Rgds

George


There are third party tools out there (from IBM/Informix, Connx, & a few others) - but you still need to know or guess the file layout as Rob said. These tools generally provide some kind of SQL access to the C-ISAM files. You could quite easily write a ProIV utility to generate the appropriate table structures required by one of these tools.

Alternately, you write a utility in ProIV that generates a function for each file, which then runs & finds the information you need and then deletes itself. This would not be too difficult.

HTH's

Cleve

#6 Aprile

Aprile

    Member

  • Members
  • PipPip
  • 15 posts

Posted 08 November 2006 - 10:37 PM

If you are not using variable length c-isam and you can copy your .dat file to a pc or linux system take a look at the PROTEXT product at www.net-aware.com. It can do just what you are looking for.

#7 Aprile

Aprile

    Member

  • Members
  • PipPip
  • 15 posts

Posted 09 November 2006 - 08:42 PM

oops ..... typo in my earlier response - the PROTRACK product, not PROTEXT will do what you are looking for.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users