Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
DEVTYPE—Example 3—Building a Parameter List and Using IHADVA z/OS DFSMSdfp Advanced Services SC23-6861-01 |
|
This example is the same as the previous one, but it uses the IHADVA
macro to map the DEVTYPE output and several unusual techniques to
demonstration the possibilities.
Example 3 of DEVTYPE builds a parameter list in dynamically-acquired
storage so the program can be reentrant. It then supplies additional
parameters in the first execute form and overrides some of them in
the second execute form. In effect, the first specification of DEVTYPE
is:
ILIST1
describes four bytes to be returned at the beginning of a 20-byte
area. The length attribute of the INFO=DASD area is L'DVAIDASD, which
is 16. The constant LenDEVTYPE is the length of the INFO=DEVTYPE area,
which is four bytes. DEVTYPE clears the extra 16 bytes. The list form
at KDTLIST specifies parameters that will not be overridden by the
first execute form. The execute form specifies parameters that are
determined during execution.The DTUsing USING DVAUCBTY,DVAIDASD line is a labeled dependent USING statement. It applies the 4-byte DVAUCBTY DSECT on top of the storage at DVAIDASD. One purpose of the symbol DTUsing could be to allow a later DROP statement to end the addressability but that is not the purpose of the label here. The purpose here is to avoid an assembler warning message ASMA303W. Multiple address resolutions may result from this USING and the USING on statement number nn". It would be on the second labeled USING if it did not have the same label. In effect, the second specification of DEVTYPE is:
The
INFOLIST describes 20 bytes to be returned. The second USING with
the label DTUsing defines addressability to the last four of the 20
bytes. The first 16 bytes have no USING because they are a part of
the DYNAMIC DSECT and already have addressability that is not shown.
This technique of using one DSECT (defined by IHADVA DSECT=YES,INFO=DEVTYPE)
apply to two places in different areas of the program is allowed by
named USINGs without loading another base register.The IHADVA DSECT=NO,INFO=DASD line defines 16 bytes of variables that DEVTYPE sets. The first symbol is DVAIDASD and its length attribute is 16. The DS CL(LenDEVTYPE) line defines variables that are described by the DSECT generated by the IHADVA DSECT=YES,INFO=DEVTYPE line. |
Copyright IBM Corporation 1990, 2014
|