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
 
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: 1249
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 HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm

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