1752666 Members
5738 Online
108788 Solutions
New Discussion юеВ

Strange OS Behavior

 
Sathish C
Frequent Advisor

Strange OS Behavior

Hi
Not sure If I can explain the entire sceanrio in a mail , but let me try . A Cobol routine calling a C function to move files from one place to another depending on upon certain critiria , the C program is designed in such way that if the file to be moved is existing in the target place , the he will overwrite . Stangly when The Cobol routine calls this C function this does not happen the entire program just hangs .

But if you run C program on its own using the same file in this situation it works fine .The previous version of this Cosftwasre in the CC and the new CC do not have difference .

The only difference on the system is Oracle 9i . Can some one suggest me something ? Pls ask as many as you need to to understand the problem .

Thanx Guys , Sorry for a long story but no other way . :)
Some cause happiness wherever they go; others, whenever they go
7 REPLIES 7
Eric Antunes
Honored Contributor

Re: Strange OS Behavior

I'm not sure if I understood well: you were calling a C program in Cobol and now you're calling it in Oracle 9i??
Each and every day is a good day to learn.
Sathish C
Frequent Advisor

Re: Strange OS Behavior

No, What I meant by Oracle 9i is , thats is the only third party software changed in the environment . Also I meant the program is working fine with the present Unix systerm 11i + Oracle 8.0.6 , but does not work with 9i .


Some cause happiness wherever they go; others, whenever they go
Manish Srivastava
Trusted Contributor

Re: Strange OS Behavior

Hi,

Does it hang forever of it timesout after sometime. It may be that the file which the C program wants to write is having a lock and the prog just waits for it.

manish.
Eric Antunes
Honored Contributor

Re: Strange OS Behavior

As the new oracle user have permissions to read and execute this C program file?
Each and every day is a good day to learn.
Nicolas Dumeige
Esteemed Contributor

Re: Strange OS Behavior

Hello,

I would suggest to trace both programs Cobol and C. If you can't figure what's appening, copy both and make more verbose versions.

As for the depencies, do you link against Oracle libraries ? (use ldd to find out if necessary).

If the C program works fine on its own, check the environnement, args, ..., when it is called from the Cobol one.

Cheers

Nicolas
All different, all Unix
Bharat Katkar
Honored Contributor

Re: Strange OS Behavior

Hi satish,
Your statement:
"The only difference on the system is Oracle 9i"

Well, i would just like to raise a thought here not sure about its significance.

So as far as OS is concerned, installation of 9i must have changed the kernel parameters and probably you might have added some patches as well. Why don't you look back and analyse if any of those are the culprits.

Hope that helps.
Regards,

You need to know a lot to actually know how little you know
Sathish C
Frequent Advisor

Re: Strange OS Behavior

Hi
Thank you so far for your interest in this strange behavior . Yes it does have links to Oracle libs, syncsort,quick select and wholelot of thirs party products , at the point of the problem , where the cobol rogram hangs there is no call made to the c call , I even tried to use "lsof" and fuser and few other things to find if the file the c code want to use is locked or in use by some other resources but NO .

Let say the cobol passes a file name called X.Y to the C function to move that file from place "old" to new and the X.Y is already existing in place "new" , this is where the cobol hangs , when you go and remove the exixting file in the place "new" the fileX.Y becomes a directory immediately and there is no where a call is made to make directories in any of these codes .

The most strange problem I have ever seen in my life .
Some cause happiness wherever they go; others, whenever they go