On Mon, 8 Sep 2014 14:02:17 -0700, Janet Graff wrote:

>I have it working now but I have to say, examples of calling dynalloc() from C 
>code using text units is a decidedly badly documented interface.
>
>For anyone who attempts this in the future, here is a sample, this subroutine 
>takes a char * containing the intended ddname like, "DD:LOG000001".  It must 
>remove the "DD:" before calling dynalloc()/dynfree(). The RBX is what allows 
>the IKJ messages to be printed to the JESYSMSG (which is really handy).  Note 
>that the DUNSPIN text unit is only useful on the dynfree() call and will give 
>an error (900) if specified on the dynalloc() call.  Some of the parameters I 
>have specified on the dynfree are probably unnecessary but I left them there 
>for documentation purposes.
>
>By the way this line
>
>     ip.__miscitems = &miscitems;
>
>gets a compiler warning for imcompatible pointers.  Anyone who can tell me how 
>to cast this properly I'll be very grateful.
> 
I've been able to do similar with (untried in this case):

   *  ( int ** ) & ip.miscitems = &miscitems;  /* Try casting on the left.  */

    ...
>     int miscitems[2];
    <snip> Yow!
> 
If you can possibly use it, the null-terminated string interface to BPXWDYN may 
be
more friendly; build the string with snprintf();

*And* the implementation of BPXWDYN outpaces the documentation, whether
for overworked writers or poor communication between development and  pubs.
EXPDT mentioned earlier may be a case in point.  The best you can do is browse
the load module and search for key strings that might be useful (but possibly 
not
supported.)

-- gil

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

Reply via email to