gtpc2mjtC/C++ Language Support User's Guide

GNTAGH Program Logic Flow

Open INFILE DD (GLOBALS LISTING) for read-only operations.

Open OUTFILE DD (C$GLOBZ H) for write-only operations, destroying any existing copy of the file.

Open a scratch file for global symbols and their attributes.

Using SYSADATA SOURCE records:

  1. Locate COPY SYNLST statement in macro expansion, then obtain names and slot numbers for all synchronizable fields and records.
  2. Locate GLOBZ REGR= statement in open code, note line number.
  3. Locate GLOBZ REGS= statement in open code, note line number.

Using SYSADATA SYMBOL records:

  1. Locate all of the global block names, defined in the "block" array.
  2. For each symbol beginning with an at sign (@),
    1. Convert all occurrences of the "at" sign (@), "pound" sign (#) or "dollar" sign ($) in the tagname to underscores (_), and all uppercase letters to lowercase.
    2. Call function "skip_this_tag", passing the converted tagname, to determine if the tag should be excluded.
    3. For each non-excluded tagname, write a record to the scratch file including the tagname, its displacement, the line number in which it is defined, its length attribute, and a flag indicating whether or not it is relocatable.

Rewind the scratch file:

For each global tag record in the scratch file:

Close files and summarize execution statistics.