× 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.



On 19-Mar-2014 09:58 -0700, Michael Ryan wrote:
On Wed, Mar 19, 2014 at 12:32 PM,<memallazzo@xxxxxxxxxxx> wrote:

We are attempting to use %SCAN built in function in CLLE:

chgvar var(&SPOS) value(%SCAN(&Blank &JD400PAR))

but am receiving error: Built-in function %SCAN not valid

We are running V7R1M0. Why is %SCAN not valid?

What's in &Blank? Nothing? If you're scanning for a blank, you might
want to look for ' '.

A CL variable name is allowed in that context. And if disallowed, the error should have complained about the syntax or the argument, not about the bif itself. Although, for not knowing what is the message identifier, perhaps the implication of the message is not easily intuited from just the provided text. Anyhow, FWiW, a doc reference for the first argument which is the _search-argument_ for the scan request:

<http://pic.dhe.ibm.com/infocenter/iseries/v7r1m0/topic/rbam6/rbam6scanbif.htm>
IBM i 7.1 Information Center -> Programming -> Control language -> CL programming -> Controlling processing within a CL program or CL procedure
_i %SCAN built-in function i_
"The scan built-in function (%SCAN) returns the first position of a search argument in the source string, or 0 if it was not found. This function can only be used within a CL program or procedure

...

%SCAN(search-argument source-string [starting-position])

The search argument must be either a CL character variable or a character literal. ...
..."

FWiW I suspect the error referred to in the OP is CPD0056 and the context is F/QSUSUPP T/QSUMAIN implying the error is being diagnosed by SEU [i.e. the OP is using STRSEU]. Thus the issue is very possibly just a usage problem; i.e. the user is not aware that the Source Edit Utility is not being updated to support /newer/ functions\capabilities of the languages, and thus references to added function being diagnosed [seemingly incorrectly] is a restriction.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.