IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Extracting National Character Records


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sunojsm
Warnings : 1

New User


Joined: 21 Jun 2004
Posts: 33
Location: Andorra

PostPosted: Sun Sep 09, 2007 9:54 pm
Reply with quote

I have to extract some records from around 400,000 records.

The condition is like :

the records which have National Characters only we need to retreive.

This record is 8 char field.The national characters can be at any position.

I tried LIKE statement which I got the result but the query is somewhat very long one and affecting the performance.

Could you please provide me simple query or any idea for this or any specific command is there.

Thanks
Sunoj
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 11, 2007 5:41 am
Reply with quote

Hello,

You could read the rows into some program code and parse the 8 bytes for the National Characters you are looking for.

Some things are better accomplished outside of SQL.

It might help if you clarify this
Quote:
somewhat very long one and affecting the performance.
What is "very long". What performance is being affected?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Tue Sep 11, 2007 7:58 am
Reply with quote

sunojsm wrote:
I have to extract some records from around 400,000 records.

The condition is like :

the records which have National Characters only we need to retreive.

This record is 8 char field.The national characters can be at any position.

I tried LIKE statement which I got the result but the query is somewhat very long one and affecting the performance.

Could you please provide me simple query or any idea for this or any specific command is there.

Thanks
Sunoj


Instead of using LIKE try POSSTR or since the field is only 8 characters use SUBSTR to check each of the eight characters.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts To fetch records that has Ttamp value... DFSORT/ICETOOL 4
No new posts ICETOOL returns no records JCL & VSAM 1
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top