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
 
DB2 Table Unload

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Fri Apr 24, 2009 4:58 pm    Post subject: DB2 Table Unload
Reply with quote

Hi,

We are trying to download data from the DB2 table. Previously we used to download the data directly from the table. Since this used to require huge amount of CPU time, we are planning to download the data from the image copy of the table instead.

However, when we are unloading data from the image copy, a column having definition of DECIMAL(7,0) when unloaded is having a junk value of X'40404040' instead of X'00000000' which leads to a downstream COBOL program getting abended with S0C-7 abend.

Is there any method by means of which we can easily download data from the image copy but would be having the desired value of X'00000000' instead of X'40404040'. The copy book definition of this particular field is PIC S9(7)V COMP-3.
Back to top
View user's profile Send private message

Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Apr 24, 2009 5:12 pm    Post subject:
Reply with quote

Are you sure that data for that column in Image copy (IC) was "correct" at the time of IC itself?
Back to top
View user's profile Send private message
swapnadeep.ganguly

Active User


Joined: 21 Mar 2007
Posts: 203
Location: India

PostPosted: Fri Apr 24, 2009 5:19 pm    Post subject:
Reply with quote

Yes, Anuj.

After we had performed the unload, we loaded the same data into another database and then compared both the tables. Both had similar records.

I put a validation in my COBOL program that checked the NULL Indicator value as X'FF'. Is such kind of comparison allowed in COBOL?


Code:

05  WC-UNLOAD-NULL-FIELD        PIC  X(01) VALUE X'FF'.



IF  COLA-NULL   NOT = WC-UNLOAD-NULL-FIELD
AND COLA        NOT = ZERO               



I am performing the check above.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Fri Apr 24, 2009 7:24 pm    Post subject:
Reply with quote

Hi Swapnadeep Ganguly,

Quote:
a column having definition of DECIMAL(7,0) when unloaded is having a junk value

Those are not JUNK value. Those are binary.
In you unload job add this too.
Code:
FROM TABLE HQlevel.tablename               
(COL1,COL2,COL3 DECIMAL EXTERNAL)

This will give you in a readable format.

Thank You,
Sushanth
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Fri Apr 24, 2009 11:35 pm    Post subject: Reply to: DB2 Table Unload
Reply with quote

Hi


Quote:
Those are not JUNK value. Those are binary.


Quote:
However, when we are unloading data from the image copy, a column having definition of DECIMAL(7,0) when unloaded is having a junk value of X'40404040' instead of X'00000000'

I think X'40404040' is neither junk nor binary. It is the representation of "space " or "blank" in HEX.
If I am not correct, correct me.

Regards
Raghu
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Sat Apr 25, 2009 12:25 am    Post subject:
Reply with quote

Raghu,

I read in the documentation the following.

Quote:
When you unload a floating-point type column, you can specify the binary form of the output to either the s/390 format(hexadecimal floating point, or HFP), or the IEEE format(binary floating point, or BFP).


Correct me, if iam wrong.
Sushanth
Back to top
View user's profile Send private message
Raghu navaikulam

Active User


Joined: 27 Sep 2008
Posts: 193
Location: chennai

PostPosted: Sat Apr 25, 2009 1:58 am    Post subject: Reply to: DB2 Table Unload
Reply with quote

Hi sushanth bobby

I assume that, the column with datatype DECIMAL(7,0) is representing X'40404040' and it is internally using 4 bytes. It is decimal not REAL or FLOAT. And X'40' represent a blank space. That is why I came to that conclusion.

Regards
Raghu
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sat Apr 25, 2009 2:04 am    Post subject:
Reply with quote

Quote:
I put a validation in my COBOL program that checked the NULL Indicator value as X'FF'. Is such kind of comparison allowed in COBOL?
There's a link to manuals at the top of the page. Look up HIGH-VALUES in the COBOL Language Reference .
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 -> DB2 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 Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts PC (UTF-8) -> z/OS (EBCDIC) -> ... prino All Other Mainframe Topics 4 Fri Sep 01, 2017 1:47 am

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