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



Joel

There is now a %scan builtin function - if you are at v7.1. You could still use QCLSCAN, too - and write your own. Once you find the location of &ENVR, you can use %SST to get the part before it and the part after it and put TEST or PROD in between.

That's the hard way. RPG is much better at this. So is a thing called REXX - easily called from CL.

I'm hoping IBM comes out with a %replace, too, for CL.

Vern

----- Original Message -----
For the purpose of describing the operating environment state (DEV, TEST, or PROD).

I want to call

SET_ENVR ('text or network path or email address goes here &ENVR4 and more text')

And have the CL named SET_ENVR change the text "&ENVR4" to TEST when the environment is a test environment (or PROD for production environment).

I am using the TAATOOL "SCNVAR" to locate the string of interest.

Is there a "replace" function in CL or TAATOOL or elsewhere that would help accomplish this?



End result:


SET_ENVR (jde_&ENVR_report@xxxxxxxxxxxxx) will result in the following if run from a test LPAR:

jde_TEST_report@xxxxxxxxxxxxx


If run on a production LPAR, the environment would resolve to:

jde_PROD_report@xxxxxxxxxxxxx


Thanks!



______________________________________________________________________
This outbound email has been scanned for all viruses by the MessageLabs Skyscan service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.