|
This was very similar to my thought... call the Sort (QLGSORT) API and just sort into the same member. Tom Liotta midrange-l-request@xxxxxxxxxxxx wrote: > 5. Inserting a line in a source member programmatically > (Frank.Kolmann) > >This shows my age but, >after you have closed the source member you could >sort (FMTDTA) the mbr (use Input over Output) >FMTDTA INFILE((lib/QRPGSRC mbr)) > OUTFILE(lib/QRPGSRC mbr) > SRCFILE(lib/QFMTSRC) SRCMBR(SORTSRC) >This is the lib/QFMTSRC SORTSRC specs. >0001.00 HFILE 6A X >0002.00 FNC 1 6 >0003.00 FDC 1 6 >0004.00 FDC 7 12 >0005.00 FDC 13 92 <<<<<< The 92 may need to change >to match length of your source file records. > >At 03:18 PM 3/26/2003 -0500, you wrote: >>We are trying to search through all our program source members looking for > >>a specific file, and if found, insert a line of source via an RPGLE >>program. When writing the new line of source, we set the sequence number >>(SRCSEQ)to be between the two lines where we want to add the new >>line. When the program ends and we look at the source via SEU, the new >>lines are always at the end. The system automagically resets the sequence > >># of the new lines. How do we get around this? -- -- Tom Liotta The PowerTech Group, Inc. 19426 68th Avenue South Kent, WA 98032 Phone 253-872-7788 x313 Fax 253-872-7904 http://www.powertechgroup.com __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promos=380455
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.