gtpc2mjqC/C++ Language Support User's Guide

Creating or Updating C Globals on MVS

You must complete the following tasks to create or update C language TPF globals on MVS (steps 1-3 are automated by GLOBHJCL):

  1. Assemble GLOBALS.

    Specify the ADATA option (the cross reference is not required; cross reference information is ignored by the GNTAGH program).

    The SYSADATA file that is produced will be used as input to the GNTAGH program. It may be kept in either a user-catalogued data set (under MVS/TSO), or in a temporary data set used with JCL (under MVS/JES).

  2. Compile and link the GNTAGH program.

    If your installation runs a nonstandard global system in which the attributes of global blocks or areas are different from those defined by IBM, you must:

    1. Modify GLDEFH or GNTAGH as required.

      You must pay particular attention to the array of struct blk_desc called block. This array is defined in the GNTAGH program. Each item in this array describes a global block, and contains the following items, which must be initialized to constant values before compiling the GNTAGH program:

      • Keypointability
      • Subsystem commonality
      • Global area of residence
      • Global block name
      • Number of keypointable records if a directory block.

      The remainder of structure members are initialized at program run time and will be overwritten if initialized.

    2. Recompile the GNTAGH program.
  3. Run the GNTAGH program directly under TSO or by submitting a job to the job entry system (JES).

    The HLASM SYSADATA output data set must be associated with the DD name INFILE.

    Use ACP.CHDR.RELvv(C$GLOBZ) for the DD name OUTFILE. Because the GNTAGH program has no DCB information coded for this file, you must provide it. The DCB information is required on either the JES3 DD JCL statement or in the TSO ALLOC statement. The following DCB specification is recommended:

        DCB=(RECFM=F,LRECL=80)
    
  4. Verify that all tagnames that are listed as keypointable in the c$globz.h header file are actually keypointable. (The GNTAGH program cannot determine if certain TPF globals are keypointable, so the program assumes that they are.) Change all tagnames that are not correct.
  5. Include the c$globz.h header file in all of your C functions and programs that require access to TPF globals. Sample C$GLOBZ output is shown in Sample Output.
  6. Recompile all C programs that refer to, either explicitly or implicitly, the c$globz.h header file. (This is not necessary if you have been careful to ensure that global field displacements, lengths and characteristics have not been impacted or changed by the updates.)

    If any of a global tagname's attributes change, you need to reconstruct the c$globz.h header file so that C functions are accessing the new information.

    You must also recreate the c$globz.h header file whenever any of the following events occur:

Figure 3. Creating C Language Global Tagnames