<div> Thanks for the suggestions guys - I will try those</div>
<div> I do already have a process that kills all users & processes at night so it's not locking on</div>
<div> records - I'm just not sure what's causing this all of a sudden.</div>
<div> This cron script has been running for years (since about 1999) without incident - but starting</div>
<div> in August sometime, it has issues 3-4 nights a week -- very strange.</div>
<div> I haven't changed anything - but their company is growing and there are a lot more users</div>
<div> and input, and everything going on - so perhaps it's just 'growing pains' and they are now</div>
<div> encountering problems - I'm not sure </div>
<div> I will try redirecting stdout & stderr to a file and see if that captures what's going on</div>
<div> </div>
<div> The main concern I have is there might be lookups going on that can't find what it needs</div>
<div> and perhaps the processing wasn't written properly, etc</div>
<div> </div>
<div> Am I correct in saying that if a lookup is performed and a record is not found, as long as the</div>
<div> processing is written as</div>
<div> </div>
<div> If:</div>
<div> Then: lookup cli <client file>.....</div>
<div> </div>
<div> If: not cli</div>
<div> Then: return</div>
<div> </div>
<div> Then filepro shouldn't get hung up if it can't find something, right?<br><br> </div>
<div><span class="gmail_quote">On 10/10/07, <b class="gmail_sendername">Brian K. White</b> <<a href="mailto:brian@aljex.com">brian@aljex.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>----- Original Message -----<br>From: <a href="mailto:scooter6@gmail.com">scooter6@gmail.com</a><br>To: Filepro List
<br>Sent: Wednesday, October 10, 2007 5:18 PM<br>Subject: deleting blank records & error capture<br><br><br>Running 5.06.09 on Unix --<br><br>Two questions I have --<br><br>> 1) first - We have a temporary file where new input gets put in
<br>> and a night process that copies that data into the 'big' master file<br>> how do I delete the 'blank' records that get created in this temp file?<br><br>Just have the process that copies the records also delete them.
<br>The disk space is not freed, but so what? The record is freed in that it<br>will just get filled again tomorrow night. Say you get 1000 records in every<br>night. Do you really care if the key file shrinks to the size of 1 record,
<br>grows to the size of 1000 records and shrinks back to 1 over and over every<br>day, or just stays the size of 1000 all the time? In reality the file will<br>bump up and get larger once in a while whenever your import is larger than
<br>usual, but it doesn't grow and grow every day in a scenario like you<br>described, so unless you get truly stupendous amout of incoming records once<br>in a while and don't want the file to be 2 gigs all he time when usually it
<br>only needs to be 20 megs, I think there is nothing to fix here as long as<br>you are using the processing delete command on each record after processing<br>it.<br><br><br><br>> 2) I have a big night time process that runs
<br>> that has been getting stuck on certain parts<br>> I have a script that runs all these processes<br>> and I have a log that tells me when each individual process starts<br>> so I have an idea where it's getting stuck
<br>> but it's getting stuck on different processes randomly<br>> how can I set the cron job on a Unix box where it will capture<br>> the error messages that filePro is encountering?<br><br>If you don't redirect stdout & stderr, they will get collected and emailed
<br>to root.<br><br>Or, you can rdirect stdin, out & err all to one of the unused console tty's<br>and flip to that screen when you come in in the morning, or use doublevision<br>to view that tty any time from anywhere.
<br><br>crontab -e<br>30 2 * * * myscript </dev/tty12 >/dev/tty12 2>&1<br><br>Then hit Alt-F12, or Ctrl-Alt-F12 if the console was in X (the scologin<br>gui).<br>You can flip to that screen any time before during or after the cron job
<br>runs. It will just be black before, and will be inactive, but with the last<br>output of the script on it, afterwards if the script completed normally. If<br>the script hun and is waiting for user input, then the screen will still be
<br>active, the script will still be running and you'll be able to interact with<br>it and supply whatever user input it's expecting.<br><br>If it's just hung on locked records (pretty common)<br>then you can set 2 environment variables in the script before any
<br>clerk/report commands<br>PFMBTO=1 ; export PFMBTO<br>PFSKIPLOCKED=1 ; export PFSKIPLOCKED<br>That will cause fp to proceed past most common halts.<br>Though beware, only you can say if skipping locked records is ok for the
<br>reports in question!<br>Consider: Your process is cycling through the days invoices, and needs to<br>lookup into the customer file for each one, and someone went home with your<br>biggest customers account open on their screen in update mode, and so that
<br>lookup fails on most of the invoices for that the day as if there were no<br>such customer...<br><br>The proper fix might be to somehow ensure that all users or at least all<br>filepro processes are out of the system before starting the script. A cheap
<br>way to start might be to use the idleout utility in sco. just type "idleout<br>120", and until the next reboot, any tty that sits idle for 2 hours will be<br>killed. If everyone usually goes home by 8pm and the script doesn't run
<br>until midnight, this might clear up most of the problem most of the time.<br><br>I would not set those variables first or use idleout at first, but see what<br>the captured messages indicate first. It may be something completely
<br>unrelated to locked records.<br><br>Brian K. White <a href="mailto:brian@aljex.com">brian@aljex.com</a> <a href="http://www.myspace.com/KEYofR">http://www.myspace.com/KEYofR</a><br>+++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
<br>filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!<br><br>_______________________________________________<br>Filepro-list mailing list<br><a href="mailto:Filepro-list@lists.celestial.com">Filepro-list@lists.celestial.com
</a><br><a href="http://mailman.celestial.com/mailman/listinfo/filepro-list">http://mailman.celestial.com/mailman/listinfo/filepro-list</a><br></blockquote></div><br>