Define a Data Structure, list all the file fields as subfield and overlay it
with an array:
DCL-DS YourDatastructure
FileFld1;
FileFld2;
FileFld3;
...
FileFld32;
Arr Like(FileFld1) Dim(32) Pos(1);
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!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> On Behalf Of Alan Shore
Sent: Dienstag, 12. Juni 2018 19:40
To: rpg400-l@xxxxxxxxxxxx
Subject: File having an array using new free form
Hi everyone
Before I forget - we are on V7r1
I have also posted this question on the Midrange Systems Technical
Discussion side
Here is my situation - hope that it makes sense
I have defined a file where the last 32 fields on the record are all the
same size Fields 1 through 31 represent the day of the month, with field 32
being the total of fields 1 through 31
How can I define these fields within my program (using new free-form) so
that these 32 fields are an array That way, I can use the day of the month
to determine which occurrence I need to deal with
Like I said - I hope my question makes sense
As always - all answers gratefully accepted
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
Alan Shore
E-mail : ASHORE@xxxxxxxx
Phone [O] : (631) 200-5019
Phone [C] : (631) 880-8640
'If you're going through hell, keep going.'
Winston Churchill
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxx for any subscription related questions.
Help support midrange.com by shopping at amazon.com with our affiliate link:
http://amzn.to/2dEadiD
As an Amazon Associate we earn from qualifying purchases.