View Single Post
  #1 (permalink)  
Old July 17th, 2007, 04:30 AM
lawsoncobol lawsoncobol is offline
Authorized User
Join Date: Jul 2006
Location: Kolkata, West Bengal, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default Need to Count number of lines in a file

Hi Friends

   i need little help

Actually i have 2 or 3 files in a folder and i want to count the number of lines present in the files and show it on screen

File path

I want to open them ( note : i want to open all files which has PD as extension then get the first 3 char ( may be 2 or 3 digit) of PD file , like in example it would be 123 then get all the file starting with 123 like 123WS and 123.rpt then show me the number of lines present in File ( 123PD ) and File (123WS) and (123.rpt) on screen at one time )

then i will want to referesh the database table and read next set of file which is 45

the common identifier will be there will one PD one WS file present in the path always

Screen may have output field like

File PD - Show = 123PD
Number of lines = 6783

File WS - Show = 123WS
Number of lines = 73

File rpt - show = 123.rpt
Number of lines = 78

database table would be
table 1

Key would be

Line number = number (primary key ) ( value doesnt matter )

the count variables names should be different for three different files

Thanks and Regards
Lawson, COBOL
Thanks and Regards
Lawson, COBOL
Reply With Quote