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: 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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm
No new posts GETMAIN/FREEMAIN query Suja.Sai CICS 9 Tue Jan 31, 2017 12:01 pm


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