Update F00022 In Table IO


Legendary Poster
Hi folks,

I have a BSFN that needed to generate SHPN REFN #
It had a counter which increments and resets every day.

I have a record on F00022 with the key F554901 and I update F00022 back to 001 myself everyday.

For some reason this has stopped working. Am I safe to update this table myself or do I need to perform some fancy pants DB locking myself before the update? I notice the BSFN X00022 opens the table in a certain mode, maybe to lock it for update?
Would a delete and insert do the trick?

Or should I use this baby? B8900022

I notice this in the X00022

/* SAR 7055493 - Changed parameter 5 in JDB_OpenTable call from'0' to '2' to prevent
creation of additional Oracle connections. */
/* FP */
JDBReturn = JDB_OpenTable( hUser, szTableID, IndexID, (NID *) szColumnID,
(ushort) 2, (JCHAR *) _J('\0'), &hRequest ) ;
/* SAR 7055493 End */
Last edited:


Legendary Poster
Hi John,

My take is to use Next Numbering when I need to increment & save the number.

I might have gotten it wrong, but it looks like you do not necessarily need to save it; you could just reset your number to 001, and increment it on each run.
Does that make any sense?