Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Problems occured while unloading a DB2 table to a flat file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
lekshmi_ci

New User


Joined: 14 Mar 2007
Posts: 60
Location: Thiruvananthapuram

PostPosted: Mon Mar 26, 2007 10:43 am    Post subject: to unload from a DB2 Table ,the SMALLINT and DECIMAL type
Reply with quote

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
View user's profile Send private message

youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Mon Mar 26, 2007 12:40 pm    Post subject: Problems occured while unloading a DB2 table to a flat file.
Reply with quote

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
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Mon Mar 26, 2007 2:06 pm    Post subject: Re: to unload from a DB2 Table ,the SMALLINT and DECIMAL typ
Reply with quote

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
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Mon Mar 26, 2007 5:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Mon Mar 26, 2007 5:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Tue Mar 27, 2007 9:45 am    Post subject: Re: Problems occured while unloading a DB2 table to a flat f
Reply with quote

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
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Tue Mar 27, 2007 5:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
youayshu
Currently Banned

New User


Joined: 07 Nov 2006
Posts: 13
Location: Thiruvanathapuram

PostPosted: Tue Mar 27, 2007 6:02 pm    Post subject:
Reply with quote

Thank you all..........

I got my problem corrected..........

by sorting the outrec&taking it into another flat file with OUTREC option......
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 965
Location: Richmond, Virginia

PostPosted: Tue Mar 27, 2007 6:18 pm    Post subject:
Reply with quote

How did that give you the integer and decimal values that previously had been just "dots&special characters"? Please explain.
Back to top
View user's profile Send private message
Shobana Bhaskar

New User


Joined: 02 Mar 2007
Posts: 35
Location: Pennsylvania, US

PostPosted: Thu Mar 29, 2007 10:57 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 29, 2007 10:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us