Hi All, I am reading a certain data from one file and writing to another file. In the original file, there are few lines, which occur more than once in different lines. When i am writing it to the second file, i don't want it to be written more than once. I mean, it should not be repetitive. The file are just two simple text files.
In achieving what i need, i thought simultaneous reading and writing to the file is required, to know if the lines are being written for the second time. But i don't know how to achieve this. A sample of the text file is shown below: STACK_CC_SS_COMMON_TYPE_REFERENCE_ID_T { STACK_CC_SS_COMMON_TYPE_REFERENCE_PROTOCOL_DIS_T protocol_discriminator; STACK_CC_SS_COMMON_TYPE_REFERENCE_TRANSACTION_ID_T transaction_id; } STACK_CC_SS_COMMON_TYPE_REFERENCE_ID_T; }; STACK_CC_SS_COMMON_TYPE_CHANNEL_INFO_T { STACK_CC_SS_COMMON_TYPE_CHANNEL_TYPE_T channel_type; STACK_CC_SS_COMMON_TYPE_CHANNEL_MODE_T channel_mode; } STACK_CC_SS_COMMON_TYPE_CHANNEL_INFO_T; }; STACK_CC_SS_COMMON_TYPE_REFERENCE_ID_T { STACK_CC_SS_COMMON_TYPE_REFERENCE_PROTOCOL_DIS_T protocol_discriminator; STACK_CC_SS_COMMON_TYPE_REFERENCE_TRANSACTION_ID_T transaction_id; } STACK_CC_SS_COMMON_TYPE_REFERENCE_ID_T; }; Can anyone guide me in this? Thanks and Regards, Dharshana