Hope Everyone is doing fine.
I'm still new to C# coding and was hoping someone may have already had a similar requirement and could point me in the right direction. I had originally posted this question in an SSIS forum but am now thinking it may make more sense to and see if this could be resolved using C# code.
Requirements: Read in a text file that has multiple record types. Each time a record starting with the characters 'J9' is found, take that record and the 4 records that follow, merge them into one output record to be written out to a new text file. All output records would be written to the same output file (1 file in, and 1 file out).
Input Data Sample:
Desired Ouput:
Any feedback is appreciated.
Thank you
I'm still new to C# coding and was hoping someone may have already had a similar requirement and could point me in the right direction. I had originally posted this question in an SSIS forum but am now thinking it may make more sense to and see if this could be resolved using C# code.
Requirements: Read in a text file that has multiple record types. Each time a record starting with the characters 'J9' is found, take that record and the 4 records that follow, merge them into one output record to be written out to a new text file. All output records would be written to the same output file (1 file in, and 1 file out).
Input Data Sample:
C#:
Header
KC FLDA FLDB FLDC
FLDA FLDB FLDC
J9 FLDA FLDB FLDC
FLDD FLDE FLDF
FLDG FLDH FLDI
FLDJ FLDK FLDL
FLDM FLDN FLDO
KC FLDA FLDB FLDC
FLDA FLDB FLDC
J9 FLDA FLDB FLDC
FLDD FLDE FLDF
FLDG FLDH FLDI
FLDJ FLDK FLDL
FLDM FLDN FLDO
C#:
J9 FLDA FLDB FLDC FLDD FLDE FLDF FLDG FLDH FLDI FLDJ FLDK FLDL FLDM FLDN FLDO
J9 FLDA FLDB FLDC FLDD FLDE FLDF FLDG FLDH FLDI FLDJ FLDK FLDL FLDM FLDN FLDO
Any feedback is appreciated.
Thank you
Last edited: