|
James, Unfortunately, none of the permutations I tried using
level breaks generated the correct sequence of segments, spaces, and line breaks.
You didn't provide much information on the FOO file, so I'll assume we have fields CustID, NoteID, SegmentID, and Text. We never need the segment ID portion at all. Consider the following code snippet: <pre> FFoo IP E K Disk FBar O E K Disk D AllNotes S 16384 Varying D CRLF C x'0D25' IFoo NS I CustID L2 I NoteID L1 C L2 Eval AllNotes = '' C Eval AllNotes = AllNotes + %trim( Text ) + ' ' CL1 Eval AllNotes = AllNotes + CRLF + CRLF CL2 Write BarRecFmt </pre> The first calc line above clears the varying length output field. The next line appends a segment of text and adds a space. At the end of a given note, I append two CRLF pairs -- the first to end the paragraph and the second to put a blank line between them. The final calc line is where the AllNotes field can be written to the Bar output file. The above does leave an extraneous blank before the line breaks at the end of each note, but I don't think that is any big deal. Doug
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.