Hi All

I understand the module above is used to allocate datasets on the fly without having to change JCL’s.
My question is, is there something that can check if a dataset has already been allocated before continuing to the module above ?

Thanks for the help in advance.


Hi Byron,

For this you can also use USR2010N. This is my experience with this routine:

If you try with ALC-DISP1 := ‘OLD’
VALUE H’1708’ /* if dataset does not exist
VALUE H’0410’ /* if alloction already exists

Hope this helps.

Sorry, typo - this should of course be “USR2021N”.

Hi Morgen

Thanks I thought as much about the typo.
Could this also work if we are trying to see if VSAM dataset is available and if not to then use the same USR2021N ?

Thanks again for the assistance

Hi Byron,

Sorry, but I’ve no experience using this against VSAM files. :frowning: