Hi Selinta,
You're a very old release of One World there so I am not sure if what I'm about to say can be done.
There are BSFNs to read through a text file, line by line (B76B0220 Fetch Next Line from Flat File). It has a file line pointer that enables us to read lines of a text file. So you'll need this one.
Then in the same BSFN there is another module (Append Line to Flat File)
I guess with a bit of manipulation you could read from one file and then insert into a new file at the point you want????
Have a look at these:
B4700230
B76B0220
B34A1010
Then if you get no joy, search this table in JDE, F9862 for the words 'Flat' or 'File' or 'Text' etc.
You maybe lucky in that you can add at a point of your choice, but I think they only add at the end. Unless you recreate the file in the order you want, as mentioned above.
If you can't add a line mid way, this would work:
Another way could be for you to actually use a JDE work file TBLE with a LNID type value. Use the read BSFN above to read the existing file and store the text into your new TBLE file.
Make sure an alias is long enough to store your text.
Use LNID as you can have the gaps you may need. So 1.000 2.000 (we can insert 1.001 1.002 etc)
You can read through and point to whatever record you want at will.
When you're finished, sequence by LNID and move that database table to a new file