load Problem from sequential file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Anupam_M
Premium Member
Premium Member
Posts: 13
Joined: Tue Aug 01, 2006 5:18 am
Location: London

load Problem from sequential file

Post by Anupam_M »

Hi all,
I am trying to load data into Oracle data base from a sequential file. However the particular column is showing no values when I am trying to view in TOAD. All the other columns are loaded Properly. But the particular problem is when i do a length(missing column name) it shows the correct value. I had tried to nls_lang as environment variable in the Job with value as the value of the NLS_LANG setting in the database. However this does not help. The column has a datatype varchar2(4000).
Can anybody help on this.
Regards,
Anupam Mukherjee.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Do you have any error/warning messages in the Log. Give us more details, on what stages your using and stuff.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Anupam_M
Premium Member
Premium Member
Posts: 13
Joined: Tue Aug 01, 2006 5:18 am
Location: London

Post by Anupam_M »

Its quite a simple job with one sequential stage one tranformer and an Oracle OCI. there are 201 columns that are being mapped and there are no derivations for the columns.
Regards,
Anupam Mukherjee.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

By any chance are they loaded with spaces, might be due to some Null handling in Datastage. :roll:
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Anupam_M
Premium Member
Premium Member
Posts: 13
Joined: Tue Aug 01, 2006 5:18 am
Location: London

Post by Anupam_M »

No actually there is no null handling thats happening. Its just a direct column mapping. The database has a NLS setting of American_America.WE8MSWIN1252. I have tried this a an environment variable setting for the Job and its not working. There are no warnings. The only problem is that the data cannot be viewed. Any suggestion/feedback on this will be of great help.
Regards,
Anupam Mukherjee.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Try to unload from the table and write it into a sequential file and check if you could able to see those values. May be you Toad playing the trick.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
oacvb
Participant
Posts: 128
Joined: Wed Feb 18, 2004 5:33 am

Post by oacvb »

Please correct me if i am wrong, You are not able to see the value of one column through toad but the length of the column gives the correct value. If so try to see the data from SQL prompt.

As well view the data from sequential file from Data Stage Designer (Sequential File --> View Data) and check that column and make sure the availability of data.
Anupam_M
Premium Member
Premium Member
Posts: 13
Joined: Tue Aug 01, 2006 5:18 am
Location: London

Post by Anupam_M »

Hi oacvb,
Yes thats the problem. There is data in the sequential file. When I check the data in the Oracle OCI stage view data I can view some of the rows partially(only 4 characters are showing while the length is 16) not all. If I try to view the data in SQL promt then I see the data exactly as I see it in view data of the Oracle OCI stage. In TOAD nothing shows.
Regards,
Anupam Mukherjee.
Anupam_M
Premium Member
Premium Member
Posts: 13
Joined: Tue Aug 01, 2006 5:18 am
Location: London

Post by Anupam_M »

Hi,

If this might help..I tried load the data to a sequential file and it loaded perfectly and I can see al the data. Just when I am trying to load it to Oracle I cant see it. Although the load is fine.
Regards,
Anupam Mukherjee.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Get your DBA to perform a raw export of some of the rows from this table so you can see precisely what's stored in them.

Create another DataStage job that selects from the table and writes to a text file. This will help you to establish whether storage is correct and the fault is in the viewer(s), or somewhere else.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Anupam_M wrote: If this might help..I tried load the data to a sequential file and it loaded perfectly and I can see al the data. Just when I am trying to load it to Oracle I cant see it. Although the load is fine.
You export is from Oracle to sequential file again isn't?
If so, it shows you data is loaded correctly into table, its just the problem with the view. Check with the display options in Datastage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
lfee12
Charter Member
Charter Member
Posts: 3
Joined: Mon Aug 08, 2005 12:24 pm
Location: St. Louis, MO

Post by lfee12 »

We are using the server edition, but we just ran into this same issue this morning. If you do a "select dump(column) from table" you can see what is actually in the column.

Our job is defined as follows:
DS job column definition as VARCHAR 4000, Oracle column definition as VARCHAR2(4000), Update action: Update existing rows only.
The the sequential file we are loading into the table looks okay. After the job runs the column appears empty in PL/SQL Developer. When we do a dump of the column we see the following:
Typ=1 Len=24: 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,82,65,67,75
The first 19 bytes are ascii nulls (which differ from Oracle nulls - a dump of a null column returns NULL).

The following situations resulted in the column containing the correct result:
1) DS job column definition as VARCHAR 500, Oracle column definition as VARCHAR2(500), Update action: Update existing rows only.
2) DS job column definition as VARCHAR 500, Oracle column definition as VARCHAR2(4000), Update action: Update existing rows only.
3) DS job column definition as VARCHAR 3999, Oracle column definition as VARCHAR2(4000), Update action: Update existing rows only.

Our conclusion is it's a DataStage issue since the update works correctly whether the Oracle column definition is 4000 or less, but once the DataStage column definition is 4000 the update pads the front of the column with ascii nulls.

By the way, inserting with a DS job column definition as VARCHAR 4000 works fine, it only seems to be an issue on an update! :?
kjosyula
Participant
Posts: 5
Joined: Mon Apr 09, 2007 5:22 pm

Post by kjosyula »

Try to change the datatype for that column which is dropping off to Varchar2(256) and run the load. I guess it is a typecast issue.
-- JK
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You mean to say, if Datastage length is less Oracle specification, the updates works properly??
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
lfee12
Charter Member
Charter Member
Posts: 3
Joined: Mon Aug 08, 2005 12:24 pm
Location: St. Louis, MO

Post by lfee12 »

Yes. If an Oracle varchar2 column is defined with a length of 4000, then the updates work correctly if the DataStage length is less than 4000.
Post Reply