Skip to Content
Former Member
Aug 22, 2012 at 03:57 PM

Restricting number of prints per day, parallel mode



I have a certain requirement of restricting the number of prints of a certain correspondence for each day.

I have resorted to providing the expected print date in the LAUFD field of the print request in DFKKCOH and when printing, use this filter to decide if it is to be printed on the given day. This part is fine.

My problem arises when I am creating the print requests using FKK_WRITE_CORR through a multi-threaded program. Say suppose the number of allowable prints for each day is 50K, the LAUFD of the requests get populated with the date till the count of such entries reaches the limit and then is to move onto the next day. However, being a parallel process, each thread checks individually if the limit is reached for the day in DFKKCOH. So now, if i actually can accomodate just one more print request for the day in DFKKCOH, all threads think they can push in their entry and i end up crossing the limit.

Can you please suggest how to get over this trick?

Is there a way i can make the process have a kind of 'read lock' on the DFKKCOH entries count? Or may be create all the entries through the parallel process keeping LAUFD blank and then have a continued process of filling in the date picking on the ones just created?

Thanks in advance for any replies,