Home » Developer & Programmer » Forms » Count number of lines in a text file
Count number of lines in a text file [message #80097] Sun, 11 August 2002 03:06 Go to next message
Sastry S. Peri
Messages: 1
Registered: August 2002
Junior Member
Hi, In my application (Insurance based), i need to generate some text files of the payments to be made by the company to the clients and send these text files to banks for the payments to the client. I generate the file and after the bank does the payments, bank in return sends the file back with some additional flags.
when the file is received, say if the file contains 20lines, 19 lines will have the detailed information of the payment, 1 line for each payment and the last line and i update my table with the flags, 20th line contains the header info (like how many lines this file contain, the total sum of amounts of all the 19lines above etc etc) and the update to the tables, th fields are differnt here for this line.
What i planned is: Count number of lines, in the file, when its the last line, then do the processing accordingly. But I dont know how to count the number of lines. Could somebody let me know how to do this or if you have any alternative suggestion do kinldy let me know.

Regards
Sastry S. Peri
Re: Count number of lines in a text file [message #80100 is a reply to message #80097] Sun, 11 August 2002 20:40 Go to previous message
neeraj sharma
Messages: 4
Registered: January 2002
Junior Member
use text-io package of forms
use text_io.new_line
then use Substr function
if it is null then that will be last line.
you can do it in loop untill u find last line.
Previous Topic: Dynamic List Values
Next Topic: Hand Shape cursor style in Forms
Goto Forum:
  


Current Time: Fri Apr 19 19:47:52 CDT 2024