Calling COBOL Modules 调用COBOL模块

Calling COBOL Modules
调用COBOL模块

Using the PeopleCode RemoteCall function, you can call COBOL modules from a PeopleCode action. This option supports existing Application Engine programs that call COBOL modules. You also can use it to upgrade Application Engine programs from previous releases.

使用PeopleCode RemoteCall函数,可以从PeopleCode操作调用COBOL模块。此选项支持调用COBOL模块的现有应用程序引擎程序。您还可以使用它来升级以前版本的应用程序引擎程序。

PTPECOBL Program

PTPECOBL程序

The PTPECOBL interface program is a PeopleSoft executable that enables you to invoke your called COBOL module and pass it required values. You code the RemoteCall function to invoke PTPECOBL, which in turn calls the specified COBOL module.

PTPECOBL接口程序是一个PeopleSoft可执行程序,它使您能够调用所调用的COBOL模块并向其传递所需的值。编写RemoteCall函数来调用PTPECOBL,而PTPECOBL又调用指定的COBOL模块。

If you use PTPECOBL, you do not have to write your own executable to process this task. However, PTPECOBL does not perform any SQL processing other than retrieving a list of state record values. Consequently, if your current logic requires previous SQL processing, you may want to write your own executable file to call your COBOL module. In most situations, PTPECOBL saves you from having to write a custom executable file to handle each call to a generated dynamically loadable code (.GNT) file.

如果使用PTPECOBL,则不必编写自己的可执行文件来处理此任务。但是,除了检索状态记录值列表之外,PTPECOBL不执行任何SQL处理。因此,如果您当前的逻辑需要以前的SQL处理,您可能需要编写自己的可执行文件来调用您的COBOL模块。在大多数情况下,PTPECOBL使您不必编写自定义可执行文件来处理对生成的动态可加载代码(.GNT)文件的每次调用。

PTPECOBL performs the following tasks:

PTPECOBL执行以下任务:

  1. Initializes the specified state record in memory.

初始化内存中的指定状态记录。

  1. Invokes the COBOL module specified in your PeopleCode.

调用PeopleCode中指定的COBOL模块。

  1. Submits required parameters to the called COBOL module.

向调用的COBOL模块提交所需的参数。

  1. Updates the state record as necessary, issues a commit, and then disconnects from the database after your program completes.

根据需要更新状态记录,发出提交,然后在程序完成后断开与数据库的连接。

Note: While your COBOL program runs, it can access and return values to the state record.

注意:当COBOL程序运行时,它可以访问状态记录并返回值。

Shared Values in Application Engine and COBOL

应用程序引擎和COBOL中的共享值

The following options are available for sharing values between the Application Engine program and a called COBOL program:

下列选项可用于在Application Engine程序和被调用的COBOL程序之间共享值:

  • Use state records.
  • 使用状态记录。

If you add field names, Application Engine enables you to pass state record values to the called COBOL program and to get changes passed back to the calling PeopleCode program. If you pass the state record values in this way, use PTPECACH to retrieve and update values just as PTPEFCNV does.

如果添加字段名,Application Engine允许您将状态记录值传递给被调用的COBOL程序,并将更改传递回调用PeopleCode程序。如果以这种方式传递状态记录值,则使用TP PEC ACH来检索和更新值,就像PTPEF CNV所做的那样。

  • Code custom SQL.
  • 代码自定义SQL

If you do not pass initial values using state record fields, you need to insert the appropriate SQL in your called COBOL module to retrieve the appropriate values. Then, to return any updated values to the calling Application Engine program, you must insert the appropriate SQL into a PeopleCode program.

如果不使用状态记录字段传递初始值,则需要在被调用的COBOL模块中插入适当的SQL来检索适当的值。然后,要向调用应用程序引擎程序返回任何更新的值,必须将适当的SQL插入到PeopleCode程序中。

If your COBOL program needs values that do not appear in a state record field, then you can pass PeopleCode variables and values. These variables and values are then retrieved and updated by calling PTPNETRT from within your COBOL program.

如果您的COBOL程序需要的值没有出现在状态记录字段中,那么您可以传递PeopleCode变量和值。然后通过从COBOL程序中调用PTPNETRT检索和更新这些变量和值。

  • Create a custom executable file.
  • 创建自定义的可执行文件。

If you include extra SQL processing and use non-state record values, for consistency purposes, creating a custom executable file might be a better approach. It enables you to call your program directly and have it perform all the PTPNETRT processing. Remember that a RemoteCall command can only call an executable program, not a GNT file.

