Mainframe Data Conversion

Posted on 2011-05-11
Last Modified: 2012-08-14

Here's what seems like a strange one (to me anyway).  I have a file I exported from an IBM z/OS mainframe using IND$FILE to transfer it out.  The file is created with a COBOL program that converts packed data and gets it into a format we can use in PC land.  Not exactly sure of all the details but, that's it in a nutshell.  

The resulting text file looks like it should.  Pipe delimited text with no strange characters.  Just letters and numbers and the occasional special character here and there.  I have imported the file into Excel as text.  Again, everything looks good.

The problem comes when I import into SQL using SSMS Import Data Wizard.   The data is imported into my table and I can run queries against it in SSMS and everything looks great but, I run into trouble using the data in our ASP.NET application.  Some reports work, others don't.  It seems like it could be an issue with numbers which get converted to dates.

I have tested the application with other data which we exported preciously and everything looks and works correctly.  As soon as I load our main table up with the new data, we run into trouble.  

Does this sound familiar to anyone?  Could it be something like a unicode or ascii issue or something?  I'm lost.  Any help would be greatly appreciated.  

Question by:ttist25
    LVL 39

    Accepted Solution

    It could be a ASCII/UNICODE issue, Localle settings, Code page, or SQL collation for that matter.
    You need to match the data type from the source with the target table and keep in mind that some odd chars even though they display exactly the same on your screen they may have different hex code under differnet code pages and this can cause big headaches.
    LVL 1

    Author Closing Comment

    Thanks for the answer.  It is appreciated.  

    Unfortunately (or fortunately depending on how you look at it) the issue was not with the encoding of the data but the actual values themselves.  The users at this site entered values other than the standard values for some of the fields.

    That messed up the stored procedures in SQL because they were looking for values that weren't in the data.  

    The lesson here?  Stop and look!  I jumped to conclusions and wasted HOURS.  

    Live and learn right?  

    Thanks again.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Suggested Solutions

    Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video discusses moving either the default database or any database to a new volume.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now