Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file operation question

Status
Not open for further replies.

jmd0252

Programmer
May 15, 2003
667
ok,, I have a file, that comes in thru a SV upload.. It is an inventory file,, ie warehouse number, product code, qty, etc. The inventory is an old S36 system. Yes I know it needs to be rewritten. Nevermind. The inventory file key is warehouse, product, and sequence no. Sequence no being a sequentail counter. But I have to keep the same counter numbers each month, so the comparison report remains accurate. so I have a file by warehouse of the next number in line. The program recognizes new items, and looks to assign the next sequential number. Also keeping track of the number assigned to the item, etc. Problem is,, when I update the warehouse next number file in the program it does not work,,, because the second new item,, gets the same sequence number,, and I have a duplicate key. Is there any way to open and close the file within the code,, and would that solve the problem?? Any ideas??????
 
jmd0252,

You could make the file user controled then open and close the file in the program just before and after using the file. This might be happening due to buffering. Another option is to change the file to have a force I/O of 1. I have had to do that before but don't remember what the actual keyword is.

HTH,
MdngtPgmr
 
MdnghtPgmr,
OVRDBF ... FRCRATIO(1) could be what you're just looking for ?
 
OH OH OH ,, I don't know,,, I'll see what happens later in the day, and let you know.. looks "very interesting"..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top