Syntax and Parameters

语法和参数

This example shows a sample RemoteCall function issued from an Application Engine PeopleCode action to a COBOL module:

这个示例显示了从应用程序引擎PeopleCode操作向COBOL模块发出的RemoteCall函数示例:

RemoteCall ("PSRCCBL",?

 "PSCOBOLPROG", "PTPECOBL",?

 "AECOBOLPROG", "MY_GNT",?

 "STATERECORD", "MY_AET",?

 "PRCSINST", MY_AET.PROCESS_INSTANCE,?

 "RETCODE", &RC,?

 "ERRMSG", &ERR_MSG,?

 "FIELD1", MY_AET.FIELD1,?

 "FIELD2", MY_AET.FIELD2);

This table describes each parameter in the RemoteCall function:

下表描述了RemoteCall函数中的每个参数:

Parameters

Description

PSRCCBL

The Remote Call dispatcher, which runs the specified COBOL program using the connect information of the current operator.

PSCOBOLPROG

Specify the name of the COBOL program to run, which in this case is PTPECOBL.

This parameter makes the remote call from Application Engine distinct from a normal remote call. When you enter this parameter, in effect you enable the following parameters, some of which are required.

AECOBOLPROG

Specify the name of the COBOL module you are calling; for example, MY_GNT.

STATERECORD

Specify the appropriate state record that your Application Engine program will share with your COBOL module; for example, MY_AET. PTPECOBL then reserves space in

memory for all of the fields in the state record, regardless of whether they will ultimately store values for processing.

PRCSINST

Specify the state record and Process Instance field; for

example, MY_AET.PROCESS_INSTANCE. This setting

retrieves the current process instance value that appears on the state record and submits it to your COBOL module using

PTPECOBL.

RETCODE and ERRMSG

(Optional) Include RETCODE if you need to return information about any potential problems that the COBOL processing encountered, or use it if your Application Engine program must know whether it completed successfully.

Fieldnames and Values

Specify any fields in the state record that contain initial values for your COBOL module. The quoted field names you specify must exist in the specified state record. The corresponding value can be a PeopleCode variable, a record.field reference,  or a hard-coded value.

Commit and RemoteCall

提交和远程调用

When using RemoteCall and an Application Engine program:

使用RemoteCall和应用程序引擎程序时:

  • The called COBOL module runs as a separate unit of work.
  • 被调用的COBOL模块作为单独的工作单元运行。
  • Run a commit in the step immediately preceding the step containing the RemoteCall PeopleCode action and also in the step containing the Remote Call PeopleCode action.
  • 在包含RemoteCall PeopleCode动作的步骤之前的步骤以及包含RemoteCall PeopleCode动作的步骤中运行提交。

These two actions enable the COBOL process to recognize the data changes made up to the point that it was called, and minimizes the time when the process might be in a non-restartable state.

这两个动作使COBOL流程能够识别到调用它之前所做的数据更改,并将流程可能处于不可重新启动状态的时间减到最少。

  • If you insert SQL processing into your COBOL module, your module makes commit updates.
  • 如果您在COBOL模块中插入SQL处理,那么您的模块将进行提交更新。

PTPECOBL does not issue any commits.

PTPECOBL不发出任何提交。

  • If the intent of your COBOL process is to update the value of a passed state record field, then the calling Application Engine PeopleCode is responsible for ensuring that the state record field is modified, and the Application Engine program is responsible for committing the state record updates.
  • 如果你的COBOL进程的意图是更新一个传递的状态记录字段的值,那么调用的应用引擎PeopleCode负责确保状态记录字段被修改,应用引擎程序负责提交状态记录更新。
  • Consider how your COBOL module will react in the event of a restart.
  • 考虑您的COBOL模块在重新启动时的反应。

Because the work in COBOL will have already completed and been committed, will your module ignore a duplicate call or be able to undo or redo the work multiple times? You face similar issues when you run a remote call from PeopleCode.

因为COBOL中的工作已经完成并提交,您的模块是否会忽略重复调用,或者能够多次撤消或重做工作?当您从PeopleCode运行远程调用时,也会遇到类似的问题。

  • Typically, when a COBOL program updates the database and then disconnects or terminates without having issued an explicit commit or rollback, an implicit rollback occurs.
  • 通常,当一个COBOL程序更新数据库,然后断开连接或终止,而没有发出显式的提交或回滚时,就会发生隐式回滚。

