Click here to Skip to main content
14,034,935 members
Rate this:
Please Sign up or sign in to vote.
See more:

I have a program to fetch customer data as output where input values can be any of these two mentioned below.
1. date range (from and to date value)
2. customer name

recently we had a migration from AIX platform to Linux. The fact is this program works perfectly in AIX platform, but after migration, seems like for date rang no output is shown. I got a comment to check whether it is data issue or not. What does it mean "data issue". And what can be the reason for the same program to not work on a different platform?Any help would be appreciated.

What I have tried:

I tried the query which it uses to fetch data on db server and it gave output also. But the same when it fetches from program is not giving output
Updated 13-Apr-19 23:22pm
Richard MacCutchan 14-Apr-19 3:26am
Without seeing some of your code it is impossible to guess.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

There is way too much unknown here for anyone to provide much help. The only thing we can possibly provide input on is your question about data issue, and even that is subjective.

What I assume they are asking about it being a "data issue" is that the data may possibly be corrupted from what I am assuming was a migration from Server A to Server B. They want you to check for any potential issues in your problem tables. That would entail comparing the table from Server A to the problem table in Server B and seeing if there is any issues.

For the rest of your issue, there is not much anyone can do. We aren't your coworkers, don't have any idea what your project is/does nor do we have access to your computer, servers, or source code.

It sounds like you probably have a connection string issue is my guess, and that is a wild guess as like i said, its extremely hard for anyone to provide valuable input.

I would take your issue with getting no results and start to rule out what it isnt. Meaning, can you connect to the database on the linux server, yes? great its not an issue of whether the DB is up or not. Then, write a sample script or program to access said database, does it work from code? great. Copy the connection string from Server A to Server B in your sample app, does your sample/test app still work? No? then issue appears to be in your connection string. If you tried to connect to the DB from your local machine and nothing worked/it timed out, your problem is likely firewall related on the linux box at which point you'll need to investigate ip tables and all that fun stuff to adjust any related ACLs to allow for connectivity.

Hopefully the above gives you some ideas but also highlights the fact that there is no way any of us can tell you whats wrong with your linux server.
Member 14161770 15-Apr-19 1:05am
if the data issue refers to the above mentioned corruption, why the same I am able to get as o/p from db server separately?
Member 14161770 15-Apr-19 1:10am
and once it goes through the while loop to fetch and print vales, throws a segmentation fault and quits.
Member 14161770 16-Apr-19 1:05am
When i am running it in debug mode, its getting values, but throwing seg.fault once it completes the while loop to fetch values
David_Wimbley 16-Apr-19 1:30am
Your going to have to debug your code yourself or post more specifics with relevant code samples. Think about it this way, you don't go into the doctors office expecting them to diagnose your illness and provide you a treatment program with medication all from you simply saying "i hurt". Thats kinda like what your doing here. You say you have a segment fault error but there is nothing any of us can do to help you without specifics given we aren't your coworkers, we dont have access to your project, source code, servers or databases.
Member 14161770 16-Apr-19 8:25am
Ok. Let me explain it in detail
Suppose there are 3 customers details which the query fetches to print on screen
the data is presrent in a linked list
A while loop checks for the!=NULL
and then prints the data.
the ll should move to the next record once it prints the details of current record and it moves.
I am able to print the next record also where it does link=link->next
but when it comes to a point to check whether the data is not null it throws seg fault
I repeat, for the 1st cust. it prints details successfully. for the next record, it throws seg.fault
David_Wimbley 16-Apr-19 15:09pm
This is great and all but i don't know what you expect anyone here to do...this is not meant as rude or as me being a jerk, i genuinely don't know what you expect from anyone on a forum like this to do for you. We dont have access to your source code nor can we debug this code for you. We are not your coworkers nor do we have access to your servers.

My suggestion would be to do some research into what a segmentation fault is and see how it applies in reference to your code.
Member 14161770 17-Apr-19 0:13am
I completely understand your concern. I found out the line causing seg.fault and it shows Cannot access memory at address 0x0 which means it refers to NULL value. digging why it happens because I know that we have the data to print
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

You will have to deal with the source code. My best guess is that the parser (the translator) of the input to a date works not the same way on Linux as on AIX and so is creating some error messages. They are sometimes a bit strange. When you are very lucky it may be the change of the date settings like format, but normally some skilled coder has to apply some fix.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190424.1 | Last Updated 14 Apr 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100