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



There are several ways to do it, but I think the array with the valid characters will be the easiest. Using the array you can have an index to increment, or define 2 arrays and use xlate

Like this  next = %xlate('ABCD...'. 'BCDE..': actual);
___________________________________________________________________________
Booth Martin wrote:

Gosh, I bet its pretty easy, but for the moment the answer escapes me. Some of the others here can help, I bet.


Don Wereschuk wrote:
WHAT I AM LOOKING FOR IS THE EXPRESSION 'A' + 1 = 'B' . I WANT TO
INCREASE THE CHARTERS IN ORDER FROM 'A' TO 'Z' BY ADDING 1 TO THE
CHARACTER.

******************************************
Don Wereschuk
ISD Associate - Programmer
Simcoe Parts Service Inc.
Phone:   705-435-7814          Ext.: 302
Fax:         705-435-6746
dwereschuk@xxxxxxxxxxxxxxx
******************************************
-----Original Message-----
From: Booth Martin [mailto:booth@xxxxxxxxxxxx] Sent: Monday, May 29, 2006 3:00 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Add to Character Value

Can you create an array of all valid values ranked in the order you choose. Then do a lookup on a character, add 1 to the array, and choose

that new element as your new value.

It isn't clear to me what you would want "Q + 1" to equal, or "q + 1". An array that you construct would resolve that ambiguity.




Don Wereschuk wrote:
Does anyone know of a method to increment a character value . For
instance I want to increase the value 'A' to be the value 'B'.

******************************************



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.