Home page  
Help >
DDL Command XCHANGE
Version 7.11
DDL Command XCHANGE

XCHANGE

Change all occurrences of "old-token" to "new-token" in the specified definitions in your Application Catalog or your Help Catalog.

Syntax:
                XCHANGE/options [deftype] defname old-token TO new-token ...
                old-token TO new-token

                Notation standards              Options Answers

Options:
                S              -Token is a substring. i.e., Not necessarily surrounded by blanks.
                Q             -Get a Yes/No decision on every proposed change
                X             -Suppress the command response.
                Y             -Do not alter the command answer cells.

Answers:
                Ctl.Ans1                -Number of definitions scanned
                Ctl.Ans2                -Number of definitions in which changes were made
                Ctl.Ans3                -Zero

Notes:
Deftypes are:                       

P - Procedures                      When the deftype argument is mis-
                M - Menus                            sing, all deftypes of the Application
                R - Reports                            Catalog are assumed. If you want to
                S - Screens                            direct XCHANGE to the Help catalog,
                H - Help definitions             you must supply the deftype H.

XCHANGE works exactly like XREF as far as the definition of a token, locating tokens, the use of the S option, and the use of wildcards in the defname argument are concerned. See the discussion of XREF for information about these topics.

                xchange p * city to loc       -Locates every occurrence of the blank
                                                                delimited token city in all of the procedure definitions (and only procedure definitions) of the Application Catalog and replaces them with loc.

Suppose you have written your application using commas as argument separators and list separators, and now you have the need to take it international .
The following XCHANGEs are what you need:

                xchange/sq p * "," to ";"
                xchange/sq r * "," to ";"

These will locate each occurrence of a comma throughout all of your procedures and reports and display each one in a dialog with a YES and a NO button in it. Click YES and the swap is made, click NO and no change occurs.
Be alert. Do not change commas in format override statements.

Copyright © 2019 , WhamTech, Inc.  All rights reserved. This document is provided for information purposes only and the contents hereof are subject to change without notice. Names may be trademarks of their respective owners.