Using DMAP to cope with privately loaded modules pre-explicit support
We use a homemade solution for loading a module into storage. It doesn’t use LOAD, CALL etc.
When I try to map the storage where the module is, with the command
MAP R10%-30 ADATA ALLMESSAGES
z/XDC replies with DBC013E ADDRESS NOT WITHIN ANY MODULE.
I’m not surprised with the message, since z/XDC don’t know about the module.
Is there a way of having the MAP command to do the map without checking if the address is in a module?
From Dave:
You've got what I call a "privately loaded" module. In the current z2.1 release, z/XDC can't find them (but see below). But in the upcoming z2.2 release, we've added code that provides a way for you to tell z/XDC where such modules exist.What you can do is use the DMAP command to load both the Binder map and the csect map as if they were dsect maps. Then you can use the USING command to assign them to the correct storage. That works pretty well.
For the Binder map use DMAP modulename. The trailing period is part of the command and is important. The operand is:
- The modulename,
- Followed by a dot,
- And followed by nothing else.
For csect maps, use DMAP modulename.csectname. In this case, the trailing period is *not* part of the command...
Then use the USING command as follows: USING csectname modulename.csectname.
When referencing field names by the FORMAT command (for example), you need to remember that you now are dealing with two, fundamentally independent, dsect maps. (Not the connected maps created by the MAP command). So you do not use modulename.csectname.fieldname constructs. Instead you use dsectname.fieldname constructs.
For more information, see HELP MAPS CSECTSASDSECTS.
Examples:
FORMAT modulename.csectname+10
This references your csect via a field name from the module dsect map.
FORMAT .csectname+10 [notice the leading dot]
This references the same location, again via a field name from the module dsect map. The leading dot causes z/XDC to search all dsect maps for the given field name. In this case, that field name appears only in the module dsect map. (It does not occur as a field in the csect dsect map.)
FORMAT csectname+10 [notice the absence of a leading dot]
This references the same location, but via the csect dsect map's name (not via a field within any map).
FORMAT csectname.fieldname
This references a field via the csect dsect map.
FORMAT modulename.csectname.fieldname
This is illegal. The two maps are not connected.
For more information about using map symbols in address expressions, see HELP ADDRESSING PARSERS ASM RESOLUTION.
The SET QUALIFIER command is not needed for and does not apply to symbols from dsect maps.
For more information, check out HELP MAPS CSECTSASDSECTS.
IHTH,
Dave Cole