View previous topic :: View next topic
|
Author |
Message |
lekshmi_ci
New User
Joined: 14 Mar 2007 Posts: 60 Location: Thiruvananthapuram
|
|
|
|
While we unload from a DB2 table, we are not able to download the SMALLINT and DECIMAL type fields . What could be the solution for this. |
|
Back to top |
|
|
youayshu Currently Banned New User
Joined: 07 Nov 2006 Posts: 13 Location: Thiruvanathapuram
|
|
|
|
Hi all....
While we unload from a DB2 table, we are not able to download the SMALLINT and DECIMAL type fields . What could be the solution for this. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
lekshmi_ci wrote: |
we are not able to download the SMALLINT and DECIMAL type fields |
What do you mean "not able"? Any error messages or errors? |
|
Back to top |
|
|
youayshu Currently Banned New User
Joined: 07 Nov 2006 Posts: 13 Location: Thiruvanathapuram
|
|
|
|
No error message.......
But the fields of type DECIMAL&SMALLINT is not viewable in the downloaded flat file? instead some dots&special characters in their place........
What does it mean? actually the file contains the data or not?
Please resolve it at the earliest..........
Thanking you, |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
I think your SMALLINT and DECIMAL are unloading by default in binary and packed-dec, resp.
Confirm this by viewing your unloaded data with HEX ON.
Try "INTEGER EXTERNAL" and "DECIMAL EXTERNAL" for display mode. |
|
Back to top |
|
|
youayshu Currently Banned New User
Joined: 07 Nov 2006 Posts: 13 Location: Thiruvanathapuram
|
|
|
|
How to try "INTEGER EXTERNAL" and "DECIMAL EXTERNAL" for display mode?Sorry to ask......
Becasuse I dint used it yet........
Then while I tried to put HEX ON......It was showing some Hex characters along with the records.................
Do you have something to suggest? |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
INTEGER EXTERNAL and DECIMAL EXTERNAL are options in the UNLOAD statement.
Please show us what your HEX display looks like and what values you expect to see there. You will always see hex chars in hex mode, so that in itself says nothing. Your integer field will be interpreted as pure binary - base2, whereas your decimal field will be interpreted as packed decimal. |
|
Back to top |
|
|
youayshu Currently Banned New User
Joined: 07 Nov 2006 Posts: 13 Location: Thiruvanathapuram
|
|
|
|
Thank you all..........
I got my problem corrected..........
by sorting the outrec&taking it into another flat file with OUTREC option...... |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
How did that give you the integer and decimal values that previously had been just "dots&special characters"? Please explain. |
|
Back to top |
|
|
Shobana Bhaskar
New User
Joined: 02 Mar 2007 Posts: 35 Location: Pennsylvania, US
|
|
|
|
Try viewing it using FIELAID tool... Like how you view a VSAM file.. In general COMP-3 values are not displayable/visible as valid values. This might be a similar situation. I would suggest to view it like a VSAM file. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You can use the sort to reformat that data (which wastes machine resources) or you could do as Phrzby Phil suggested and handle the formatting in the unload. If there are 100 rows, it probably doesn't matter. If there are 100 million rows, you are wasting a lot of system resources. . . . |
|
Back to top |
|
|
|