Operating System - HP-UX
1748114 Members
3443 Online
108758 Solutions
New Discussion юеВ

Re: Att: Dan Hetzel about that C program

 
Rita C Workman
Honored Contributor

Att: Dan Hetzel about that C program

Well, they've been looking for 3 hours and still no progress. I'm going to sit down with them and take a look (...I don't know C, but ...can't hurt to look too).

So, attached you will find the copy of the C program giving us grief. From what I've been told, it creates the array alright, but when it goes to read the array....then the problem appears. When they check the record(s) it blows up on..the records are good. Go figure.
Anyway here tis....Thanks for the offer to take a look at it.

/rcw

5 REPLIES 5
Carlos Fernandez Riera
Honored Contributor

Re: Att: Dan Hetzel about that C program

Hi Rita:

I see you are in a typical debug seesion:
I cant give you same help, only some ideas:

- Have you access to metalink? (oracle's forums)
- Install a debugger such as wdb.
See: http://devresource.hp.com/devresource/Tools/wdb/index.html

- Write milestones on you code.


Good Luck.

unsupported
Dan Hetzel
Honored Contributor

Re: Att: Dan Hetzel about that C program

Hi Rita,

Got the program, but I need a bit more info.
Where approx. is it crashing? In the qsort?
As I don't have a database with the same structure as yours, I cannot run it; and as it's about 3000 lines long, I'd like to know where I should start looking. ;-)

Best regards,

Dan


Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dan Hetzel
Honored Contributor

Re: Att: Dan Hetzel about that C program

Hi Rita,

ORA-01458: invalid length inside variable character string

Cause: An attempt was made to bind or define a variable character string with a buffer length less than the two-byte
minimum requirement.

You have a few "dummy" variables defined as a 1 byte character string:
claim_trans_seq_num
payee_seq_num
payee_name
comp_code
They are all defined at the same location in your source.

Could you modify these and check if the program runs ?
->> change the [1] to [32] for example....


Dan

Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Dan Hetzel
Honored Contributor

Re: Att: Dan Hetzel about that C program

Hi again,

I realised that those variables were unused in the program so it won't probably help to resize them.
Did you try putting a few 'printf' statements in the code to check your data?
Does someone of your team know how to use a debugger?

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Carlos Fernandez Riera
Honored Contributor

Re: Att: Dan Hetzel about that C program

HI again Rita:

Your code has slen defined as macro.

#define slen(xx).......
You can comment out this line and create a new function named slen.

In this funtion you can check var.len against sizeof(var.arr).

In case len were greater than sizeof(var.arr) make some treatament.


---

But if the program was running ok perhaps the problem were data to be treat.




unsupported