Help with import command
Richard Kreiss
rkreiss at gccconsulting.net
Fri Apr 23 08:11:16 PDT 2021
Below is the file I am trying to import:
response=1
responsetext=SUCCESS
authcode=123456
transactionid=6174664263
avsresponse=
cvvresponse=M
orderid=
type=sale
response_code=100
The import processing:
◄ If:
Then: import ASCII field=(ifile) o=& c== r== f=&
17 ------- - - - - - - - - - - - - - - - -
◄ If: NOT field
Then: ERRORBOX "(17) Done reading the file\nThe counter Ct is at
18 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: ct=ct+"1"
19 ------- - - - - - - - - - - - - - - - -
◄ If:
Then: im=field(1)
20 ------- - - - - - - - - - - - - - - - -
◄ If: IM CO CHR("124")
Then: gosub RMV_124;goto DO_FIEL
21 ------- - - - - - - - - - - - - - - - -
◄ If: CT LT "20"
Then: goto DO_FIEL
22 ------- - - - - - - - - - - - - - - - -
do_fiel◄ If: '*****************************************************************
Then: '* routine to set fierld values
23 ------- - - - - - - - - - - - - - - - -
◄ If: ct = "1" or ct = "5" or ct = "7" or ct= "9" or ct = "12" or ct = "
Then: MSGBOX "The Value of im is \b5"<im<"\nThe counter is at \b6"<ct<"\
24 ------- - - - - - - - - - - - - - - - -
◄ If: im="response" 'loop back to get the value of the "response"
Then: il=im;im="";GOTO get_Imp 'whici is usually a single digit number
25 ------- - - - - - - - - - - - - - - - -
◄ If: il="Response" 'value of response in in field
Then: fields["1"]=im;il="";im="";GOTO get_imp 'im usually a single num
26 ------- - - - - - - - - - - - - - - - -
◄ If: im="Success"
Then: fields["2"]=im;il="";im="";GOTO get_imp 'im usually a single num
27 ------- - - - - - - - - - - - - - - - -
◄ If: 'im ="responsetext"
Then: 'il=im;CT="3";goto GET_Imp
Problem is tht the import works properly foe the first two imports but then skips the the value to the left of the equal = sign.
The first import is response (correct) and the second is 1. The issue I am having is that the next value imported is Success and not Responsetext. This is happening with each import, the value to expected is not the “header” but the value of the header.(the value to the right of the equal sign =).
Does anyone have an answer as to why I am having this problem and how for fix it?
Richard Kreiss
GCC Consulting
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 19645 bytes
Desc: not available
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20210423/734166c7/attachment.bin>
More information about the Filepro-list
mailing list