> -----Original Message-----
> From: IBM Mainframe Assembler List
> [mailto:[email protected]] On Behalf Of Frank Swarbrick
> Sent: Monday, August 06, 2012 11:58 AM
> To: [email protected]
> Subject: length of DSECT
>
> I always want things I can't have...
>
> Given the following:
>
>
> ABC      DSECT ,
> HALFWORD DS    H
> FULLWORD DS    F
> DBLWORD  DS    D
> ABC_LEN  EQU   *-ABC
> BASIC    CSECT ,
> T1       DS    CL(L'ABC)
> T2       DS    CL(ABC_LEN)
>                                Ordinary Symbol and Literal
> Cross Reference
> Symbol   Length   Value     Id    R Type Asm  Program   Defn
> References
> ABC           1 00000000 FFFFFFFF     J                    1
>   5    10
> ABC_LEN       1 00000010 FFFFFFFF A   U                    5
>   9
> BASIC         1 00000000 00000001     J                    6
>  17    69    70
> T1            1 00000000 00000001     C  C                 9
> T2           16 00000001 00000001     C  C                10
>
>                                                 Dsect Cross Reference
> Dsect     Length      Id       Defn
> ABC      00000010  FFFFFFFF       1
>
>
> L'ABC gives me 1 (one) rather than what I want, 16 (10h).  Is
> there any symbol or whatever I can use that returns me the
> same length value of a Dsect that is listed in the Dsect
> Cross Reference report?
>
> Thanks,
> Frank

If you want L'ABC to be anything other than 1, you can't:

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ASMR1020/5.20
<quote>
If symbol denotes an ordinary symbol, the ordinary symbol identifies the dummy 
section. If several DSECT instructions within a source module have the same 
symbol in the name field, the first occurrence initiates the dummy section and 
the rest indicate the continuation of the dummy section. The ordinary symbol 
denoted by symbol represents the address of the first byte in the dummy 
section, and has a length attribute value of 1.
</quote>

In the above, you'd use ABC_LEN as a self-defining term.

   MVC ABC(ABC_LEN,base-reg),ACB_INIT


On thing that I do to guarantee that the length of ABC and ABC_INIT are exactly 
the same length is like:

ABC DSECT
...
ABC_LEN EQU *-ABC
...
csect CSECT
ABC_INIT DS 0D
...
ABC_INIT_LEN EQU *-ABC_INIT
VAL_ABC_INIT DS (ABC_INIT_LEN-ABC_LEN)C #Should be 0
VAL_ABC      DS (ABC_LEN-ABC_INIT_LEN)C #Should be 0

If ABC_LEN is not equal to ABC_INIT_LEN, then one of the two above will have a 
negative repetation count and will cause a assembler error.





--
John McKown
Systems Engineer IV
IT

Administrative Services Group

HealthMarkets®

9151 Boulevard 26 . N. Richland Hills . TX 76010
(817) 255-3225 phone .
[email protected] . www.HealthMarkets.com

Confidentiality Notice: This e-mail message may contain confidential or 
proprietary information. If you are not the intended recipient, please contact 
the sender by reply e-mail and destroy all copies of the original message. 
HealthMarkets® is the brand name for products underwritten and issued by the 
insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance 
Company®, Mid-West National Life Insurance Company of TennesseeSM and The MEGA 
Life and Health Insurance Company.SM

Reply via email to