Without an explicit commit, the database does not retain any updates.

没有显式提交,数据库不会保留任何更新。

Note: By default, RemoteCall does not generate any log files after the program completes. To generate and retain the .out and .err log files, you must set the RCCBL Redirect parameter in the PeopleSoft Process Scheduler configuration file to a value of 1.

附注:默认情况下,RemoteCall在程序完成后不会生成任何日志文件。生成并保留.out和.err日志文件,则必须将PeopleSoft进程计划程序配置文件中的RCCBL重定向参数设置为值1。

See “RemoteCall” (PeopleCode Language Reference).

见“远程调用”(人代码语言参考)

Related Links

“Editing the PeopleSoft Process Scheduler Configuration File” (Process Scheduler)

相关链接编辑PeopleSoft进程调度器配置文件(进程调度程序)

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/169868.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

vue 中如何编写可复用的组件

在Vue中编写可复用的组件的关键是遵循一些最佳实践和设计原则。以下是一些编写可复用组件的技巧: 遵循 Vue 的官方设计原则:Vue 的设计原则包括组件化、数据驱动、可组合性和简洁性。这些原则可以帮助你编写可复用和可维护的组件。命名规范:…

字符串转换成十进制整数

编程要求 输入一个以#结束的字符串,本题要求滤去所有的非十六进制字符(不分大小写),组成一个新的表示十六进制数字的字符串,然后将其转换为十进制数后输出。如果在第一个十六进制字符之前存在字符“-”,则…

Android修行手册-一个滑动旋转的弧形菜单

Unity3D特效百例案例项目实战源码Android-Unity实战问题汇总游戏脚本-辅助自动化Android控件全解手册再战Android系列

springboot3.x+springsecurity6.x多种方式登录验证

最新的 Spring Security 5.7 及以上版本,更新了不少内容,之前的 WebSecurityConfigurerAdapter 已经被废弃了,而且,要同时实现用户名密码登录、手机验证码登录、邮箱、微信小程序等登录方式,跟之前的配置方式都会有所不…

Using the File Class使用文件类

Using the File Class 使用文件类 The file layout class enables you to perform file input and output operations with Application Engine using PeopleCode. A file object enables you to open a file (for reading or writing), read data from a file, or write da…

【Qt绘制仪表盘】

目的 使用Qt的绘制事件绘制一个仪表盘 思路 需要创建一个带绘制事件的控件重写绘制事件显示 实现 以下是实现代码&#xff0c;可复制到程序到&#xff0c;直接运行。 .h // GaugeWidget.h #ifndef GAUGEWIDGET_H #define GAUGEWIDGET_H#include <QWidget>class Ga…

Ubuntu开机显示recovering journal,进入emergency mode

在一次正常的shutdown -r now之后&#xff0c;服务器启动不起来了&#xff0c;登录界面显示recovering journal&#xff0c;主要报错信息如下所示&#xff1a; /dev/sda2:recovering journal /dev/sda2:Clearn... You are in emergency mode. After logging in, type journalc…

Kotlin学习——流程控制,when,循环,range工具 kt里的equals if实现类似三元表达式的效果

Kotlin 是一门现代但已成熟的编程语言&#xff0c;旨在让开发人员更幸福快乐。 它简洁、安全、可与 Java 及其他语言互操作&#xff0c;并提供了多种方式在多个平台间复用代码&#xff0c;以实现高效编程。 https://play.kotlinlang.org/byExample/01_introduction/02_Functio…

Elasticsearch集群部署 head监控插件 Kibana部署 Nginx反向代理 Logstash部署

一、组件介绍1、Elasticsearch&#xff1a;2 、Logstash3、Kibana4、Kafka&#xff1a;5、Filebeat: 二、 Elasticsearch集群部署服务器创建用户安装ES修改配置文件创建数据和日志目录设置JVM堆大小 #7.0默认为4G修改安装目录及存储目录权限系统优化&#xff08;1&#xff09;增…

一定要会用selenium的等待,三种等待方式解读

​很多人问&#xff0c;这个下拉框定位不到、那个弹出框定位不到…各种定位不到&#xff0c;其实大多数情况下就是两种问题&#xff1a; 有frame 没有加等待 殊不知&#xff0c;你的代码运行速度是什么量级的&#xff0c;而浏览器加载渲染速度又是什么量级的&#xff0c;就好…

