Just a general question using API’s
Are you all using API’s to update a database? If so, how are you handling record lock so its taking the last update etc…


--Captain Ron


From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Jon Paris
Sent: Tuesday, February 11, 2025 11:48 AM
To: RPG programming on the IBM i (AS/400 and iSeries) <rpg400-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Find control boundary with a machine interface instruction

Understood.

Were you not able to use the CEE APis to create the type of error handling you needed? We spent many, many hours trying to engineer a system that removed the need to traverse the stack and locate control boundaries.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx<mailto:Jon.Paris@xxxxxxxxxxxxxx>



On Feb 11, 2025, at 3:46 AM, datil400 <datil400@xxxxxxxxx<mailto:datil400@xxxxxxxxx>> wrote:

Hi Jon,

In 2010, Junlei Li published an article explaining how to traverse the call
stack using MI. Very fast and efficient, no need to load the entire call
stack. That utility provided a lot of information about the call stack
entry, but not the ‘control boundary’.

I have been using a self-developed tool for exception handling in RPG for
several years, in which I use the Junlei utility. Now I need to find out
the 'control boundaries', at least the nearest one, for some procedures
responsible for sending messages.

My idea is to simulate the new %target(*CTLBDY...) built-in in my exception
handling tool.

As a challenge I find it very interesting. If there is no other choice, I
will use the QWVRCSTK API.
Best regards,

Javier Mora

El lun, 10 feb 2025 a las 18:46, Jon Paris (<jon.paris@xxxxxxxxxxxxxx<mailto:jon.paris@xxxxxxxxxxxxxx>>)
escribió:

Perhaps if you told us _why_ you want this and what you plan on using it
for we might be able to offer some alternative suggestions.


Jon Paris
Jon.Paris@xxxxxxxxxxxxxx<mailto:Jon.Paris@xxxxxxxxxxxxxx>



On Feb 10, 2025, at 12:44 PM, datil400 <datil400@xxxxxxxxx<mailto:datil400@xxxxxxxxx>> wrote:

Thanks Marco for your help.


With the instructions FNDRINVN, MATINVAT and MATPTRIF, I am trying to get
whether any stack entry is a control boundary or not. I am not finding
this
information when materializing the corresponding pointers.

I think I could deduce it from the activation group mark by comparing it
with the previous entry.

I don't know if I'm on the right track.
Javier Mora

El lun, 10 feb 2025 a las 17:38, Marco Facchinetti (<
marco.facchinetti@xxxxxxxxx<mailto:marco.facchinetti@xxxxxxxxx>>) escribió:



https://www.ibm.com/docs/en/i/7.5?topic=execution-materialize-invocation-stack-matinvs<https://www.ibm.com/docs/en/i/7.5?topic=execution-materialize-invocation-stack-matinvs>

But don't forget:

Warning
The following information is subject to change from release to release.
Use
it with caution and be prepared to adjust for changes with each new
release.

Note
It is recommended that you use Materialize Invocation Attributes
(MATINVAT)
or Materialize Invocation Entry (MATINVE) to materialize an 8-byte
invocation mark. 4-byte marks can wrap and produce unexpected results.

--
Marco Facchinetti

Mr S.r.l.

Tel. 035 962885
Cel. 393 9620498

Skype: facchinettimarco


Il giorno lun 10 feb 2025 alle ore 17:06 datil400 <datil400@xxxxxxxxx<mailto:datil400@xxxxxxxxx>>
ha
scritto:

Hi guys,

QWVRCSTK API and STACK_INFO table function return information about the
control boundary of each entry in the call stack.

I have been investigating to find out if it is possible to obtain this
data
through the machine interface. I have not found anything that helps me.

Is this possible?
Best regards

--
Javier Mora
https://github.com/datil400<https://github.com/datil400>
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription
related
questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription
related
questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription
related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related
questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.


--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l<https://lists.midrange.com/mailman/listinfo/rpg400-l>
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx<mailto:RPG400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l<https://archive.midrange.com/rpg400-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx<mailto:support@xxxxxxxxxxxxxxxxxxxx> for any subscription related questions.

________________________________

The information contained in this e-mail is intended only for the individual or entity to whom it is addressed. Its contents (including any attachments) may contain confidential and/or privileged information. If you are not an intended recipient you shall not use, disclose, disseminate, copy or print its contents. If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message. Continental Express, Inc. and its subsidiaries and affiliates will not be held liable for the unintended or unauthorized use of any information contained in this email or as a result of any additions or deletions of information originally contained in this email.

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.