在RPG中使用激活组的真正优点是什么

发布于 2025-02-14 02:06:40 字数 76 浏览 0 评论 0原文

有人可以告诉我使用激活组的真正优势是什么。我的意思是,除了我们可以将一堆程序停用的事实之外,实际优势激活组为我们提供了不使用它的实际优势。

Can someone kindly tell me what is the real advantage of using an activation group. I mean other than the fact that we can deactivate a bunch of programs together what real advantage does activation group provide us over not using it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

疯狂的代价 2025-02-21 02:06:41

另一个现实生活中的例子,来自其他POV:我是一个爱好者的使用者,并故意使用并在一个较旧的速度系统上使用和开发。

最近,我构建了一个小型ILE RPG应用程序,该应用程序仅显示一个静态字符串的屏幕,您可以放置​​光标并按照帮助,以获取一个格式良好的帮助文本面板。

我发现dftactgrp(*yes)在编译时(而不是我的默认dftactgrp(*no)actgrp(*new))在启动该程序时会差异。以旧样式共享激活组运行可节省CPU周期。就像您在已经存在的命名激活组中运行时所观察到的一样。

Another real life example, from a different PoV: I'm a Hobbyist user and deliberately using and developing on a rather old and slow system.

Lately I've built a tiny ILE RPG application which just displays a screen of static strings you can put your cursor on and press help to get a nicely formatted help text panel.

I found DFTACTGRP(*YES) when compiling (instead of my default DFTACTGRP(*NO) ACTGRP(*NEW)) makes a seizable difference when starting that program. Running in the old style shared activation group saves CPU cycles. The same like you would observe when running in an already existing named activation group.

思慕 2025-02-21 02:06:40

在进行ILE激活组之前,每个程序都在给定的作业中共享某些资源,而激活组仅在激活组中共享。

我将您指向 ile概念手册

所有ILE程序和服务程序均已激活
作业的子结构称为激活组。此子结构
包含运行程序所需的资源。这些资源
属于以下一般类别:静态程序变量
动态存储临时数据管理资源某些类型的
例外处理程序和结束程序

这些资源之间的分离激活组支持
基本概念。也就是说,所有程序都激活了这个概念
在一个激活组中,开发为一个合作社
应用程序。

临时数据管理资源包括以下内容:
打开文件(打开数据路径或ODP)
承诺定义本地SQL光标
远程SQL光标
分层文件系统(HFS)
用户界面管理器
查询管理实例
开放通信链接
通用编程接口(CPI)通信

但是您要求的好处是什么。很简单,实际上,当使用各种供应商的应用程序和/或工具时,激活组提供了它们之间的隔离。

让我提供一个“现实生活”的示例,以保存一天的激活组。我正在构建一个使用Scott Klement的令人敬畏的HTTP API工具的应用程序。根据最佳实践, *SRVPGM用ActGRP( *呼叫者)定义。我的用例PGMA需要保持与给定端点的持续连接。但是,定期,我还需要调用PGMB,该PGMB还使用HTTP API击中了另一个端点。 HTTP API并非旨在同时支持多个连接。但是,通过简单地运行PGMA和PGMB是单独的激活组,我可以获得HTTP API *SRVPGM激活的多个副本,并成功地连接到多个端点。

Prior to ILE Activation groups, every program ran in a given job shared certain resources, with activation groups these are shared only within an activation group.

I'll point you toward the ILE Concepts manual

All ILE programs and service programs are activated within a
substructure of a job called an activation group. This substructure
contains the resources necessary to run the programs. These resources
fall into the following general categories: Static program variables
Dynamic storage Temporary data management resources Certain types of
exception handlers and ending procedures

The separation of these resources among activation groups supports a
fundamental concept. That is, the concept that all programs activated
within one activation group are developed as one cooperative
application.

The temporary data management resources include the following:
Open files (open data path or ODP)
Commitment definitions Local SQL cursors
Remote SQL cursors
Hierarchical file system (HFS)
User interface manager
Query management instances
Open communications links
Common Programming Interface (CPI) communications

But what's the benefit you asked. Simple really, when working with applications and/or tools from various vendors, activation groups provide for segregation between them.

Let me provide a "real-life" example of activations groups saving the day. I was building a application that used Scott Klement's awesome HTTP API tooling. As is best practice, the *SRVPGM was defined with ACTGRP(*CALLER). My use case, PGMA, required maintaining a persistent connection to a given end point. However, periodically, I also needed to call PGMB which also used HTTP API to hit another endpoint. HTTP API isn't designed to support multiple connections at the same time. However, by simply running PGMA and PGMB is separate activation groups, I could get multiple copies of the HTTP API *SRVPGM activated and successfully connect to multiple endpoints at the same time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文