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



Just want to make sure I understand correctly. If the user types RA12 you 
want to find RA12W, RA12B, RA12R, etc. - right?

What about:

modelBase = %subst(modelIn : 1 : %checkR(modelIn : 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ'));

to get modelBase = 'RA12', then do your simple logic to find the related 
records.

SQL might be good:

searchField = modelBase + '%'

Select (desired fields)
From   file
Where  modelNumber LIKE searchField


Hope this helps,
Adam


steema@xxxxxxxxxxxxx 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/01/2006 02:45 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the AS400 / iSeries" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Concatenate two strings spacing issue






I have a similar issue.

We have a model number that can be up to 7 positions. The format is
Character(s), number(s). Then there could be an appendage to it, that
would denote a color, that would always be a char.

So a radio for example, would be say, RA12
in a color of white it would be RA12W.

I am displaying info in a subfile for models, but now they want to see,
all the related records, i.e. the RA12W's.

OF course, I can move the field and find my pattern of Char, num, char.
But then I have to do this routine for RA12, RAB12, RABC12.

Instead I would like to know first, how many positions of the model 
fiels
are inhabited, and use a simple logic to pursue locating the related
records.

Steve.

You want to do something Like this
Eval CATFIELD = %TRIM(FIELD1) + %TRIM(FIELD2)


Michael Ala
EDI Service Line Leader
BP Lubricants USA Inc.
****************************************

--
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


-- 
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing 
list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


#####################################################################################
Attention:
The above message and/or attachment(s) is private and confidential and is 
intended 
only for the people for which it is addressed. If you are not named in the 
address 
fields, ignore the contents and delete all the material. Thank you. Have a nice 
day.

For more information on email virus scanning, security and content
management, please contact administrator@xxxxxxxxxxxx
#####################################################################################

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.