We enter in vouchers from a variety to locations. All of the voucher entry programs are written in RPG IV and use a Data Area to get the next voucher, update the data area using lock in/out. This all works very well.
We have an older S/36 program that populates Employee Expenses into the voucher system. (usually this process creates a few hundred vouchers)
Here's my problem: 1st the System 36 program can't use the data area. So I created a File and a quick program to lock in the data area and populate the file with the last voucher. The problem is once I leave the quick program my data area is no longer locked (and this S/36 program could take up to 5 minutes to run) I can't have duplicate voucher numbers.
Software/Hardware used: as400 s36 rpg II program data area