Newbie Question
Roger Cornelius
rac at custom-mobility.com
Thu Jan 8 10:26:32 PST 2015
On 01/08/2015 17:15, CKelly at affiliatedtrans.com wrote:
> But how would I go about having the value be dynamic?
>
> /u/appl/filepro/vregstr> /u/appl/fp/dreport vregstr -f CAK_Data1 -u -p /tmp/Anzio_Shipment_Mapping -pc "nocodes" -s cakSelection1
>
> This works with a saved selection but I want the value I am looking
> for to be dynamic
It looks like you're on a unix-like OS, so you could feed the
selection via stdin like so:
for val in 10 20 30
do
echo "\r\033\033NU\r60\req\r${val}\033\033\r\c" | \
/u/appl/fp/dreport vregstr -f CAK_Data1 -u \
-p /tmp/Anzio_Shipment_Mapping-${val} -pc "nocodes"
done
This would run the table 3 times, matching field 60 against the values
10, 20, and 30, and write the output to 3 unique files named
Anzio_Shipment_Mapping with "-" and the value of ${val} tacked on the
end.
The echo:
Sends [Enter] to the "Enter Index" prompt:
Sends ESC ESC to the "Sort Definition" table prompt
Sends "N" to the "Select All Records" prompt
Sends "U" to go into update mode on the selection screen
Sends the selection criteria
Sends ESC ESC to exit update mode
Sends [Enter] to begin output generation
For more complicated selections, save the criteria to a set and change
the echo to load it and update whichever line(s) you like. This
example modifies the first line of the set, but you could modify any
line or lines by changing the echo:
ss="some-saved-set"
echo "\r\033\033NL${ss}\rU\r60\req\r${val}\033\033\r\c" | \
Lots of possibilities.
> -----Original Message-----
> From: onlinemgt at gmail.com [mailto:onlinemgt at gmail.com] On Behalf Of daN baueR
> Sent: Thursday, January 08, 2015 11:07 AM
> To: Christopher Kelly
> Cc: filePro Mail Group
> Subject: Re: Newbie Question
>
> On Thu, Jan 8, 2015 at 11:01 AM, <CKelly at affiliatedtrans.com> wrote:
> > I recently started at a company utilizing FilePro.
> >
> > I am able to export ALL records without issue using a command as follows.
> >
> > /u/appl/fp/rreport vregstr -f CAK_Data1 -a -u -p /tmp/cak_output -pc "nocodes"
> >
> > But I would like to limit the results based on a dynamic selection Field 60 eq "ReadyToProcess"
> >
> > I can do this via the request output application via a selector sentence but how can I do it via script?
> >
> >
> >
> > Christopher A. Kelly | IT Development / Administration | Affiliated Transportation Systems, Inc. | ckelly at affiliatedtrans.com<mailto:ckelly at affiliatedtrans.com> | 888.668.2874 x102
> >
> >
>
> The easiest way (in my opinion) would be to create and name a
> selection set. Depending on what you're looking for in field 60.
> Something like:
>
> 60 eq Y
>
> Save that with a name of 'vregstr' for instance and then your script
> line would just have to change to:
>
> /u/appl/fp/rreport vregstr -f CAK_Data1 -s vregstr -u -p /tmp/cak_output -pc "nocodes"
>
> I suggest using the same name for the selection set to remind you at a
> later date that it's associated with a specific report.
>
> Dan Bauer
> dan at onlinemgt.com
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
--
Roger Cornelius rac at custom-mobility.com
More information about the Filepro-list
mailing list