|
Birgitta, I can do that but does this solve my problem? Because, at first
sight, the only difference is I will use an array index instead of %occur
BIF to retrieve the DS values; under the covers, is it not the same idea
like MODS?
Thank you
Florin Todor
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Birgitta Hauser
Sent: Monday, September 27, 2010 12:13 PM
To: 'RPG programming on the IBM i / System i'
Subject: AW: MODS Likerec
Why do you want to use a MODS, why not defining an Array Data Structure?
D MYDS DS Dim(12345)
D MyRec LikeRec(MyRecord)
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
Im
Auftrag von Tom Huff
Gesendet: Monday, 27. September 2010 18:02
An: 'RPG programming on the IBM i / System i'
Betreff: RE: MODS Likerec
Try creating another subfile and read from one and write to another and
then
back to the original with the records inserted on one of the passes.
Tom
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Florin Todor - YYZ Concord
Sent: Monday, September 27, 2010 10:26 AM
To: rpg400-l@xxxxxxxxxxxx
Subject: MODS Likerec
Hello everyone,
Before posting this question I hesitated a lot, because I know it is
something basic for most of you; unfortunatelly I couldn't find the
answer myself, so please help!
This is the idea: I have a subfile populated by the user. I want to
insert some records between already existed records if some criteria is
met. My idea was to read the entire subfile and to save it to a MODS
defined with LIKEREC(the subfile record name), clear the subfile and
repopulated it one by one record (reading MODS) and inserting, when
needed, the new subfile records.
My problem is I cannot retrieve the MODS. I do an %OCCUR(mods-name) = 1
and a WRITE the subfile record. In this moment, I thought the subfile is
automagically populated because they have the same field names... but
it's not!
Thank you
Florin Todor
<mailto:ftodor@xxxxxxxxxxxxxxxx>
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
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.