伪会话式 CICS 编程与会话式 CICS 编程相比有何优点?

发布于 2025-01-03 07:55:00 字数 56 浏览 5 评论 0原文

我试图理解伪会话式 CICS 编程和会话式 CICS 编程之间的区别。每种方法的优点和缺点是什么?

I am trying to understand the differences between pseudo conversational and conversational CICS programming. What are the advantages and disadvantages of each approach?

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

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

发布评论

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

评论(3

等你爱我 2025-01-10 07:55:00

NealB 的答案是一个很好的答案,您应该阅读

IBM 的描述

伪会话程序的主要优点是减少了计算机资源的使用,并且它们不能持有数据库锁。

  --------------------------------------------------------------

我将尝试用非 IBM 大型机术语来表达答案

在对话式编程中,程序发送一个屏幕并等待用户响应。
该程序将保留内存、数据库资源等。

   Send Screen and wait for a users response
   Evaluate user-response
   when PF2
      Do Something
   when PF3    
      Do Some Thing else

伪会话编程基本上是基于事件的编程的另一个名称。

  • 伪会话程序响应用户操作或事件(即 PF 键)。
  • 伪会话程序仅在以下情况下运行
    1. 由另一个程序启动/调用
    2. 用户执行某些操作(例如按 Enter/pk 键)。
      在两次之间 - 所有资源都被释放

伪会话程序有点像 Java swing(或任何其他 Swing、Web、SWT 等价物)中的 ActionListener

我倾向于像

   Initialise and get-screen and user-action
   Evaluate 
   when initial-entry
      Initial stuff
      Send initial screen 
      
   When PF2 /* Delete Action */
      Do Delete
      Send Response
   When PF3 /* Insert Action */
      ......   
   end-evaluate
   exit program
   

在 java-Swing 中那样构造 CICS,您可以将上面的内容写为

Class MyScreen implements ActionListener {

   public MyScreen() {
       Initial stuff
       Add this actionlistners to various buttons
       Display screen 
   }
   
   
    public void actionPerformed(ActionEvent e) {

       if (e.getSource() == deleteButton) {
          Do Delete
          update screen
       } else if (e.getSource() == insertButton) {
          .......
       }
   }
 }

For对于那些不是来自大型机背景的人来说,CICS 是像任何 Web 服务器一样的应用程序服务器,但 CIC 不是发送网页和接收 HTML 请求,而是发送 3270 终端屏幕并接收来自 终端。

注意:CIC 也可以用作 Web 服务器。

NealB's answer is a good one, and you should read

IBM's description

The main advantage pseudo conversational programs is reduced Computer resource usage and they can not hold Database locks.

  --------------------------------------------------------------

I am going to try and express the answer in Non IBM-Mainframe Terms

In conversational programming, The program sends a screen and waits for the user to respond.
The program will hold on to memory, database resources etc.

i.e.

   Send Screen and wait for a users response
   Evaluate user-response
   when PF2
      Do Something
   when PF3    
      Do Some Thing else

Pseudo-conversational programming is basically another name for Event-Based-Programming.

  • A pseudo-conversational program responds to User Actions or Events (i.e. PF keys).
  • A pseudo-conversational program is only run when
    1. Started/called by another program
    2. The user does certain actions (e.g. hits enter/pk-key).
      in-between tims- all resources are released

A pseudo-conversational program is bit like a ActionListener in Java swing (or any other Swing, Web, SWT equivalents)

I tend to Structure CICS like

   Initialise and get-screen and user-action
   Evaluate 
   when initial-entry
      Initial stuff
      Send initial screen 
      
   When PF2 /* Delete Action */
      Do Delete
      Send Response
   When PF3 /* Insert Action */
      ......   
   end-evaluate
   exit program
   

In java-Swing you could write the above as

Class MyScreen implements ActionListener {

   public MyScreen() {
       Initial stuff
       Add this actionlistners to various buttons
       Display screen 
   }
   
   
    public void actionPerformed(ActionEvent e) {

       if (e.getSource() == deleteButton) {
          Do Delete
          update screen
       } else if (e.getSource() == insertButton) {
          .......
       }
   }
 }

For those not from a Mainframe background, CICS is a Application-Server like any Webserver, but instead of sending Web pages and recieving HTML requests, CIC's sends and 3270-Terminal screens and recieves responses from the Terminal.

Note: CIC's can also be used as a Web server as well.

梦在夏天 2025-01-10 07:55:00

这是一个链接 比较会话式 CICS 和伪会话式 CICS

基本区别在于,在会话式 CICS 中,进程(程序)是“活动的”并持有资源(例如内存、
数据库锁)
在等待事件时(例如用户从屏幕地图提供的数据)。
在伪会话 CICS 中,进程在等待时“死亡”(CICS RETURN)
使事件发生。启动新的工作单元并重新分配资源以响应触发事件。

伪转换 CICS 经常用于在 CICS 中构建交互式应用程序。该技术资源效率高
因为内存和数据库锁是在用户“思考”时释放的 - 这是大多数时间。净收益为
更有效地利用资源,但需要花费更多精力来管理数据库一致性,因为这取决于
程序员确保事务完整性(由于在“对话”过程中丢失锁)。

这个大纲只涵盖了主题的本质。虽然还有很多事情要做,但这只是一个开始。

Here is a link comparing conversational and pseudo conversational CICS

The basic difference is that in conversational CICS a process (program) is "alive" and holding resources (e.g. memory,
database locks)
while waiting for an event (e.g. user supplied data from a screen map).
In pseudo conversational CICS the process "dies" (CICS RETURN) while waiting
for an event to occur. A new unit of work is started and resources are re-allocated in response to the triggering event.

Pseudo converstional CICS is frequently used to build interactive applications in CICS. This technique is resource efficient
since memory and database locks are released while the user is "thinking" - which is most of the time. The net benefit is
more efficient use of resources but it takes a bit more effort to manage database consistency since it is up to the
programmer to ensure transaction integrity (due to loosing locks over the course of the "conversation").

This outline only covers the essence of the topic. There is a whole lot more to it than this, but it is a start.

梦开始←不甜 2025-01-10 07:55:00

简短的回答是,伪会话代码不包含 EXEC CICS SEND MAP,逻辑上后跟 EXEC CICS RECEIVE MAP,而无需介入逻辑 EXEC CICS RETURN。因此,您的程序在用户“思考时间”期间不会消耗 CICS 资源。

当您的程序 EXEC CICS RETURN 时,您可以将状态信息保存在逗号(传统)或具有一个或多个容器的通道中(自 CICS TS 3.1 起)。

还有更多细节,但这只是其基本内容。

The short answer is that Pseudoconversational code does not contain an EXEC CICS SEND MAP logically followed by an EXEC CICS RECEIVE MAP without an intervening logical EXEC CICS RETURN. Thus your program is not consuming CICS resources during user "think time."

When your program EXEC CICS RETURNs, you can save state information in either a commarea (traditional) or a channel with one or more containers (since CICS TS 3.1).

There are more details, but that's the bare bones of it.

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