northwest_trail
Member
Hello,
I'm trying to write a modular function that will be used by others. The function takes a datablock number as an integer, opens the datablock, and performs some operation with the data inside. I'd like to make my code good enough where if the user of the function provides an invalid datablock my code will catch the error before issuing the OPN instruction. Is there a way to check if the DB exists before doing the OPN?
Thanks.
I'm trying to write a modular function that will be used by others. The function takes a datablock number as an integer, opens the datablock, and performs some operation with the data inside. I'd like to make my code good enough where if the user of the function provides an invalid datablock my code will catch the error before issuing the OPN instruction. Is there a way to check if the DB exists before doing the OPN?
Thanks.