Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6823807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:49:39+00:00 2026-05-26T21:49:39+00:00

I have a dat file containing data. A line from the file is as

  • 0

I have a dat file containing data. A line from the file is as below:

HHHH-III|AAAA0000536101|2011/11/16|0100002MM000

This data is being loaded in a DB2 table using db2 import command.

Issue:
The last field in the data gets loaded along with the “new line” character at the end of the line in the dat file i.e. 0100002MM000 is getting loaded with some invisible character at the end.

Same field is being loaded in other table from other file. But in the other dat file it is at the centre somewhere in the line as below:

2011/11/16|0100002MM000|HHHH-III|AAAA|BBBBB|KDKDKDKDDKD MANAGED|C

So later on comparing 0100002MM000 from first table with 0100002MM000 in second table is failing.

How to resolve this issue?

So in this case,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:49:39+00:00Added an answer on May 26, 2026 at 9:49 pm

    Is it possible that the file has Windows “\r\n” (CRLF) line terminators, and the import is expecting Unix “\n” terminators, so it’s importing the “\r” at the end? If so, the fix is just to convert the file to the Unix format – there are lots of tools around to do that, or you can do so programmatically easily enough.

    Check whether this is the case by opening up the file in binary file editor and looking at the line terminator – if it’s using 0x0D 0x0A (or a UTF-16 equivalent) then that’s the Windows line terminator. Even if it’s not that, looking in a binary file editor will show you what is at the end of the line – maybe there’s a null character (0x00) which has got in there somehow. If that’s the case, again it should be easy to strip but you should see whether you can avoid the problem in the first place by fixing the code which generates the file to start with. (This may be out of your control, but it may not be.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

say i have the following data in a .dat file: *A-1-2-3-4*B-8-2-4*C-4-2-5-1-5 how can i
So I have a python program that ends up leaving a .dat file from
Here is my problem, I'm trying to read in data from a file beginningbalance.dat
I got a file containing the following data: str(dat) List of 2 $ x:
I have a dat file with some data in it seperated by '|' character.
Been stuck on this for a while, I have a .dat file with 16
I have a file numbers.dat containing about 300 numbers(floating point,negative positive)in column format. The
I have a .dat file of time series data for options so it includes
Given a file with data like this (ie stores.dat file) sid|storeNo|latitude|longitude 2tt|1|-28.0372000t0|153.42921670 9|2t|-33tt.85t09t0000|15t1.03274200 Desired
I have a file file.dat containing numbers, for example 4 6 7 I would

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.