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
 
how to retrieve spaces from table?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: how to retrieve spaces from table?
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    Post subject: Re: how to retrieve spaces from table?
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    Post subject:
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    Post subject:
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    Post subject: retrieving spaces in DB2
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    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 Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts CICS RETRIEVE pshongal CICS 2 Thu Mar 08, 2018 9:15 am
No new posts COBOL declaration for table Poha Eater DB2 3 Mon Feb 26, 2018 6:58 pm

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