getenv - unix - fp 5.0.13

Enrique Arredondo henry at vegena.net
Wed Mar 10 13:18:30 PST 2004


----- Original Message ----- 
From: "Bob Stockler" <bob at trebor.iglou.com>
To: "FilePro Mailing List" <filepro-list at seaslug.org>
Sent: Wednesday, March 10, 2004 12:01 PM
Subject: Re: getenv - unix - fp 5.0.13


> On Wed, Mar 10, 2004 at 08:37:02AM -0800, Enrique Arredondo wrote:
> | From: "Bob Stockler" <bob at trebor.iglou.com>
> | >
> | > The USER command requires:
> | >
> | >   Then: USER alias = /hard/coded/non-variable/argument-of/program-name
> | >   Then: alias      = "query sent to USER program"
> | >   Then: ANSWER     = alias ; declare ANSWER
> |
> | I tried it but I'm getting the following:
> |        Then: user getname="/usr/vsifax/bin/flog"
> |        Then: getname="-a"<2
> | fetch  . If:
> |        Then: answer=getname;declare answer
> |        Then: msgbox answer
> | Maybe that argument * -a * is killing it right ?
>
> In the first place, you apparently missed the implication
> that the program name handed to USER must be non-quoted.
>
> Secondly "-a" < 2 is supposed to be an argument to the
> command you're trying to execute, and not a query to it.
> That's why I suggested you'd probably need a shell script.
> Here's something to start with:
>
> Write this shell script, and make it executable and
> readable by all:
>
>   #!/bin/sh
>   # Shell Script named "flog"
>   # This will loop and read the value for "argument"
>   # every time anything is piped into it:
>   while read argument
>   do /usr/vsifax/bin/flog -a $argument
>   done
>
> I think this processing will give you a start on your
> output processing table:
>
>          If: NOT Start
>        Then: gosub Start ; declare answer
>        Then: getname = 2
>        Then: answer  = getname
>        Then: ' other stuff you want to do with "answer"
>        Then; end
>   Start  If: ' The USER command must be alone on a line by itself:
>        Then: USER getname = /path/to/shell/script/named/flog
>        Then: return ' above should be unquoted full absolute pathname
>
Bob

Thanks for your help on this issue

I tried it but the script is looping somehow , so I just change it to :

# script named flogit
#!/bin/sh
/usr/vsifax/bin/flog -a $1 | cut -c56-


--- cut here ---------

and if I ran it in the shell

flogit 123445

responds with   "NORMAL 1 "

when I ran the processing as you suggested it's breaking out of the report.
Is it because USER doesn't work when using rreport instead of rclerk ?

report wuhistfax -f poststatus -a -u

Or is flog sending strange control characters before the response and
filepro is freaking out with that R1C??R2,...


Regards,

Enrique




More information about the Filepro-list mailing list