Dave,

You may need to ask for a new allocation.  Reuse rules are tangled and do not 
always work as expected - don't remember all the details off hand but the doc 
does provide some info.

s99rbptr->s99flg11 |= S99NOCNV;

Not assembler but I think you understand it. :-)

Not sure I would use release TU unless requested.

...chris.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Thomas David Rivers
Sent: Friday, August 05, 2016 6:21 PM
To: [email protected]
Subject: Some confusion about SVC99, DALRTDDN and existing allocations.

Trying to write a program that lets the system do a DYNALLOC (SVC99) and hands 
me back the system-assigned DD name to use in the DCB for an OPEN via the 
DALRTDDN text-unit in the SVC99.

In this case; I'm actually trying to point to a PDS and will be reading a 
member.

This is well and good; works great if I don't have that PDS allocated to 
another DD; DYNALLOC hands me a wonderful SYSnnnn DD name which I plop down in 
the DCB, do the OPEN and a FIND and read the member.

However...

If I'm under TSO; and I allocate another DD to point to my PDS, with,
say:

  ALLOC DA(MYDD) DS(MY.PDS) SHR

then when my program does the DYNALLOC (SVC99) the DD name I get back in the 
DALRTDDN area is 'MYDD' (not the expected SYSnnnnn.)

Furthermore; the return code (R15) from DYNALLOC is 0, and the values of 
S99EERR and S99EINFO in the S99RBX are zero as well; and I've verified that the 
S99RBX is correctly being addressed from the S99RB.

My program then proceeds to do an OPEN with that DD; which works fine
(RC=0.)

It then proceeds to do a FIND which returns with a return-code (R15) of 8 and 
reason-code (R0) of 8.

The Text-Units I'm using on the DYNALLOC are:

   DALRTDDN (X'0055')
   DALDSNAM (X'0002')
   DALSTATS   (X'0004')  with a value of X'08'  (SHR)
   DALNDISP   (X'0005')  with a value of X'02'   (CATALOG)
   DALRLSE     (X'000D')


My questions are:

  Why would DYNALLOC hand me back a DD name from a different allocation  in the 
DALRTDDN area, instead of making up a new one?

  Furthermore, why would DYNALLOC hand me a DD name that can't work  and give 
me a return code 0, with all the fields in the S99RB _and_ S99RBX  also 
indicating 0?  DYNALLOC clearly thinks this is a find DD name to use;  so why 
can't it use it?

  Could my superfluous specification fo CATALOG and RELEASE be causing  the 
problems?

   - Many thanks for any helpful pointers -
      - Dave Rivers -

-- 
[email protected]                        Work: (919) 676-0847
Get your mainframe programming tools at 
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.dignus.com&d=CwICAw&c=UrUhmHsiTVT5qkaA4d_oSzcamb9hmamiCDMzBAEwC7E&r=RI5WP1BN1KW_B4HrO2twbFFOhk97OdY6xsy0TwKReZE&m=MIgzZ5NoP2xi4t6540GWs1kHIWIyp-BeTF8NRQoy-F0&s=aVBulGqJ6LS1pS1t6CqRsWrojlUuyILA2Oz_xmkCVHk&e=
 

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

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

Reply via email to