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



Why can't you just
CPYF FROMFILE(SRCFILE) TOFILE(DSTFILE) FROMRCD(1) FMTOPT(*MAP *DROP)

FROMRCD(1)
- will preserve the physical RRN order from source to destination
FMTOPT(*MAP *DROP)
- will handle mismatched formats. Assuming the field names match and
types between matched name are compatible.

Otherwise, I don't think you can do it via RPG.

Maybe C/C++

Charles

On Wed, Aug 11, 2021 at 3:32 PM Paul Nicolay <paul.nicolay@xxxxxxxxxx>
wrote:

To be short... I'm trying to replicate a file with respect of the RRN
numbers.

And to make it more complex... I can't replicate it in sequential order,
but it needs to be random.
And second... the files don't have the same layout.
________________________________________
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> on behalf of John
Yeung <gallium.arsenide@xxxxxxxxx>
Sent: Wednesday, August 11, 2021 23:14
To: RPG programming on IBM i
Subject: Re: Write a record at a specific RRN

On Wed, Aug 11, 2021 at 4:40 PM Paul Nicolay <paul.nicolay@xxxxxxxxxx>
wrote:

The concept is that I don't know the file definition... ie. unique keys,
constraints, ... so writing dummy records is not possible as it might
violate the restrictions.

Even if it would work, once I write a dummy record I don't know if it is
"occupied" or not.

This is a very strange set of requirements you have. Can you describe
at a higher level what you are trying to do?

John Y.
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com

--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.