Set the S99NOCNV bit on in the S99RB and it will work like you want it to.

In SYS1.MACLIB(IEFZB4D0):

S99RB    DSECT                         REQUEST BLOCK
...
S99FLG11 DS     CL1                    FIRST FLAGS BYTE
...
S99NOCNV EQU    X'40'                  ALLOC FUNCTION-DO NOT USE AN  
*                                      EXISTING ALLOCATION TO SATISFY
*                                      THE REQUEST

Bill

On Fri, 5 Aug 2016 21:20:36 -0400, Thomas David Rivers wrote:

>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 -
>

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

Reply via email to