× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Sounds like my suggestion to use STRQMQRY OUTPUT(*OUTFILE) to the same member, sorting on the sequence number. I don't know FMTDTA (although have been interested), but I do know SQL enough for this. Does require an OVRDBF first for the member, however.

Vern

At 09:11 PM 3/26/2003 -0500, you wrote:
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



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.