If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Column length Exceeds 72 characters

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-06-09, 06:24
vinay19 vinay19 is offline
Registered User
 
Join Date: Jun 2007
Posts: 3
Column length Exceeds 72 characters

Hi all,

I am trying to execute a insert query in a JCL using IKJEFT01. One of the columns to be inserted is of picture clause CHAR(80). But when I execute the query only first 72 characters in the file are considered and the query fails.

Is there any way to overcome this situation?

P.S I need to execute this query using insert statement alone. I cannot use anything else.

thanks.
Reply With Quote
  #2 (permalink)  
Old 11-06-09, 07:27
tonkuma tonkuma is offline
Registered User
 
Join Date: Feb 2008
Location: Japan
Posts: 2,193
How about concatenating shorter strings.
Like this:
INSERT INTO ....
VALUES
('abcd...' ||
'efgh....' ||
'xyz....'
, ....
)
Reply With Quote
  #3 (permalink)  
Old 11-06-09, 08:11
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Is the data in a sepate file with lrcl of 80 or larger? JCL files are typically only 72 so that the line numbers are visble on the screen.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #4 (permalink)  
Old 11-06-09, 21:57
vinay19 vinay19 is offline
Registered User
 
Join Date: Jun 2007
Posts: 3
Thanks a lot for your replies,

Query is in a separate file of record length 200.
Reply With Quote
  #5 (permalink)  
Old 11-07-09, 03:45
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
the sqlcode you get ?
maybe because of utf db and special characters - 80 characters will not fit in char(80)
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #6 (permalink)  
Old 11-09-09, 02:04
vinay19 vinay19 is offline
Registered User
 
Join Date: Jun 2007
Posts: 3
Query fails with incompatible datatype for the successive fields. When I check the log for query, I see that only first 72 characters are present in query other characters are ignored.


Just wanted to know if there is anyway to input a larger record length input file. I dont think there is any method to do that. For now I have used the solution mentioned by Tonkuma and its working fine.

thanks for all your replies.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On