springboot(ssm大学生创业网站 毕业生创业平台Java(codeLW)

springboot(ssm大学生创业网站 毕业生创业平台Java(code&LW) 开发语言&#xff1a;Java 框架&#xff1a;ssm/springboot vue JDK版本&#xff1a;JDK1.8&#xff08;或11&#xff09; 服务器&#xff1a;tomcat 数据库&#xff1a;mysql 5.7&#xff08;或8.0&#x…

vs2015如何远程启动程序来进行调试

vs远程调试的方式有两种&#xff0c;远程启动方式和附加进程方式。   一般来说&#xff0c;咱们使用vs调试代码时&#xff0c;直接附加进程即可&#xff0c;但某些时候附加进程方式无法命中断点。比如我们想调试的C代码&#xff0c;但是调试的入口程序是C#程序&#xff0c;如…

经典的回溯算法题leetcode棋盘问题思路代码详解

目录 棋盘问题 leetcode51题.N皇后 对回溯算法感兴趣的朋友也可以多多支持一下我的其他文章。 回溯算法详解-CSDN博客 经典的回溯算法题leetcode组合问题整理及思路代码详解-CSDN博客 经典的回溯算法题leetcode子集问题思路代码详解-CSDN博客 经典的回溯算法题leetcode全…

人工智能轨道交通行业周刊-第66期(2023.11.20-11.26)

本期关键词&#xff1a;智能铁鞋、TFDS、道岔密贴检查、Agent、Q*假说 1 整理涉及公众号名单 1.1 行业类 RT轨道交通人民铁道世界轨道交通资讯网铁路信号技术交流北京铁路轨道交通网上榜铁路视点ITS World轨道交通联盟VSTR铁路与城市轨道交通RailMetro轨道世界铁路那些事铁路…

多丽特膳:肥胖与七大营养素的关系、影响及作用

在探讨肥胖与身体的关系时&#xff0c;我们不能忽视七大营养素的重要作用。这些营养素包括碳水化合物、蛋白质、脂肪、维生素、矿物质、膳食纤维和水。它们对肥胖和身体的影响及作用各有不同&#xff0c;一起构成了我们日常饮食的基础&#xff0c;那么让我来给大家说道说道它们…

【2023传智杯】第六届传智杯程序设计挑战赛AB组-ABC题解题分析详解【JavaPythonC++解题笔记】

本文仅为第六届传智杯程序设计挑战赛-题目解题分析详解的解题个人笔记,个人解题分析记录。 本文包含:第六届传智杯程序设计挑战赛题目、解题思路分析、解题代码、解题代码详解 文章目录 一.前言二.比赛题目(AB俩组)A题题目B题题目C题题目三.解题代码A题解题思路解题代码【J…

每日一题 1457. 二叉树中的伪回文路径(中等,DFS)

一句话&#xff0c;深度搜索所有路径&#xff0c;判断路径是否伪回文 # Definition for a binary tree node. # class TreeNode: # def __init__(self, val0, leftNone, rightNone): # self.val val # self.left left # self.right right clas…

TDA4:优势与挑战并存的复杂多核异构芯片

TDA4&#xff1a;优势与挑战并存的复杂多核异构芯片 1、TDA4的优势1.1 强大的计算能力1.2 高度集成化1.3 支持量化技术 2、TDA4的劣势2.1应用门槛高2.2 维护与升级问题 3、总结 随着自动驾驶技术的快速发展&#xff0c;车载芯片作为实现自动驾驶的关键要素&#xff0c;其性能和…

ddns-go部署在linux虚拟机

ddns-go部署ubuntu1804 1.二进制部署 1.虚拟机部署 1.下载linux的x86二进制包 wget https://github.com/jeessy2/ddns-go/releases/download/v5.6.3/ddns-go_5.6.3_linux_x86_64.tar.gz2.解压 tar -xzf ddns-go_5.6.3_linux_x86_64.tar.gz3.拷贝执行文件到PATH下&#xff0c…

通过视频文件地址截取图像生成图片保存为封面图

安装 RPM Fusion 软件库 FFmpeg并不包含在 CentOS 官方软件库中,需要使用第三方软件库安装。可以使用 RPM Fusion 软件库来获取 FFmpeg。 首先,使用以下命令安装 RPM Fusion 软件库: sudo yum install epel-release -y sudo rpm -Uvh https://download1.rpmfusion.org/fre…