On Tue, 31 Mar 2020 12:20:27 -0400, Bob Bridges wrote:
>
>    ...  So such a REXX is updated to say "if I'm running in batch, look for 
> this DD name; otherwise use this DSN".  ...
>
How do you tell?  PARSE SOURCE will distinguish IRXJCL and OMVS, but
TSO, IKJEFT01, and Edit are ambiguous.  Why, why do macros start with
TSO rather than the more useful ISREDIT?

Too often I find myself coding:
    ADDRESS ISREDIT
    TRACE OFF
    MACRO (PARM)
    IF RC<>0 then PARSE ARG PARM
        ...
For TSO, I rely when I can on BPXWDYN( 'ALLOC RTDDN(...) ...' ) to avoid
conflict with DDNAMEs in other threads.  (Choosing a random DDNAME
is *so* 20th century.)


>-----Original Message-----
>From: Charles Mills
>Sent: Monday, March 30, 2020 21:53
>
>Your JCL now looks like  
>
>  // EXEC PGM=MYPROGRAM or perhaps PGM=MYPROGRAM,PARM='target.dataset'
>  //SYSIN    DD DSN=parmlib(mbr),DISP=SHR
>  //SORTIN   DD DSN=*.prev.prev,DISP=(OLD,DELETE)
>  //SYSPRINT DD SYSOUT=*
>
>The job does not inherently tie up target.dataset. But your program would have 
>to deal with what to do if target.dataset were not available. Wait a little 
>while and try again? Repeat how many times?
>
>Make sense?
>
But a deadlock can still result if two jobs rely on that technique, or
one on static and the other on dynamic allocation with retry.  For
that reason, S99WTDSN requires AC=1, presuming a programmer
with such authority is smart enough to deal with the consequence.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to