|
So your presentation program does what with the service program? Suppose it was a traditional 5250 rpg. Would it do something like: AddRecord(MyFile:MyDataDS); Wouldn't it behoove you to use the standard error structure? * ERRC0100 - Error code data structure D ERRC0100 DS D BytesProvided 9B 0 INZ(%len(errc0100)) D BytesAvail 9B 0 D ExceptionId 7A D Reserved1 1A D ExceptData 250A AddRecord(MyFile:MyDataDS:errc0100); And then based on the results of that, your presentation program could act accordingly? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin MWalter@xxxxxxxxxxxxxxx Sent by: midrange-l-bounces@xxxxxxxxxxxx 04/29/2003 10:40 AM Please respond to Midrange Systems Technical Discussion To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc: Fax to: Subject: Re: Using PF constraints With a service program. I tried a PF constraint, just in testing and could not come up with a good way to trap the violation exception. I haven't tried since V5R2. Maybe the MONITOR instruction will be better for this. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com |--------+-------------------------------------------------------> | | rob@xxxxxxxxx | | | Sent by: | | | midrange-l-bounces+mwalter=hanoverwire.com@xx| | | drange.com | | | | | | | | | 04/29/2003 11:37 AM | | | Please respond to Midrange Systems Technical | | | Discussion | | | | |--------+-------------------------------------------------------> >-----------------------------------------------------------------------------------------------------------| | | | To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> | | cc: | | Subject: Re: Using PF constraints | >-----------------------------------------------------------------------------------------------------------| How do you have your database logic separate? Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin MWalter@xxxxxxxxxxxxxxx Sent by: midrange-l-bounces@xxxxxxxxxxxx 04/29/2003 10:28 AM Please respond to Midrange Systems Technical Discussion To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> cc: Fax to: Subject: Re: Using PF constraints I'd love to be able to use PF constraints and triggers but it seems pretty cumbersome to return the constraint violation messages back to the initial caller. Especially if you have your database logic separate from the presentation logic. If there is a tried and true method of doing this, I'd like to know what it is. Thanks, Mark Mark D. Walter Senior Programmer/Analyst CCX, Inc. mwalter@xxxxxxxxxx http://www.ccxinc.com rob@xxxxxxxxx Sent by: To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx> midrange-l-bounces@xx cc: drange.com Subject: Re: Using PF constraints 04/29/2003 11:05 AM Please respond to Midrange Systems Technical Discussion It depends on your business concerns. Which action do you want to occur if you delete a customer with order history: 1) Stop! I thought that this was an inactive customer. 2) Blast the orders. If 1 is the goal then use *RESTRICT. If 2 is the goal then use *CASCADE. Other concerns may include what if your order history file has children also? Such as order lines. You may have to cascade them also. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin "Saunders, Martin P" <martin.saunders@xxxxxxxx> Sent by: midrange-l-bounces@xxxxxxxxxxxx 04/29/2003 09:37 AM Please respond to Midrange Systems Technical Discussion To: "'midrange-l@xxxxxxxxxxxx'" <midrange-l@xxxxxxxxxxxx> cc: Fax to: Subject: Using PF constraints Hello all, I am canvassing for opinions on using ADDPFCST to effect data purges instead of writing (comparatively) more complex RPG programs to perform this function. The way I see it, if we add the appropriate constraint to a detail file which has an associated header file with a primary key and specify 'cascading delete', deleting records from the header file will automatically zap the associated detail records right? Is there a good reason why I've never seen this being used? Or is it just the shops that I've worked with that do not think this is a useful feature? Thanks in advance for your opinions. Martin ******************************************************************************************** " This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst & Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message ". ******************************************************************************************** _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l. _______________________________________________ This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo.cgi/midrange-l or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-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.