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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Inserting a row in a table with low-values using QMF/SPUFI
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    Post subject:
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    Post subject: Re: Inserting a row in a table with low-values using QMF/SPU
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    Post subject: Re: Inserting a row in a table with low-values using QMF/SPU
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
No new posts Overlaying one set of charater values... Kevin Lindsley SYNCSORT 7 Sat Nov 05, 2016 3:21 am
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts How can we create a flat file in JAVA... rakesh.v18 Java & MQSeries 7 Fri Sep 23, 2016 10:46 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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