|
Could you please post the code. I would really appreciate that.
Thanks.
"Denis Robitaille" <DRobitaille@cascades.com>@midrange.com on 09/10/2001
09:21:11 AM
Please respond to rpg400-l@midrange.com
Sent by: rpg400-l-admin@midrange.com
To: <rpg400-l@midrange.com>
cc:
Subject: Re: Advice, urgent
This looks like a classic recursive problem. If you are familiar with
recursion, you should look at it for this situation. In RPG IV, recursivity
is supported with subprocedure. A long time ago, I did something similar in
RPGII using array to simulate a stack (data queue).
If you are not at ease with recursion, let us know and I could post an
algoritmh to scan trought a multilevel part structure.
Denis Robitaille
Directeur services techniques
Cascades Inc
819 363 5187
fax 819 363 5177
>>> RReddy@medicalartspress.com 09/10/01 09:54am >>>
Hello All.
I have the following problem.
There is a parts master file and each part have its own sublevels and each
of these sublevels could have its own sublevels.
For example.
Part P1 has 3 levels
a) logo
b) Color
c) Imprint
Now i could have SubLevels for the option (b) like this
Color has 3 levels
b.1) Position
b.2) Color Imprint
b.3) Cut Size
And also i could have Sublevels within this Sublevels.
What i am trying to store all the part levels with its sublevels into an
array like this
Array Index Value
1 Logo
2 Color
3 Position
4 Color Imprint
5 Cut Size
6 Imprint
And the reason for me to store into an array because lets say the user
wants to delete the color option from the part, I need to delete all the
sublevels with the color options including sublevels within sublevels.
Please advice how can i do this in RPG or RPGLE and remember each sublevels
could have its sublevels and so on.
Thanks Again.
Reddy
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
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-2025 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.