working with files

Hi All,

Can u plz tell me how to ensure row count.

input file /app/PNYCOINF01/opera/operaprd/Data/SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
checkFile: The input file exists
checkFile: Checking for existing copy of output file /app/PNYCOINF01/opera/operaprd/SrcFiles/AMS/SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
checkFile: There are no existing copies of the output file
checkFile: Checking the first 1 lines of the file for "20070716"
checkFile: Passed the header check
checkFile: Checking the line count appears in the footer
checkFile: The total number of rows of data in the file is 631
checkFile: Checking 631 appears in the 1 lines of the footer
checkFile: Failed to find the correct row count in the file.
checkFile: EXITING DUE TO ERRORS Mon Jul 16 23:37:02 EDT 2007

What i checked is

wc -l SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
632

opened the file checked the last line which was footer it is currently showing 630 as count. It may be, after some change taken place in file by our manager, i just wanted to understand what was the change took place.

i am thinking that either deletion or addition of one emptyline into file may be done. if it is true, where did he add or delete it if not can u plz advise me for further.

thanks in advance..
-bali

Hi All,

Can u plz tell me how to ensure row count.

input file /app/PNYCOINF01/opera/operaprd/Data/SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
checkFile: The input file exists
checkFile: Checking for existing copy of output file /app/PNYCOINF01/opera/operaprd/SrcFiles/AMS/SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
checkFile: There are no existing copies of the output file
checkFile: Checking the first 1 lines of the file for "20070716"
checkFile: Passed the header check
checkFile: Checking the line count appears in the footer
checkFile: The total number of rows of data in the file is 631
checkFile: Checking 631 appears in the 1 lines of the footer
checkFile: Failed to find the correct row count in the file.
checkFile: EXITING DUE TO ERRORS Mon Jul 16 23:37:02 EDT 2007

What i checked is

wc -l SENTRY_BSL2_COLLRECEIVEPOS_AM_20070716.dat
632

opened the file checked the last line which was footer it is currently showing 630 as count. It may be, after some change taken place in file by our manager, i just wanted to understand what was the change took place.

i am thinking that either deletion or addition of one emptyline into file may be done. if it is true, where did he add or delete it if not can u plz advise me for further.

thanks in advance..
-bali

There are duplicate threads being opened for the same problem, i would request you to adhere to the Forum Rules.

Do not bump up posts if they are not promptly answered.

wc -l for the file shows 632
and the trailer record inside the file shows as 630.
Application might have written only the count of detailed records which actually evaluates to 632 - 2 ( header + trailer ) = 630

Could you please check that ?

Hi
i am sorry for dumping twice as i have some proble with IE. sorry i don't repeat it.

the logic which u told is currect, i found footer with 639 as count, but when i checked with wc -l file resulting 642. what is the modification can we do with out affecting data inside the file.