× 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.



The source physical file is an arrival sequence file.  When you write a
record to it via a program it will be added to the _end_ of the source file
member.  You don't have control over this...

One way of handling this programmatically is:

1) copy the original source member to a work file
2) clear the original source member
3) read thru the work file, writing records back to the original source
member
4) at the appropriate spot, write your new record into the original source
file
5) continue reading the old/writing to the original member until %EOF on the
work file

HTH

Steve Landess
Austin, Texas
(512) 423-0935


----- Original Message -----
From: "Smith, Dave" <DSmith@xxxxxxxxx>
To: <midrange-l@xxxxxxxxxxxx>
Sent: Wednesday, March 26, 2003 2:18 PM
Subject: Inserting a line in a source member programmatically


> 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?
>
> David Smith
> Tri-State Hospital Supply Corp.
> IT Consultant
> dsmith@xxxxxxxxx
> 517.546.5400
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/midrange-l
> or email: MIDRANGE-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>

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.