In a typical batch job, all temporary datasets are allocated to system generated ddnames that look like SYS00098. Is there a built in function you can call in REXX, either batch or interactive, that will return you a unique ddname not in use in the current job/environment ? I know I could try to write a simple function that would return a random string of numbers I could append to the SYS prefix and check if it's in use but I was wondering if it's already built in and I've never found it.
Thanks.