in reply to Re: Splitting file into separate files based on record lengths and identifiers
in thread Splitting file into separate files based on record lengths and identifiers

The hash solution intrigued me, but it seems to break when I make the strings longer, can someone enlighten me as to why? Sample data:

0100$THIS IS A 100 CHAR FIELD £$%£%$£                                                               0030*THIS IS A 30 CHAR ONE

Thanks!

  • Comment on Re^2: Splitting file into separate files based on record lengths and identifiers
  • Download Code

Replies are listed 'Best First'.
Re^3: Splitting file into separate files based on record lengths and identifiers
by Generoso (Prior) on Aug 27, 2010 at 17:35 UTC

    It is working fin for me. The £ sign comes out funny because I an in Latinamerica and using the standard character set.

    DATA

    0004$ADAM0002*330004%19770004$BOB 0002*430004%1967 0003$XDA0002*440004%22220003$XOB0002*990004%3333 0100$THIS IS A 100 CHAR FIELD £$%£%$£ + 12345 0030*THIS IS A 30 CHAR ONE

    Result

    Process started >>> $ => ADAM,BOB ,XDA,XOB,THIS IS A 100 CHAR FIELD ú$%ú%$ú + 12345 % => 1977,1967,2222,3333 * => 33,43,44,99,THIS IS A 30 CHAR ONE size of hash: 3. ------------------------------------------------------------ <<< Process finished.