db2 and the strip function

we are currently porting some sql programs from vm/vse to aix. On The
VSE Machine (DB2) the following is valid :

-lots of crap - but in the where clause of the statement :

WHERE
JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')

The STRIP function is not existent on the AIX DB2. It can be replace by
ltrim and rtrim no problem. But I think creating an sql function strip
is easier. Does anynody know how to do that.

Regards

Michael

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

Re: db2 and the strip function

michael.bierenfeld@web.de wrote:
> Hello,
>
> we are currently porting some sql programs from vm/vse to aix. On The
> VSE Machine (DB2) the following is valid :
>
> -lots of crap - but in the where clause of the statement :
>
> WHERE
> JOBDESC = (STRIP(:HV-JOB) CONCAT '/in')
>
> The STRIP function is not existent on the AIX DB2. It can be replace by
> ltrim and rtrim no problem. But I think creating an sql function strip
> is easier. Does anynody know how to do that.
>
> Regards
>
> Michael
CREATE FUNCTION STRIP(arg VARCHAR(4000))
RETURNS VARCHAR(4000)
CONTAINS SQL DETERMINISTIC NO EXTERNAL ACTION
RETURN LTRIM(RTRIM(arg))