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



This may not be an option to you, but if you can use put constraints
(cascade delete) on these files it will take care of itself.  When you
delete a record in the parent file, the corresponding records in the
dependent files will be deleted as well.  Here's an example:

ADDPFCST FILE(CHILDFILE) TYPE(*REFCST) KEY(KEY1 KEY2) PRNFILE(PARENTFILE)
DLTRULE(*CASCADE)
ADDPFCST FILE(CHILDFILE2) TYPE(*REFCST) KEY(KEY1 KEY2) PRNFILE(PARENTFILE)
DLTRULE(*CASCADE)

Phil

> -----Original Message-----
> From: rpg400-l-admin@midrange.com [mailto:rpg400-l-admin@midrange.com]On
> Behalf Of RReddy@medicalartspress.com
> Sent: Monday, September 10, 2001 9:54 AM
> To: RPG400-L@midrange.com
> Subject: Advice, urgent
>
>
>
> 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.
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.