menu script enhancement idea
GCC Consulting
gccconsulting at comcast.net
Mon Jul 24 16:44:37 PDT 2006
> -----Original Message-----
> From:
> filepro-list-bounces+gccconsulting=comcast.net at lists.celestial
> .com
> [mailto:filepro-list-bounces+gccconsulting=comcast.net at lists.c
> elestial.com] On Behalf Of Bob Stockler
> Sent: Monday, July 24, 2006 1:47 PM
> To: filePro mailing list
> Subject: Re: menu script enhancement idea
>
> John Esak wrote (on Sun, Jul 23, 2006 at 10:26:51PM -0400):
>
> | Wouldn't it be easy to incorporate the passing of variables to the
> | menu scripts by doing something like this...
> |
> | menu.-A var1 var2 var3 var4 ...
> |
> | Couldn't it be arranged to pass these in as $1 $2 $3 ... to
> the called
> | script? There are any number of really good reasons for
> being able to
> | do this. I don't think it would be too difficult to add and it
> | certainly wouldn't cause any backward compat issues. how
> about a 5.6.4
> | release?? :-)
> |
> | Example:
> |
> | menu.-A 2006
> |
> | and the script reads
> |
> | /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_1
> | /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_2
> | /u/appl/rreport filename -f report -p /u/appl/reports/$1/rep_3 ...
> |
> | Actually, this is a pretty weak example... but you get the idea.
>
> I can see how you could implement this on UNIX/Linux using
> processing table user menus, but (unfamiliar as I am with
> it) I don't think Windows batch file put their arguments into
> variables (if they pay attention to arguments at all).
>
> In a regular filePro User Menu, and the user elected Choice
> A, how would the program executing the menu know to prompt
> for arguments to the script, and how many arguments to prompt for?
>
> In a processing table menu, in the subroutine called by the
> menu choice, you could use PUTENV() to furnish values for the
> variables in an already-written script or batch file, or -
> better yet - use filePro File I/O to write the script or
> batch file on the fly with everything having its proper value.
>
> Bob
>
Bob,
On can use input process to gather all of the variables required for the
command line and then use a system call to run it.
I do this at one client's site allowing them to select one of 2 reports
which use - lookups on different indexesand then enter the selected
criteria.
Foobar="rreport filename -f"<report_name<"-v sel_records
-r"<first_variable<"-rw<"second_variable<"-rx"<thirt_variable
Now one can also combine all of the variables into one and then hash them
out when selecting records.
With the new licensing scheme this type of processing can be more palatable
as this, for *nix", is still using 1 session and not 2. Something Windows
based users could do all along.
Richard
More information about the Filepro-list
mailing list