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

Inserting a row in a table with low-values using QMF/SPUFI


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

New User


Joined: 03 Feb 2006
Posts: 41
Location: Hyderabad

PostPosted: Fri Feb 09, 2007 12:06 pm
Reply with quote

Hi,

I have a requirement which I am detailing out below:

I have an embeded SQL in COBOL program which is trying to delete a record from DB2 table. SQL looks like this:

EXEC SQL
DELETE
FROM UES_LOCK_TBL
WHERE
PERSON_ID = :WS-PERSON-ID
END-EXEC.

In Host-Variable WS-PERSON-ID, I am moving low-values.

To do Unit Testing, I want to insert a record with low-values using QMF. But I am not able to find how to insert a row in a table with low values/high values. Please guide.

Thanks
Amith Patalay
Back to top
View user's profile Send private message
Suryanarayana.tadala

New User


Joined: 03 Nov 2005
Posts: 43
Location: St.Louis

PostPosted: Fri Feb 09, 2007 10:13 pm
Reply with quote

Could you tell the declaration of the variable WS-PERSON-ID ??
Back to top
View user's profile Send private message
hikaps14

Active User


Joined: 02 Sep 2005
Posts: 189
Location: Noida

PostPosted: Mon Feb 12, 2007 12:10 pm
Reply with quote

Hi,

some time back I also had the same requirement.
so what I exactly did was moving literal low-values to the field.

I made a constant variable and gave low-values in it 'value' verb.
and then moved this variable to the host variable.

I hope it works, If there is a better way plz tell me also.

Thanks,
-Kapil.
Back to top
View user's profile Send private message
rajeshps19

New User


Joined: 14 Feb 2007
Posts: 4
Location: Noida

PostPosted: Wed Feb 14, 2007 4:00 pm
Reply with quote

Hi Kalyan,

Try this:

While inserting use the HEXAdecimal format of the low-values.

For example if Column3 in table1 is of 3 characters and you want to insert low-values in this table then

INSERT INTO table1
(Column1,
Column2,
Column3)
VALUES
(value1,
value2,
X'000000')

This will insert low-values in Column3 in three places.

Hope this helps.

Thanks,
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts DELETE SPUFI DB2 1
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top