Advice and suggestions are greatly appreciated. I am a complete newb when it comes to PERL. I will need to capture line 3 if it appears and line 4 always since there will always be a name there. The a/c #'s are supposed to be the same number and have been only represented once in the past so a capture of either is fine. The dates are dd MMM yyyy format yes. Line 18 is the starter of the detail and needs to be included in the first line on the details file. Pad character needs to be a space, there should be no truncating of data but if the data that populates the specific field is longer than the specified width it would truncate certainly ( has not been an issue before). I am going to give the format for the header file now so bear with me. Starting at character 0( is the account number line 8 or 11 and field 1), starting character 18 is field 2(40 characters) static text, character 58 is field 3(40 characters) static text, starting character 98 is field 4(40 characters) static text, starting character 138 is field 5(40 characters) static text, starting character 178 is field 6(40 characters) is line 3 if data exists or line 4 if it does not exist, starting character 218 is field 7(40 characters) and is line 5, starting character 258 is field 8(40 characters) and is line 7, starting character 298 is field 9(40 characters) static text, starting character 338 is field 10(40 characters) static text, starting character 378 is field 11(7 characters which is the first date value on line 12 and needs to be formated to ddmmmyy), starting character 385 is field 12(7 characters, the second date on line 12 and needs to be format ddmmmyy), starting character 392 is field 13(10 characters)static text, starting character 402 is field 14(10 characters) static text, starting character 412 is field 15(40 characters) this is line 4 if line 3 has data and results to blanks if no data on line 3, starting character 452(8 characters) this is the starting line count for the matching detail file, starting character 460(6 characters) this is the count of detail lines outputted to the detail file( used to compute the prior value obviously). If this is unclear, do you have a way I could send you the lay out file and what not so you could see more clearly how it is laid out?

In reply to Re^4: File read and re-ordering by KarmicGrief
in thread File read and re-ordering by KarmicGrief

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.