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
 

 

Reqarding a query executed using IKJEFT01

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

New User


Joined: 16 May 2005
Posts: 15
Location: Bangalore

PostPosted: Wed Dec 17, 2008 3:10 pm    Post subject: Reqarding a query executed using IKJEFT01
Reply with quote

Hi,
I have a query executed using IKJEFT01 for concatenation of fields
county COUNTY || '|' || STATE || '|' ||PARCEL
from TB_PARCEL;

COUNTY is CHAR(2) NOT NULL
STATE is CHAR(2) NOT NULL
PARCEL is CHAR(20) NOT NULL

I am getting the result as below

..011|AA|11111111
..022|BB|22222222

extra two characters are coming in the first 2 bytes. I am expecting the output without those first two bytes. Can anybody help?
Back to top
View user's profile Send private message

sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1013
Location: India

PostPosted: Wed Dec 17, 2008 5:18 pm    Post subject:
Reply with quote

Hi,

Did you check how the data is in the table.
Try using substring function.

Sushanth
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Dec 17, 2008 6:07 pm    Post subject:
Reply with quote

When you concatenate data with literals the result is a variable length string, you would have to cast that as a fixed length string or use the substr function to remove the two byte length.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1239
Location: Richfield, MN, USA

PostPosted: Thu Dec 18, 2008 12:20 am    Post subject:
Reply with quote

Please refrain from posting the same question under 2 different topics.
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 Dec 18, 2008 12:35 am    Post subject: Reply to: Reqarding a query executed using IKJEFT01
Reply with quote

The same topic mentioning IDCAMS has been deleted. . .

d
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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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