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



Actually you can, bit complicated any way, you can use lookup operation with array or scan with the string variable.



Regards,

Chamara Withanachchi
IBM Certified Power System Expert
RPG Programmer
(owner of www.rpgiv.info)

WWW.RPGIV.INFO
Mob: +971 50 5698644
Tel: +971 6 5595887
chamaraw@xxxxxxxxxx
www.rpgiv.info
i want to be future ready. i want control. i want an i.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: Vern Hamberg <vhamberg@xxxxxxxxxxx>

Date: Mon, 22 Jun 2009 13:07:09
To: RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>
Subject: Re: Validate client name


There should be no need to use an array with %scan, right? If you want
all the positions reported, you have to use SCAN opcode and have an
array in the result variable. With %scan you do a loop with start
position set to 1 more than last found position.

Vern

Chamara Withanachchi wrote:
%scan will do the thing you have to scan one character by character. Put the name to an array (1 char array and no of elements should be equal to total length of the name field)



Regards,

Chamara Withanachchi
IBM Certified Power System Expert
RPG Programmer
(owner of www.rpgiv.info)

WWW.RPGIV.INFO
Mob: +971 50 5698644
Tel: +971 6 5595887
chamaraw@xxxxxxxxxx
www.rpgiv.info
i want to be future ready. i want control. i want an i.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: David FOXWELL <David.FOXWELL@xxxxxxxxx>

Date: Mon, 22 Jun 2009 16:35:56
To: RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>
Subject: RE: Validate client name




-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Chamara




Do not accept special characters such as .,@!/:;"+-_? Etc...


How do you do the checking?

I've been asked by the user to eliminate similar characters. However, I suspect that his list of characters is not exhaustif. I would put these characters in a string, then use %XLATE to see if the name entered contained one of these characters.
Although I think we've now limited our users to using only capital letters AtoZ plus spaces in between, so maybe it'd be easier to control what can be used instead of what can't. But then %XLATE wouldn't work, would it?

Anyway of indicating which character is the one that can't be used?



Check for special names such as tintin,


No can do. That would discriminate against Mr Tintin.



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.