On Thu, 2 Sep 2021 18:37:28 -0700, Sri h Kolusu wrote:

>> I have used
>>
>> //SORTIN  DD  DSN=&&X,DISP=(OLD,PASS)
>> //SORTOUT DD  DSN=&&amp;X<DISP=(OLD,PASS),VOL=REF=*.SORTIN
>
>Clark Morris,
>
>Please don't ever do that with a COPY operation. 
>
It might appear to work in a small test case where the data don't
exceed a single block then fail spectacularly in a larger production job.

At times when I want to overwrite SYSUT2 if the data set exists but
create it if it does not, I have used:

    //HANDLE   DD    DISP=(MOD,CATLG),DSN=&SHSUID..Q2.Q3,
    //             UNIT=SYSALLDA,SPACE=...
    //SYSUT2   DD     DISP=SHR,DSN=*.HANDLE,VOL=REF=*.HANDLE

Alas, referbacks work only in batch JCL.

-- gil

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

Reply via email to