Kbase P48624: How to get a list of all global variables defined in an appl
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  17/10/2003 |
|
Status: Unverified
GOAL:
How to get a list of all global variables defined in an application using 4GL?
FIX:
There is no native 4GL function or method that would return a list of all GLOBAL variables defined in an application. However, a listing of these variables may be obtained by writing a UNIX script or by writing some 4GL code that would actually parse through all the source code of the application, file by file, and extract such a listing. The following is a sample pseudo code for such a procedure:
1. Form a comma separated list of all the 4GL application source code file names using INPUT FROM OS-DIR loop(s).
2. Parse each file for lines of code containing DEFINE GLOBAL and VARIABLE using the INPUT FROM FileName statement and the INDEX or LOOKUP function.
3. Extract the variable name from lines meeting the conditions set in step 2 above rejecting duplicates.