Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 - Values truncated during

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

New User


Joined: 24 Jan 2007
Posts: 89
Location: USA

PostPosted: Sat Apr 16, 2011 11:31 am    Post subject: DB2 - Values truncated during
Reply with quote

Hi,

We have a DB2 table with 3 fields and below is the DCLGEN structure.

DCLGEN
----------
EXEC SQL DECLARE TABLE1
(COL_A CHAR(10)
COL_B CHAR(10)
COL_C CHAR(10))
END-EXEC
01 WS-TABLE1.
05 WS-COL-A PIC X(10)
05 WS-COL-B PIC X(10)
05 WS-COL-C PIC X(10)

We have programs with below select queries in the system.
SELECT COLA,COLB,COLC FROM TABLE1

We are going to increase the size of COL-B to 15 bytes. But we are not planning to change the SQL Queries in the system.

Would someone able to tell me whether is there any impact in below existing query in the system?

SELECT COL_A,COLB,COLC FROM TABLE1

my understanding is the value of the fields from 11 to 15 position will be truncated and the system will return SQL code '000' with some value in null indicators..

Would someone able to provide additional information on this?

Thanks,
Nagu
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1722
Location: UK

PostPosted: Sat Apr 16, 2011 12:04 pm    Post subject:
Reply with quote

simplest and quickest way to find out - try it. Why are you coding like that? Surely you should be using the copybook created by the dclgen process.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Sat Apr 16, 2011 12:37 pm    Post subject: Reply to: DB2 - Values truncated during
Reply with quote

did anybody in Your organization ever hear of impact analysis ? icon_evil.gif
Yours/Your organization's plans,desires are completely irrelevant for the correctness of the results!

in other words the correctness of the results should be the driving concern for Your plans
not the other way around, make plans and hope for correct results !


Quote:
Surely you should be using the copybook created by the dclgen process.


we hope so icon_biggrin.gif
and then be satisfied that the outputs will be truncated
too much carelessness on the TS organization side

what happened when You compiled tested a program with the changed table ?
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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us