473,395 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Update, case, and -407

The following (skeleton) works fine when using AQT (win/xp, ODBC),
but throws a -407 when issued from green screen SPUFI. The DB is 8.1.5
on z/OS.

update tableFoo
set colFoo =
case
when otherFoo = 'A' then 'B'
when otherFoo = 'C' then 'D'
end

Any notion why? Couldn't find an APAR or any explanation on
the DB2 site.

thx
Jun 27 '08 #1
4 2878
MeBuggyYouJane wrote:
The following (skeleton) works fine when using AQT (win/xp, ODBC),
but throws a -407 when issued from green screen SPUFI. The DB is 8.1.5
on z/OS.

update tableFoo
set colFoo =
case
when otherFoo = 'A' then 'B'
when otherFoo = 'C' then 'D'
end

Any notion why? Couldn't find an APAR or any explanation on
the DB2 site.

thx
Forgot: the win/xp machine has 8.2.9 ESE and the attendant ODBC driver,
I'm not in CubeLand, so don't have the version number.
Jun 27 '08 #2
MeBuggyYouJane wrote:
MeBuggyYouJane wrote:
>The following (skeleton) works fine when using AQT (win/xp, ODBC),
but throws a -407 when issued from green screen SPUFI. The DB is 8.1.5
on z/OS.

update tableFoo
set colFoo =
case
when otherFoo = 'A' then 'B'
when otherFoo = 'C' then 'D'
end

Any notion why? Couldn't find an APAR or any explanation on
the DB2 site.

thx

Forgot: the win/xp machine has 8.2.9 ESE and the attendant ODBC driver,
I'm not in CubeLand, so don't have the version number.
Keep in mind that there is an implied ELSE NULL in the CASE expression.
So the question is: Why do you hit the ELSE in DB2 for zOS and not on
DB2 for LUW.
Two choices:
* Different data
* Some difference in the WHERE clause you haven't shown us

My money is on the data. You got some 'bad' "OTHERFOO" on DB2 for zOS

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jun 27 '08 #3
Serge Rielau wrote:
MeBuggyYouJane wrote:
>MeBuggyYouJane wrote:
>>The following (skeleton) works fine when using AQT (win/xp, ODBC),
but throws a -407 when issued from green screen SPUFI. The DB is 8.1.5
on z/OS.

update tableFoo
set colFoo =
case
when otherFoo = 'A' then 'B'
when otherFoo = 'C' then 'D'
end

Any notion why? Couldn't find an APAR or any explanation on
the DB2 site.

thx

Forgot: the win/xp machine has 8.2.9 ESE and the attendant ODBC driver,
I'm not in CubeLand, so don't have the version number.
Keep in mind that there is an implied ELSE NULL in the CASE expression.
So the question is: Why do you hit the ELSE in DB2 for zOS and not on
DB2 for LUW.
Two choices:
* Different data
* Some difference in the WHERE clause you haven't shown us

My money is on the data. You got some 'bad' "OTHERFOO" on DB2 for zOS

Cheers
Serge

The moral of the story: don't trust COBOL/SPUFI coders. Either the
emulator or SPUFI has a "caps on" option, which re-writes quoted strings
too. So a

when otherFoo = 'SomeValue'

becomes

when otherFoo = 'SOMEVALUE'

and the -407 makes lots of sense.

:)
Jun 27 '08 #4
By default mainframe editors usually convert everything to uppercase...
(Not to say this is good. It's simply true.)

n 6/4/2008 at 5:35 PM, in message
<iu******************************@rcn.net>, MeBuggyYouJane<gn*****@rcn.com>
wrote:
Serge Rielau wrote:
>MeBuggyYouJane wrote:
>>MeBuggyYouJane wrote:
The following (skeleton) works fine when using AQT (win/xp, ODBC),
but throws a -407 when issued from green screen SPUFI. The DB is
8.1.5
>>>on z/OS.

update tableFoo
set colFoo =
case
when otherFoo = 'A' then 'B'
when otherFoo = 'C' then 'D'
end

Any notion why? Couldn't find an APAR or any explanation on
the DB2 site.

thx

Forgot: the win/xp machine has 8.2.9 ESE and the attendant ODBC
driver,
>>I'm not in CubeLand, so don't have the version number.
Keep in mind that there is an implied ELSE NULL in the CASE expression.
So the question is: Why do you hit the ELSE in DB2 for zOS and not on
DB2 for LUW.
Two choices:
* Different data
* Some difference in the WHERE clause you haven't shown us

My money is on the data. You got some 'bad' "OTHERFOO" on DB2 for zOS

Cheers
Serge

The moral of the story: don't trust COBOL/SPUFI coders. Either the
emulator or SPUFI has a "caps on" option, which re-writes quoted strings
too. So a

when otherFoo = 'SomeValue'

becomes

when otherFoo = 'SOMEVALUE'

and the -407 makes lots of sense.

:)
Jun 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ajay | last post by:
How to write a single update sql statement to update different set of attributes of a table. In other words what will be the value of indicator variables to ignore updates of some attributes in a...
1
by: toedipper | last post by:
Hello, PHP4 and MySql I have the code below, a mixture of handcoded and Dreamweaver genaratd php code. Basically it's an update record form - I load the values from a db and bind text boxes...
3
by: Megan | last post by:
hi everybody- it seems like my update query should work. the sql view seems logical. but that might be up to discussion...lol...i'm a newbie! UPDATE , Issue SET .IssueID = . WHERE ((.=.));
8
by: Maxi | last post by:
There is a lotto system which picks 21 numbers every day out of 80 numbers. I have a table (name:Lotto) with 22 fields (name:Date,P1,P2....P21) Here is the structure and sample data: ...
2
by: André Heuer | last post by:
Hi, i want to write a .net class that can update my ip address at the dyndns service (http://www.dyndns.org). When I open the page...
15
by: graham | last post by:
Hi all, <bitching and moaning section> I am asking for any help I can get here... I am at the end of my tether... I don;t consider myself a genius in any way whatsoever, but I do believe I have...
0
by: fitzini | last post by:
Hi all, I need to update multiple rows using a sub query. I've pasted sample code below to hopefully help recreate what I'm trying to do. drop table dummy_test create table dummy_test (cmr...
3
by: Michel Esber | last post by:
Hi all, DB2 V8 LUW FP 15 There is a table T (ID varchar (24), ABC timestamp). ID is PK. Our application needs to frequently update T with a new value for ABC. update T set ABC=? where ID...
2
by: sirdavethebrave | last post by:
Hi guys - I have written a form, and a stored procedure to update the said form. It really is as simple as that. A user can go into the form, update some fields and hit the update button to...
7
by: Norman Scheffler | last post by:
Hello, I wrote an update trigger to detect the names of the updated columns of a table using the UPDATED(columnName) function. In a stored procedure I wrote code to update user information with...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.