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


  • Subject: Re: Ideas for parameters that are lists? [PROC]
  • From: Carel Teijgeler <COTeijgeler@xxxxxxxxx>
  • Date: Wed, 01 Aug 2001 19:39:04 +0200

Buck,

If you want a similar routine like the MSGDTA on a MSGD, like: "Object &1 
type &3 in library &2 not found" (CPF9801, if I am correct), then I have 
written a little routine that just do that. Unfortunately, I am at home now.

The origin of the routine is a CMD to generate a QRYSLT-parameter for 
OPNQRYF. It requires a base string, a string with values to use as 
replacements and a return string (among other parameters). Hence the name I 
gave it: Replace with Substitution Variables (RPLSSTVAR). An example;

Base string: Object #A type #C in library #B not found
Values      :  QDDSSRC QGPL *FILE
Return       : Object QDDSSRC type *FILE in library QGPL not found

It can deal with varying length and fixed length substitution variables. 
The substitution string can be prefixed with #,$ or @ (if correct) and can 
be  character (26 options) or numeric (9 options), thus a maximum of 105 
different substitutions. Any substitution can be repeated 10 times.

Enough commercial blabla. If you are interested to get the code, drop a 
message.

Regards,

Carel Teijgeler.

>I have a string parsing problem that I'd like to apply some intelligence
>against.  Input is a single string and output is a list of keywords.  This
>is similar to extracting a list of words from a sentence, except that not
>all the words are "interesting".  Further, I am going to perform
>substitutions on the resulting list, replacing the original keyword with a
>variable-length value.
>
>An example:
>GET 1234567890 (~PHONE_NPA~) ~PHONE_EXCH~-~PHONE_NUMB~$DONE$
>will become
>GET 1234567890 (518) 555-1212$DONE$

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.