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
 

 

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 unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm


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