USR2021N with ALC-DCB-DDNAME

Does anyone have experience using USR2021N under MVS to create a new dataset (using allocate), copying the DCB from an existing dataset using the ALC-DCB-DDNAME field? I tried it, and it didn’t seem to copy the DCB - the created file had a RECFM of ? and LRECL/BLKSIZE of 0.

Just tested on NAT427, works just fine.

When recfm/lrecl/blksz are explicitely specified they are used even when
ALC-DCB-DDNAME is set, when recfm/lrecl/blksz are blanked out in the PDA
the values from ALC-DCB-DDNAME are substituted.

Thanks, Wolfgang, that’s good to know.

After further testing …

If I read the model work file, then create the new work file modeled after the old work file, it works (the DCB is copied correctly). This works even in the model work file is empty.

If I don’t read the model work file, the DCB info doesn’t copy.

– Murray

You don’t need to read it, just use USR2021N to allocate it SHR.

   Wolfgang

Uh, that’s what I did, and it didn’t work … until I added the READ WORK FILE.

There may be some odd reason why this works differently at your installation but not mine, but the workaround is pretty easy so I’m not going to worry about it.

Thanks,

– Murray

In which environment are you running this ?

Batch, COM-PLETE, TSO, CICS, … ?

In batch. But the same thing happens in CICS.

Ok, let me try in batch, I used TSO, which should basically be the same but ya never know :wink: