GDDM V3R2 Base Application Programming Reference
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Copying the application data structure into the program

GDDM V3R2 Base Application Programming Reference
SC33-0868-02



When you have finished the map definition and generation processes, you will have an application data structure for each map, each having the same name as the associated map. You can copy these application data structures into your application program, if it is a COBOL or PL/I program.

For an Assembler program, you must include macro instructions in your program having the same names as the maps. These expand into DSECTs at assembly time.

An example showing the code that might be used for a COBOL program is given below. For illustration, assume that there is a page that is constructed from three separate maps named HEADER, DATAREC, and TRAILER. The maps belong to a mapgroup called MAPGRP.


     01 HEADER.
        COPY HEADER.
     01 DATAREC.
        COPY DATAREC.
     01 TRAILER.
        COPY TRAILER.

Note: As part of the application structure declaration, GDDM-IMD generates a declaration of a variable with name "mapname-ASLENGTH" (COBOL) "mapname_ASLENGTH" (PL/I) that is initialized with the length, in bytes, of the application structure. This variable can be used as the length parameter in MSPUT and MSGET calls.

Subtopics:

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012