Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )

Leonardo Nieva

Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )
Hi,

Is anybody using IF statement in DB2 for zOS Version 8.1 .

A developer had a look at these site


http://www-106.ibm.com/developerworks/db2/library/techarticle/yip/0111yip.ht
ml


and tried using IF in triggers in DB2 V8.1 for zOS and it
did not work with a message

SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD IF.

Any comment will be appreciated.

Leonardo


***********************************************************************************************
The information contained in this message or any of its attachments may be confidential and is intended for the exclusive use of the addressee(s). Any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited without the express permission of the sender. The views expressed in this email are those of the individual and not necessarily those of Sony or Sony affiliated companies. Sony email is for business use only.

This mail or any response may be monitored by Sony United Kingdom Limited. (6)
***********************************************************************************************

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mike Turner

Re: Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )
(in response to Leonardo Nieva)
Hi Leonardo

The article refers to DB2 for Unix/Windows. I do not think that IF (and
other SQL Procedure Language statements) are not supported within triggers
on DB2 for z/OS, even in Version 8. SQL Procedure Language statements are
only supported within an SQL Stored Procedure in DB2 for z/OS.

Regards
Mike Turner
Email: [login to unmask email]
Tel: +44 (0)1565 873702
web: www.michael-turner.ltd.uk

-----Original Message-----
From: [login to unmask email]
[mailto:[login to unmask email]On Behalf Of Nieva, Leonardo
Sent: Wednesday, 05 January 2005 09:50
To: [login to unmask email]
Subject: [DB2-L] Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )



Hi,

Is anybody using IF statement in DB2 for zOS Version 8.1 .

A developer had a look at these site


http://www-106.ibm.com/developerworks/db2/library/techarticle/yip/0111yip.ht
ml


and tried using IF in triggers in DB2 V8.1 for zOS and it
did not work with a message

SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD IF.

Any comment will be appreciated.

Leonardo


****************************************************************************
*******************
The information contained in this message or any of its attachments may be
confidential and is intended for the exclusive use of the addressee(s). Any
disclosure, reproduction, distribution or other dissemination or use of this
communication is strictly prohibited without the express permission of the
sender. The views expressed in this email are those of the individual and
not necessarily those of Sony or Sony affiliated companies. Sony email is
for business use only.

This mail or any response may be monitored by Sony United Kingdom Limited.
(6)
****************************************************************************
*******************

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

Mike Turner

Re: Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )
(in response to Mike Turner)
Oops! That sould have read:

I do not think that IF (and other SQL Procedure Language statements) are
supported within triggers on DB2 for z/OS, even in Version 8.

Regards
Mike Turner
Email: [login to unmask email]
Tel: +44 (0)1565 873702
web: www.michael-turner.ltd.uk

-----Original Message-----
From: Mike Turner [mailto:[login to unmask email]
Sent: Wednesday, 05 January 2005 13:49
To: DB2 Database Discussion list at IDUG
Subject: RE: [DB2-L] Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )


Hi Leonardo

The article refers to DB2 for Unix/Windows. I do not think that IF (and
other SQL Procedure Language statements) are not supported within triggers
on DB2 for z/OS, even in Version 8. SQL Procedure Language statements are
only supported within an SQL Stored Procedure in DB2 for z/OS.

Regards
Mike Turner
Email: [login to unmask email]
Tel: +44 (0)1565 873702
web: www.michael-turner.ltd.uk

-----Original Message-----
From: [login to unmask email]
[mailto:[login to unmask email]On Behalf Of Nieva, Leonardo
Sent: Wednesday, 05 January 2005 09:50
To: [login to unmask email]
Subject: [DB2-L] Using IF in triggers (db2 for zOS v8.1 vs DB2 UDB )



Hi,

Is anybody using IF statement in DB2 for zOS Version 8.1 .

A developer had a look at these site


http://www-106.ibm.com/developerworks/db2/library/techarticle/yip/0111yip.ht
ml


and tried using IF in triggers in DB2 V8.1 for zOS and it
did not work with a message

SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD IF.

Any comment will be appreciated.

Leonardo


****************************************************************************
*******************
The information contained in this message or any of its attachments may be
confidential and is intended for the exclusive use of the addressee(s). Any
disclosure, reproduction, distribution or other dissemination or use of this
communication is strictly prohibited without the express permission of the
sender. The views expressed in this email are those of the individual and
not necessarily those of Sony or Sony affiliated companies. Sony email is
for business use only.

This mail or any response may be monitored by Sony United Kingdom Limited.
(6)
****************************************************************************
*******************

----------------------------------------------------------------------------
-----
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home
page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select
"Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org.
The IDUG List Admins can be reached at [login to unmask email] Find
out the latest on IDUG conferences at http://conferences.idug.org/index.cfm

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". The IDUG DB2-L FAQ is at http://www.idugdb2-l.org. The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm