View previous topic :: View next topic
|
Author |
Message |
prasannahcp
New User
Joined: 16 May 2005 Posts: 16 Location: Bangalore
|
|
|
|
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 |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
Did you check how the data is in the table.
Try using substring function.
Sushanth |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Please refrain from posting the same question under 2 different topics. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
The same topic mentioning IDCAMS has been deleted. . .
d |
|
Back to top |
|
|
|