User command in @key processing
James Flanagan
James at Flantec.com
Mon Aug 13 11:23:26 PDT 2018
Ken,
Ah, that actually sounds familiar. The deja vu I got from your answer tells me I might have already submitted a similar issue to the group. Anyway, that is precisely what I needed. Thank you very much,
James Flanagan
Flantec.com <http://flantec.com/>
email: James at Flantec.com <mailto:James at Flantec.com>
mobile: 760-458-8498
home: 219-221-6219
text: 7604588498 at txt.att.net <mailto:7604588498 at txt.att.net>
Skype: Flantec
ichat: James at Flantec.com <mailto:James at Flantec.com>
home: 1901 Cidermill Road
Michigan City, IN 46360
> On Aug 13, 2018, at 2:15 PM, Kenneth Brody via Filepro-list <filepro-list at lists.celestial.com> wrote:
>
> On 8/13/2018 2:02 PM, James Flanagan via Filepro-list wrote:
>> Filepro 5.8.01.06D6
>
>> Redhat Exnterprise 6.8
>> /bin/test_script
>> echo 23
>> Input processing
>> ::end:
>> ::’:
>> @keyx::’:
>> ::aa(2,.0):
>> ::user xxx = /bin/test_script
>> ::aa=xxx:
>> ::msgbox aa:
>> ::end:
>> The first iteration of this code, when hitting the “X” key works and the
>> msgbox contains “23”. Every subsequent time, however, the msgbox is
>> blank.
>> I found the following in the manual, but I am not quite certain that this
>> is the issue. IMPORTANT: When reading from a user program, filePro Plus
>> executes the program only once, not over and over. Therefore, make sure
>> the user program itself loops until it reaches an end-of-file.
>> Can input processing keep re-running a user command each time in @key
>> processing, however many times the key is pressed for a given record.
> If you want filePro to restart the user program, you'll need to CLOSE it from within filePro.
>
> user xxx = /bin/test_script
> aa = xxx
> close xxx
> mesgbox aa
>
> Or, better yet, have the script loop, and have filePro send it something every time you want to read from it:
>
> Script:
>
> while read junk
> do
> date
> done
>
> Processing:
>
> user xxx = /bin/test_script
> xxx = "" ; aa = xxx
> mesgbox aa
>
> --
> Kenneth Brody
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus <https://www.avast.com/antivirus>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com <mailto:Filepro-list at lists.celestial.com>
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list <http://mailman.celestial.com/mailman/listinfo/filepro-list>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20180813/c6ec28ed/attachment.html>
More information about the Filepro-list
mailing list