Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Appending More than 254 Character in a record From Text
Message
De
19/08/2013 17:03:19
 
 
À
19/08/2013 15:17:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01580757
Message ID:
01580789
Vues:
62
Perhaps you can use combination (as suggested earlier) of techniques. You can use FGETS() to read the file line-by-line, then use temporary table, but rather than using a character field, use a memo field. I do vaguely recall the original memory thread (though can't remember the exact details of what you were trying to do). I suspect you might've run into a problem if you were trying to read the entire file in one step using FILETOSTR(). Although ALINES() could be used, it also runs the risk of crashing if the file contained enough lines to cause array to contain too many elements (>65000 elements). Using FGETS() to read the file line-by-line would get around that problem.

>No that would not be possible at my end as I would be manipulating many rows and colum positions. I had tried the Idea you are suggesting, earlier. But could not do so and ultimately, taking file to a cursor was suggested by an expert on UT only and finally I achived it nicely.
>
>
>
>>Perhaps it may be easier to use the low-level file operations (e.g. FOPEN(), FREAD(), FGETS(), etc) rather than trying to convert to intermediate DBF file for processing (and then trying to find workarounds to problems found with using DBF file)?
>>
>>>Thanks Sir, Are You Dr Adam, who has helped me on adobe Post Script Forum ?
>>>
>>>Sir, I am not completely changing the code inside Ps file. What i am trying to do is that I am Narrowing the colum Width of texts in Page 2 of a PS file and Trying to fit it inside Page one, Since Page 1 has enough space left to accomodate it.
>>>
>>>In other words in am reprocessing the PS file but not disturbing the Commands or instructions. I have succeded in making a tool for such purpose for North & West Zone Billing Center which could reprocess 50000 (2 Page PS file) and saved around 40000 A-4 Size Paper in a Hour of processing.
>>>
>>>Here is the sample original & compressed File. (Available in Both in PS and PDF Format)
>>>https://www.dropbox.com/s/lfkq5ht3z1onqe5/Sample.zip
>>>
>>>Now for our east zone Bills are quite different . Each PS file in itself contains 100's of bills. I have just started with it.
>>>
>>>Regards
>>>
>>>
>>>
>>>I am appending Data in a cursor from Text File using Append from abc.txt SDF. The problem is that, of around 700000 records certain records have length of 255 and 256 Characters and therefore the last one o two digits or few characters are not appended properly.
>>>>>
>>>>>Is there any way like when I append and of the length exceeds 254 Character than the rest of the digits are appended in my next Field(column) or any other Idea to solve such Issue
>>>>>o
>>>>>Regards
>>>>
>>>>(1) yes, it is possible
>>>>You'll have to create a cursor with a memo field
>>>>Then read the file with fgets( fd, 8192) and insert each line in the cursor
>>>
>>>(2) I think you're going the wrong way about this
>>>
>>>Postscript is a stack based interpreted language
>>>
>>>The end of a line is not necessarily the end of an instruction sequence
>>>eg
>>>
>>>> 0 0 moveto
>>>>
>>>>
>>>>can also be written as
>>>>
>>>>0
>>>>0
>>>>moveto
>>>>
>>>>
>>>>You are reading a stream of tokens (elements)
>>>>If you strip the comment lines - it is as if the input were one continuous line
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform