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

Boaz Bezborodko boaz at mirrotek.com
Mon Feb 14 12:27:38 PST 2011


On 2/14/2011 3:17 PM, Kenneth Brody wrote:
> On 2/14/2011 2:57 PM, Boaz Bezborodko wrote:
> [...]
>> 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.
> [...]
>
> Are you sure?
>
> Can you show the one that will actually work with 1 and 2 (but not 
> 3)?  (And which won't give an error that "ImpData" isn't defined 
> anywhere, rather than your "caltag" error?)
>

Sorry, I copied to the bottom of the editor's screen.

What I did to test it out was to comment out 'caltag(4) and then add, 
one at a time, the lines with 'caltag(1)' 'caltag(2)' and 'caltag(3)'.  
I would not get syntax errors when compiling 1 or 1 and 2.  But as soon 
as I added 3 I would get the error.


Here is the complete file:

::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:
ImpData:::
:caltag(1) eq "DEF/CT":GOSUB DefCT:
::RETURN:
DefCT::'Create a calltag for this record:
:'First lookup customer data.:aa(12,leadzer)=caltag(2) ; 
ab(10,*)=MID(ab,"3","10"):
::lookup ord = order  k=ab   i=A -bx:
NxtOrd:ord(30) eq ab and ord(20) ne "1137":GETNEXT ord ; GOTO NxtOrd:
:ord(30) ne ab         'Error if record can't be found::
::lookup ups = upsmanif  r=free  -e:
::ups(1)=ord(199)<ord(200) ; ups(2)=ord(193) ; ups(3)=ord(194):
::ups(4)=ord(195) ; ups(5)=ord(196) ; ups(6)=ord(197) ; ups(7)=ord(209):
::ups(8)=ord(1) ; ups(10)=ord(20) ; ups(11)="ORDER":
::ups(12)=ord(37) ; ups(17)=ord(21) ; ups(18)=ord(28):
::ups(19)=ord(30) ; ups(25)=ord(106) ; ups(64)="UPSN":
::ups(84)=ord(87) ; ups(56)="Y" ; ups(56)="GROUND":
::ups(57)="1" ; ups(63)=ups(10)&ups(17) ; ups(68)=37 ; ups(69)=51:
::lookup fin = finunits  k=(ord(51))  i=A -bx:
::ups(91)=ord(51):
::ups(21)=fin(222) ; ups(30)=fin(226) ; ups(31)=fin(227) ; ups(32)=fin(228):
::ups(34)=fin(223) ; ups(22)=ups(30)+ups(31)*"2"+ups(32)*"2":
:ups(30) gt "60":ups(42)="Y":
::ups(67)=ups(30)*ups(31)*ups(32)/"194":
:ups(67) lt "1728" or ups(67) lt ups(21):ups(54)="1" ; ups(55)="1" ; 
ups(59)="1" ; ups(71)="1":
::lookup inv = invno  r=("1")   -ep:
::inv(7)=inv(7)+"1" ; Reference=inv(7) ; WRITE inv:
::ups(33)=Reference:
::RETURN:


More information about the Filepro-list mailing list