FP Processing Table techniques for a newbie

Walter Vaughan wvaughan at steelerubber.com
Mon Jun 26 06:20:48 PDT 2006


rlmuller at uscomputergurus.com wrote:

> Hi All,
> 
> I'm running FP5.6 over WinXP-Pro/SP2.  Below is the input processing table
> for a two-field MyCust file (Cust ID and Cust Name):
> 
> The purposes of this file & processing-table are:
> 1. an exercise for me to learn FilePro;
> 2. an initial stage of a prototype for allocating AR receipts to existing
> Invoices;
> 3. a means to generate test data;
> 
> Ultimately, the prototype functionality will be an upfrade to an
> FP4.0-based accounting system on a 1980's version of SCO.  (That's what my
> cash-strapped client has,  so it's a given.)
> 
> I'm using the FP Plus 4.0 manual and the FP 16 Plus Tutorial as my
> resources, together with my 30-day FP5.6 software.
> 
> I originally had lines 1-5 to generate records, which worked fine, but it
> failed if I made field 1 read-only (to prevent inadvertent modification of
> the field).  That made sense, so I relaxed that restriction and added
> lines 6-9.
> 
> My questions are:
> 1.  Is there a better way to generate, e.g. IDs, in a production
> environment and prevent inadvertent (or malicious) modification?

Yes, Maybe, No. What you have is not bad. I would venture to say that 
conventional wisdom dictates that you don't depend upon for something like @rn, 
rather having a separate file that keeps track of the next available number. 
Using @rn does not allow you to do is to delete records with out creating 
duplicate ID's.

What you have to remember in filePro is that there is no enforced referential 
integrity. The developer is responsible for it entirely, and have to accept that 
it is possible that it could have been modified outside your control or 
knowledge unless you have everything locked down tight.

You should also be aware that the 4.0 version of filepro supports a back door 
that if left open could allow any user on your system to have full access with 
the filePro Adminstrator's permission level.

So if you don't want a field to be modified, yet is visible make sure it is 
listed as !1 instead of *1 on screens. Especially numbered screens that are easy 
to get to.

> 2. Is there a better way to generate test data than this approach?  I plan
> to generate random Invoices and Receivables.
You might want to insert some code like this in the input processing table of a 
test file. Then when you are at its screen where you get
  D -Delete  H -Hardcopy  U -Update  X -Exit  F -Print Form  B -Browse
across the bottom, if you press "G" it will create 1000 test records.

   1  -------   -   -   -   -   -   -   -   -
        ■ If:
        Then: end
   2  -------   -   -   -   -   -   -   -   -
@keyG  ■ If:
        Then: a(4,.0,g)="1"
   3  -------   -   -   -   -   -   -   -   -
loop   ■ If: a gt "1000"
        Then: end
   4  -------   -   -   -   -   -   -   -   -
        ■ If:
        Then: a=a+"1"
   5  -------   -   -   -   -   -   -   -   -
        ■ If:
        Then: lookup TCust  r=free  -e
   6  -------   -   -   -   -   -   -   -   -
        ■ If:
        Then: TCust(1)=a; TCust(2)="Customer"{a
   7  -------   -   -   -   -   -   -   -   -
        ■ If:
        Then: goto loop

> 3. Is there any way to insert space for line of code between lines n and
> n+1 beyond moving lines n+1 through the last-coded-line to last+2?

The F3 function key? Also remember that the F4 removes a line of code and there 
is no "undo" ability. This is the same IDE that we had twenty years ago.

> Thanks in advance for any guidance you may provide.

You are in good hands asking questions on this list.


More information about the Filepro-list mailing list