Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding Records to cursor after Specific Word
Message
From
15/08/2017 13:11:34
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01653315
Message ID:
01653323
Views:
53
>>>>Respected all.
>>>>
>>>>I have a Text File say abc.Txt which I have taken it in FILETOSTR using FILETOSTR("ABC.TXT").
>>>>
>>>>The contents of the file are like
>>>>
>>>>*p290Y*p1400XMobile Number :*p290Y*p1750X9425816183*p333Y*p1400XBill No. & Date :*p333Y*p1750X360108912 28/06/2017*p376Y*p1400XPayment Due Date :*p376Y*p1750X15/07/2017
>>>>
>>>>I need to create cursor with each record as
>>>>
>>>>*p290Y*p1400XMobile Number :
>>>>*p290Y*p1750X9425816183
>>>>*p333Y*p1400XBill No. & Date :
>>>>*p333Y*p1750X360108912 28/06/2017
>>>>
>>>>Please suggest some method to do this
>>>>
>>>>Regards
>>>
>>>How do you know where to split?
>>
>>Yes, I need to Split after *p....Y.
>>
>> ..... may be some numeric Digit. like ekample *p290Y
>>
>>The records should be like this in the cursor
>>
>>*p290Y*p1400XMobile Number : && First Record
>>*p290Y*p1750X9425816183 && Second Record
>>*p333Y*p1400XBill No. & Date : && Third Record
>>*p333Y*p1750X360108912 28/06/2017 && Fourth Record
>>
>>Original Text is Like This
>>*p290Y*p1400XMobile Number :*p290Y*p1750X9425816183*p333Y*p1400XBill No. & Date :*p333Y*p1750X360108912 28/06/2017
>>
>>I need this in cursor in four records each will start with *p....Y. Here .... may be 3 or 4 Numeric digits.
>>
>>*p290Y*p1400XMobile Number :
>>*p290Y*p1750X9425816183
>>*p333Y*p1400XBill No. & Date :
>>*p333Y*p1750X360108912 28/06/2017
>>
>>I am trying to use function like OCCURS() and some other text functions etc not getting success
>
>When I press reply I see that there is some invisible chars, are they delimiters?

Yes It seems to be a Delimiter. If you are not able to see it please have a look at the original file at here

http://www.send6.com/626e5909/

Need to Create records in cursor like this
*p290Y*p1400XAccount Number(8U(s1P(s17H(s8V(s0S(s0B(s16602T
*p290Y*p1750X405651132(8U(s1P(s17H(s8V(s0S(s3B(s16602T
*p333Y*p1400XInvoice Number(8U(s1P(s17H(s8V(s0S(s0B(s16602T


Regards
Harsh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform