× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Every now and then I'm getting the SQL0171 error when attempting to open
cursor below. I'm at a lost on what cause this error and why the error
occur irregularly. Help....


C/exec sql
C+ close mergedFileCursor
C/end-exec

C/exec sql
C+ declare mergedFileCursor scroll cursor for
C+ select
C+ PSNStr as CCStr,
C+ PSNEnd as CCEnd,
C+ cast('CCM ' as char(10)) as fileType,
C+ cast(
C+ (case PSMCOM
C+ when 'RESYNC' then 'BOSS'
C+ else 'CCM'
C+ end
C+ )
C+ )
C+ as char(10)) as recordType,
C+ cast(
C+ digits(PSULCY)||digits(PSULYR)||
C+ digits(PSULMO)||digits(PSULDY)||
C+ digits(PSULTM)
C+ as char(14)) as lasChange,
C+ RRN(BLCAPASPF) as "rrn"
C+
C+ from BLCAPASPF
C+
C+ where PSFreq = :processThisAsgnKey.freq and
C+ PSBaud = :processThisAsgnKey.Baud and
C+ PSNEnd >= PSNStr
C+
C+ union all
C+ select
C+ ECCPCDFrm as CCStr,
C+ ECCPCDTo as CCEnd,
C+ cast('BOSS' as char(10)) as fileType,
C+ cast('BOSS' as char(10)) as recordType,
C+ cast('BOSS' as char(10)) as recordType,
C+ cast(
C+ replace(char(curdate(), iso), '-', '') ||
C+ replace(char(curtime(), iso), '.', '')
C+ as char(14)) as lasChange,
C+ RRN(BLCCMBPF) as "rrn"
C+
C+ from BLCCMBPF
C+
C+ where ECFreq = :processThisAsgnKey.freq and
C+ ECBaud = :processThisAsgnKey.Baud and
C+ ECCPCDTo >= ECCPCDFrm
C+
C+ order by
C+ CCStr, CCEnd
C/end-exec

C/exec sql
C+ open mergedFileCursor
C/end-exec



Below is what the SQL0171 message said:
Message ID . . . . . . : SQL0171 Severity . . . . . . . : 30

Message type . . . . . : Diagnostic

Date sent . . . . . . : 10/23/08 Time sent . . . . . . :
10:45:13


Message . . . . : Argument *N of function REPLACE not valid.

Cause . . . . . : The data type, length, or value of argument *N of
function
REPLACE specified is not valid.

Recovery . . . : Refer to the DB2 UDB for iSeries SQL Reference topic
in
the Information Center for more information on scalar functions.
Correct the
arguments specified for the function. Try the request again.





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.