Arrays

Richard Kreiss rkreiss at gccconsulting.net
Wed Jun 26 08:23:44 PDT 2013



> -----Original Message-----
> From: Kenneth Brody [mailto:kenbrody at spamcop.net]
> Sent: Wednesday, June 26, 2013 11:03 AM
> To: Richard Kreiss
> Cc: 'FilePro Mailing List'
> Subject: Re: Arrays
> 
> On 6/25/2013 5:47 PM, Richard Kreiss wrote:
> [...]
> >>> I have a number of routines that post data from on file to another
> >>> where
> >> arrays are mapped to the sequential fields on the current file and an
> >> array is mapped to the matching fields in the other file.
> >>>
> >>> Dim foobar(22):1;dim newfile(22):file(1) Lookup to newfile free
> >>> ::Ct="1"
> >>> Loop_po:ct lt "22":newfile[ct]=foobar[ct];ct=ct+"1";GOTO loop_po
> [...]
> >>> The above has worked well for a couple of years.  Recently it has
> >>> not been
> >> working properly.  By that I mean, some fields values are posted and
> >> other not. Phone numbers and date fields are not being posted.
> [...]
> >> Can you give some specific examples of actual data in the current
> >> file (along with the field definitions) that ended up being blank in
> >> the posting file (along with the field definitions).
> >>
> >>> I modified the posting file to not use the arrays.
> >> [...]
> >>
> >> Are you saying that replacing the arrays with explicit assignments
> >> made it work?
> >
> > These are the primary fields.  These are many more fields which are posted
> not using the array.  Then there is another set of arrays for posting 15 more
> fields.
> 
> Fair enough, regarding the "copy newfile" option.  What about my other
> questions?
> 
> To repeat:
> 
> >>> Can you give some specific examples of actual data in the current
> >>> file (along with the field definitions) that ended up being blank in
> >>> the posting file (along with the field definitions).
> 
> and
> 
> >>> Are you saying that replacing the arrays with explicit assignments
> >>> made it work?

To make a long story short - the array posting did work - problem old data that was not deleted.  See below for detailed explanation.

There were a number of factors going on which I was not fully aware of until after I had sent this email.

I was informed that the problem had started the other day and they needed the imported data ASAP.  

I was also told the old data had been deleted.  When I checked for records from June 24th, they had been deleted.  Here's the rub, there were matching records from June 5th.

This set up and interesting problem, The correct data was imported into the posting file and checked for phone numbers and DOB.  They were present.

When the posing program was asked to post all missing records to the primary file, the program found the records from June 5th, with these fields blank, but the new records were therefor no post in. (My client does not want the a field by field match done).

So, each time I checked, bad records were present.  I finally selected one specific record to post and was then able to see what had happened.  

I deleted the June 5th records and ran the posting program without a problem.

Ken, you had suggested copy newfile - no array.  That was what my original programming did and then blanked any no matching fields.

Richard




More information about the Filepro-list mailing list