View Single Post
  #3 (permalink)  
Old July 16th, 2007, 07:52 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

Text file name - C301PD ( it does not have extension as txt )

location C:\c

- line of code

000500 C301S1-TRANSACTION SECTION 10.
000600******************************************** ********************
000700 C301S1-START.
000800
000900 PERFORM 200-EDIT-TRAN
001000 THRU 200-END.
001100
001200 IF (NO-ERROR-FOUND)
001300 PERFORM 400-PROCESS-TRAN
001400 THRU 400-END.
001500
001600 GO TO C301S1-TRANSACTION-END.
001700
001800******************************************** ********************
001900 200-EDIT-TRAN.
002000******************************************** ********************
002100
002200 PERFORM 210-EDIT-ACCESS
002300 THRU 210-END.
002400
002500 IF (ERROR-FOUND)
002600 GO TO 200-END.


//commented line

where ever there is * in seventh column( place) starting from left that is commented line
example

001800******************************************** ********************

is a commented line above


My Table defination would be

1.field1-line number in the file (Primary key )
2. field2-char in 7th column of file

ignore rest of it

My requirement
To count what is excat number of lines of code
= Total number of lines - commented lines count

so i need to find count of lines which has * at the seventh place in file in each line





Thanks and Regards
Lawson, COBOL
Reply With Quote