> Isn't that effectively part of what Metal C does for a living?

Good thought. I wondered about that. I probably should have tried that before 
posting the question.

But no, unfortunately, it does not seem to do that. It "absorbs" the struct and 
just generates absolute offsets.

Long story short, I used (just for play) my C struct that maps the CVT. Given 
the following (admittedly nonsense) C code

#include "zOScvt.h"          
void foo()                   
{                            
   struct cvt *cvtPtr;       
   static int bar;           
   cvtPtr = (struct cvt *)16;
   bar = cvtPtr->cvtdate;    
   bar++;                    
}                 

The Metal C compiler generated

*    bar = cvtPtr->cvtdate;                               
         L     14,56(,14)              (*)cvt.cvt.cvtdate 
         ST    14,@6bar                                   

and no DSECT.           

Charles

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Tony Harminc
Sent: Sunday, March 20, 2016 9:23 PM
To: [email protected]
Subject: Re: C struct to DSECT utility?

On Mar 19, 2016 3:23 PM, "Charles Mills" <[email protected]> wrote:
>
> Off the wall question: IBM ships EDCDSECT, which will convert an 
> assembler DSECT (actually, the ADATA from assembling a DSECT) to a C struct.
>
> Is there anything, or combination of things, that will go the other 
> direction? Convert a C struct into a DSECT?

Isn't that effectively part of what Metal C does for a living?

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to