rreport gagging on lockfile
Tyler
tyler.style at gmail.com
Wed Feb 3 08:04:17 PST 2010
Since we deleted the lockfile it hasn't repeated the problem, so can't give
the exact error message yet.
On Tue, Feb 2, 2010 at 6:37 AM, John Esak <john at valar.com> wrote:
> That's why I was looking for the exact way you launch this stuff. Maybe
> you
> put it in the last note... I'm not sure.
>
I did, but here is a slightly expanded version.
It is almost always called via a script entry like this:
ARGPM="file=none;processing=none;qualifier=hh;script=importship;user=$LOGNAME;note=none;status=COMPLETED"
/appl/fp/rreport log_operations -fp log_it -sr 1 -r $ARGPM -h "Logging"
or from a SYSTEM call in processing that looks pretty much the same
m="file=invhead2;processing=postFedex;"
m=m{"qualifier="{@QU{";script=none;user="{@ID{";"
m=m{"note=none;status=STARTED"
system "/appl/fp/rreport log_operations -fp log_it -sr 1 -r '"{m{"'"
FYI, there is no automatic processing at all.
Incidentally, how do you do a lookup to a "random" record to keep it from
> "hogging" the file. Is it possible you are getting the record you are
> standing on... Which actually is possible to get in "write" mode because
> filePro knows you are the user doing the lookup. This might be causing the
> hassle. I'm curious if you actually use RAND or what? The way I normally
> do what I think you're doing is do a lookup free, write that record... Grab
> the record number, then do a lookup - to that record number. When the
> process is done, delete that record. It has always been the cleanest way
> for me.
>
I shouldn't ever get the record I'm standing in (#1). Like I said, this has
run perfecting for years so it's surprising it bombs out now; I believe the
problem is environmental. Given that deleting the lockfile appears to have
alleviated the problem, I'm in fact sure of it. Regardless, here's the
code. It's one of my first filePro programs, actually.
:'##############################################################:'log_it,
output only processing for log_operations.:
:'Tyler Style:'10/05/05:
:'Generic utility for creating a log file for an operation.:':
:'##############################################################::
:':':
:'##############################################################:'VARIABLES
- START:
:'@PM contents; current field name; current field value:ba="" ;
bb(32,*) ; bc(75,*):
::'---temp-------------------------------------------------------:
::i(6,.0); j(6,.0); bd(32,*); d(8,mdy/); t(8,time):
:'VARIABLES -
END:'##############################################################:
:':':
:'##############################################################:'REPORT -
START:
::debug on:
:@RN eq " 1":i=MOD((RAND("-1")),"179")+"1"; d=@TD-i; t=@TM+i:
:@RN eq " 1" '''move off of 1st record to random record to
prevent file locks:lookup - k=(d&t) i=C -ng:
:@PM eq "":gosub askit 'get operation details from user:
:@PM ne "":gosub getit 'get operation details from passed string (@PM):
rend:::
::end 'report:
:'REP0RT -
END:'##############################################################:
:':':
askit:'==============================================================:'Get
operations log details from user:
:' IN n/a::
:'OUT n/a::
::system "/appl/fp/rclerk log_operations -lx -m"<@qu<"-n -s1 -xe -xa -r
CALLED":
raskit:::
::return 'askit:
getit:'==============================================================:'Get
operations log details from @PM:
:' IN n/a::
:'OUT n/a::
::ba=@PM; i=INSTR(ba,";"):
::lookup log = log_operations r=free -e:
::log(5)=@TD; log(6)=@TM:
loop01s::'---iterate thru fields & values in string:
:i le "0" and ba eq "":goto loop01e:
:i le "0":bb=ba; ba="":
:i gt "0" 'seperate out nam/value pair:bb=mid(ba,"1",i-"1");
ba=mid(ba,i+"1",DLEN(ba)):
::j=INSTR(bb,"="):
:j le "0":goto loop01n:
::bc=MID(bb,j+"1",DLEN(bb)); bd=MID(bb,"1",j-"1"); bb=bd:
:@PZ eq "DEBUG":show "@"{bb<bc:
:bb eq "" or bc eq "":goto loop01n:
:bb eq "file":log(1)=""{bc{"":
:bb eq "processing":log(2)=""{bc{"":
:bb eq "qualifier":log(3)=""{bc{"":
:bb eq "script":log(4)=""{bc{"":
:bb eq "user":log(7)=""{bc{"":
:bb eq "note":log(8)=""{bc{"":
:bb eq "status":log(9)=""{bc{"":
loop01n::i=INSTR(ba,";"); goto loop01s:
loop01e:::
rgetit:::
::return 'getit:
> Also, let me re-trace back to the previous paragraph . You mention having
> the file open with report on one screen and then clerk locks on another.
> The
> report on the first screen does have the -u on the command line, right?
> Otherwise, the clerk should rightfully be locked out.
>
No, there is no -u on the command line. I should be able to at least start
up rclerk using the file and I can't, I get the message that output
processing is running and kicks me out immediately back to the command
line. I can access other files while reports are running (tho obviously not
update records), so I should be able to at least run rclerk.
Tyler
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.celestial.com/pipermail/filepro-list/attachments/20100203/737b9361/attachment.html
More information about the Filepro-list
mailing list