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

how to retrieve spaces from table?


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

New User


Joined: 12 Aug 2005
Posts: 32

PostPosted: Wed Feb 22, 2006 10:15 pm
Reply with quote

I have a table in which col1 is defined as comp-3. Now i want to retrieve the data from that column whose value is spaces. How I should proceed icon_question.gif Particularly in File-aid...... plz guide me. icon_arrow.gif

Thx in advance. icon_lol.gif

sandy
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Wed Feb 22, 2006 11:49 pm
Reply with quote

sandeep4u,

This is a DB2 table?

You say it?s defined as a COMP-3, This means that for DB2 it?s defined as decimal.

If so, I don?t believe DB2 will allow you to put spaces in a decimal column.

Dave,
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Thu Feb 23, 2006 10:55 am
Reply with quote

Sandeep,

do you mean NULL? then you can have an sql like

select * from <table-name>
where <col1> is null.
Back to top
View user's profile Send private message
sonu_winks

New User


Joined: 23 Nov 2005
Posts: 23

PostPosted: Thu Feb 23, 2006 1:22 pm
Reply with quote

if the cobol deln of the corresponding column is comp-3 it should be decimal in DB2 and the value u want to retieve must be NULL , not spaces. icon_eek.gif
Back to top
View user's profile Send private message
sandeep4u

New User


Joined: 12 Aug 2005
Posts: 32

PostPosted: Thu Feb 23, 2006 2:54 pm
Reply with quote

Hi,
icon_sad.gif Sorry for I have specified wrong info.. Thx for giving me reply. icon_lol.gif .........actually the column is defined as alphanumeric i.e. varchar2 in DB2 but in cobol the ws-parameter is COMP-3.
Now i am retrieving the data from table and storing it in the variable.
In File-aid i am trying to retrive the table value not equal to spaces..but i am not able to retrive it. I am specifying the condition against the col in file-aid but it is giving me "NO Records Selected", but there are records in the table.........

Please help me out........ sorry for inconvenience.....

Thx in advance........

sandy
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top