Aceofdelts
400 pts. | Sep 16 2009 3:55PM GMT
You could also create a 2nd data area for the S/36 pgms.
Easiest if separate voucher number range.
Else, your quick pgm locks the main dtaara and loads that value to the S/36 dtaara. The S/36 pgm just uses the 2nd data area naturally. At EOJ, it calls the quick pgm to update the main voucher # and unlock the main dtaara.
This gets messy if you can have multiple S/36s doing this concurrently.
Yorkshireman
3200 pts. | Sep 21 2009 2:53PM GMT
Use ALCOBJ the data area *EXCL before you call the 5360 procedure, and DLCOBJ the data area when it returns.
or a variation on providing the lock - you may want to allow read access.
Damsonfly
10 pts. | Sep 21 2009 7:45PM GMT
Not sure how your programs are structured and at what point in time everything is happening. Here is another suggestion.
a) Leave your quick program open i.e don’t let it close with an end until other program finishes. This should keep it locked.unfortunately it means no one can get a new voucher number until the end.
b) in the quick/sub Lock the data area. extract the last Vno, increment it and write new number immediately to the data area. Then pass the the new Vno via parameter to other pgms.
Are there still S36’s out there. I thought everyone had upgraded.






