I'm getting a syntax error with IMPORT...Why?

Boaz Bezborodko boaz at mirrotek.com
Mon Feb 14 11:57:57 PST 2011



On 2/14/2011 2:54 PM, Jeff Harrison wrote:
> ----- Original Message ----
>
>> From: Boaz Bezborodko<boaz at mirrotek.com>
>> To: Jeff Harrison<jeffaharrison at yahoo.com>
>> Cc: "Filepro-List at Lists. Celestial. Com"<filepro-list at lists.celestial.com>
>> Sent: Mon, February 14, 2011 2:19:26 PM
>> Subject: Re: I'm getting a syntax error with IMPORT...Why?
>>
> [snip]
>> I'm  still in the process of writing the code.  This is occurring when
>> Filepro is saving and compiling the code.
>>
>> It's not the first time I'm  doing IMPORT programming, but this is the
>> first time I've come across an  error for what looks to me to be a
>> perfectly acceptable syntax.
>>
> Ok then, perhaps you can show ALL of the code then?  Preferably without the
> "If/Thens" and graphic characters.  That way I could try to duplicate the issue.
>
> Jeff Harrison
> jeffaharrison at yahoo.com
> Author of JHExport and JHImport.
>
Here is the code in ASCII format with some additional lines where I did 
some testing.  Before the line with the syntax error I added lines 
testing the value of 'caltag(1)', 2 and 3.  with 1 and 2 it compiled 
correctly.  As soon as I added 3 it gave me the same error.

::DECLARE Line_Num(5,.0), Reference(7,.0):
::GOSUB GetFile:
::GOSUB ChkFile:
::GOSUB ImpData:
::END:
GetFile:'Get the file with the data::
::DIM file[999](74,*):
::SYSTEM "DIR \users\office\Import-Documents > dirlist.txt":
::DECLARE File_Handle, File_Line, File_Name(74,*):
::File_Handle=OPEN("dirlist.txt","t"):
::m="1":
FileLp::x=READLINE(File_Handle,File_Line):
:m lt "8"                'Get to file names:m=m+"1" ; GOTO FileLp:
:MID(File_Line,"18","4") ne "File":file(m)=MID(File_Line,"40","74") ; 
m=m+"1" ; GOTO FileLp:
::SHOW ("7","10") "Please select a file to import (must be in Overstock 
Format)":
::m=LISTBOX(file,"8",m-"1","5","1","15","79"):
:@sk="BRKY":EXIT:
::File_Name=file(m):
::x=CLOSE(File_Handle):
::RETURN:
ChkFile:::
::GOSUB ImpCall:
:caltag(1) eq ""::
:caltag(2) eq ""::
:caltag(3) eq ""::
:caltag(4) ne "Dropship Vendor Notification Report":BEEP ; SHOW "@This 
is not a proper Vendor Notification Report...Press any key to exit" ; EXIT:
::RETURN:
ImpCall:::
::IMPORT WORD caltag=("/USERS/OFFICE/Import-documents/ "{File_Name):
::Line_Num=Line_Num+"1":
::RETURN:
I


More information about the Filepro-list mailing list