全栈-02-大型机与遗留系统
标签搜索
全栈-02-大型机与遗留系统
程序员的自留地

全栈-02-大型机与遗留系统

fiora
2026-10-21 / 0 评论 / 9 阅读
本段 274 题 | 来源:fullstack + general + design | 知识点:大型机与遗留系统

1. What are the most significant differences between the CALL, CALLB, and CALLP formats?

CALL、CALLB 和 CALLP 格式之间最显著的区别是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b994f7 | 官方: 否 | 付费: 否

答案:

  • CALL is a dynamic call that is placed from PGMA to PPGMB. PGMB assumes charge of the situation.
  • CALLB is an abbreviation for a prototyped call, which refers to the act of calling a module that has no procedure but does have a default procedure.
  • CALLP is a prototyped call that connects to a NOMAIN module that contains multiple procedures.

2. What is AS400?

什么是 AS400?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b994fa | 官方: 否 | 付费: 否

答案:

The AS/400, which has been formally renamed the "IBM iSeries" but is still popularly referred to by its former name, "AS/400," is a midrange server that was designed for use in smaller organizations as well as organizations that are part of larger companies. It has been modified to function well with web applications in distributed networks therefore, this is the primary focus of the development. The AS/400 makes use of a technology known as the PowerPC microprocessor, which is a form of computer technology that has a simplified instruction set. O/S/400 is the operating system that controls it. IBM's goal with the AS/400 is to provide a versatile all-purpose server that can replace PC servers and Web servers in organizations around the world, competing with Wintel and UNIX servers and providing its massive customer base with an immediate jump into the Internet by offering many terabytes of disc storage and a Java virtual memory that is directly connected to the operating system.

AS/400 已被正式更名为“IBM iSeries”,但仍普遍以其旧称“AS/400”被提及,是一种中端服务器,设计用于较小组织以及大型公司下属组织。它已被修改以适应分布式网络中的 Web 应用程序,因此这是开发的主要重点。AS/400 使用称为 PowerPC 微处理器的技术,这是一种具有简化指令集的计算机技术。O/S/400 是控制它的操作系统。IBM 在 AS/400 上的目标是提供一种多功能通用服务器,以取代全球组织中的 PC 服务器和 Web 服务器,与 Wintel 和 UNIX 服务器竞争,并通过提供数 TB 的磁盘存储和直接与操作系统连接的 Java 虚拟内存,使其庞大的客户群能够立即接入互联网。

3. Explain the difference between a command and an application programming interface (API) in AS400?

请解释 AS400 中命令和应用程序编程接口(API)之间的区别?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b994fd | 官方: 否 | 付费: 否

答案:

  • A command is a piece of software that is executed from the command line of an AS400 computer.
  • An API is a collection of coding instructions that may be called from within another application.

4. What are some of the most popular AS400 commands?

AS400 中最常用的一些命令有哪些?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99500 | 官方: 否 | 付费: 否

答案:

The most popular AS400 commands are DSPOBJD, WRKOBJ, and CHGPF. Interacting with objects, displaying information about those objects, and modifying physical files are correspondingly handled by the DSPOBJD, WRKOBJ, and CHGPF commands.

AS400 中最常用的命令是 DSPOBJD、WRKOBJ 和 CHGPF。相应处理对象交互、显示这些对象的信息以及修改物理文件的分别是 DSPOBJD、WRKOBJ 和 CHGPF 命令。

5. What is the most significant difference between SFLCLR and SFLINZ?

SFLCLR 和 SFLINZ 之间最显著的区别是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99503 | 官方: 否 | 付费: 否

答案:

Any data that had been added to the subfile in the past can be removed using the SFLCLR command. SFLINZ will delete all of the data that was previously loaded into the Subfile, and it will then initialize the character fields with nothing, while also setting the numeric fields to zero.

使用 SFLCLR 命令可以删除过去添加到子文件中的任何数据。SFLINZ 将删除之前加载到子文件中的所有数据,然后用空值初始化字符字段,同时将数字字段设置为零。

6. What's the difference between WRITE and EXCPT?

WRITE 和 EXCPT 有什么区别?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99506 | 官方: 否 | 付费: 否

答案:

  • WRITE allows you to write to the database file as well as device files.
  • EXCPT is used in the O specs program to write to the PRTF or database file.

7. How exactly does one go about renaming a library in AS400?

在 AS400 中,究竟如何重命名库?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99509 | 官方: 否 | 付费: 否

答案:

If you want to change the name of a library that is currently being used in AS400, you will need to use the CHGLIB command. If you use this command, you will not only be able to modify the name of the library, but you will also be able to change the description of the library if you so choose.

如果您想更改 AS400 中当前使用的库的名称,您需要使用 CHGLIB 命令。如果使用此命令,您不仅能修改库的名称,而且如果您愿意,还可以更改库的描述。

8. How exactly does one go about copying members from one source file to another using AS400?

在 AS400 中,究竟如何将成员从一个源文件复制到另一个源文件?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9950c | 官方: 否 | 付费: 否

答案:

To copy members from one source file to another in AS400, you can make use of either the CPYFRMSTMF command, which translates to "copy from stream file," or the CPYTOSTMF command, which translates to "copy to a stream file." Both of these commands can be found in the "stream file" section of the AS400 command reference.

在AS400中,要将成员从一个源文件复制到另一个源文件,可以使用CPYFRMSTMF命令(意为“从流文件复制”)或CPYTOSTMF命令(意为“复制到流文件”)。这两个命令都可以在AS400命令参考的“流文件”部分找到。

9. What do the terms "CLEAR" and "RESET" refer to exactly?

“CLEAR”和“RESET”这两个术语具体指什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9950f | 官方: 否 | 付费: 否

答案:

  • When you execute the CLEAR command in an RPG program, the value of a variable will be reset to its default value, which is regarded as a low value.
  • When you execute the RESET command, the value of its Initialized parameter will be reset to the value that was supplied in the INZ keyword.

10. How to check if a job is currently running on an AS400 system?

如何检查一个作业当前是否在AS400系统上运行?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99512 | 官方: 否 | 付费: 否

答案:

On an AS400 system, you can use the WRKACTJOB command to find out if a job is running or not. This command will show you a list of all the jobs that are currently running on the system, so you can find the one you want.

在AS400系统上,您可以使用WRKACTJOB命令来确定作业是否在运行。此命令将显示系统上当前运行的所有作业列表,以便您找到所需的那个。

11. When using the AS400, what methods are available for retrieving data from a database?

使用AS400时,有哪些方法可用于从数据库检索数据?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99515 | 官方: 否 | 付费: 否

答案:

When working with AS400, you will need to use the SQL Select statement to get data from a database. This is a must-have first step. If you use this statement, you can specify the columns and rows from which you want to get the data. This gives you more control over the results of the query.

使用AS400时,您需要使用SQL Select语句从数据库获取数据。这是必须的第一步。如果使用此语句,您可以指定要从中获取数据的列和行,这使您对查询结果有更多控制权。

12. What are Program Entry Procedures (PEP) and User Entry Procedures (UEP?

什么是程序入口过程(PEP)和用户入口过程(UEP)?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b99518 | 官方: 否 | 付费: 否

答案:

  • PEP, If a program is made up of numerous different modules, the question of which module should be executed first arises while the programs are being run. As a consequence of this fact, the name of the module that is supplied in PEP will be executed initially.
  • UEP, The control will then be transferred to the very first statement included within that module when the program is run for the first time.

13. What are the many kinds of items that can be utilized with the AS400 system?

AS400系统可以使用的项目类型有哪些?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9951c | 官方: 否 | 付费: 否

答案:

The AS400 allows the use of a wide variety of object types, including libraries, programs, instructions, files, and databases. These can all be accessed and utilized by the user. Files fall under the category of other categories.

AS400允许使用各种对象类型,包括库、程序、指令、文件和数据库。这些都可以由用户访问和使用。文件属于其他类别之下。

14. Could you give me some examples of useful programs that have been written in the RPGLE programming language?

能否给我一些用RPGLE编程语言编写的有用程序的例子?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b9951f | 官方: 否 | 付费: 否

答案:

Some examples of helpful programs that have been written in RPGLE programming language include the following:

用RPGLE编程语言编写的一些有用程序示例包括以下内容:
  1. An application for computing and displaying information on employee payrolls is called payroll software. 2. A system that keeps track of stock levels and automatically sends orders to restock whenever they fall below a certain threshold 3. A piece of application software that generates bills for individual customers. 4. A program that manages the accounts of customers and the contact information associated with them 5. A piece of software that allows for the organization of appointments as well as the tracking of service requests from clients.

    1. 一个用于计算和显示员工工资信息的应用程序称为工资软件。2. 一个跟踪库存水平并在库存低于某个阈值时自动发送订单补货的系统。3. 一个为个人客户生成账单的应用程序软件。4. 一个管理客户账户及其关联联系信息的程序。5. 一个允许安排约会以及跟踪客户服务请求的软件。

15. What is meant by the term "bind by reference"?

“按引用绑定”是什么意思?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99522 | 官方: 否 | 付费: 否

答案:

When we first create a module, we bind that module to an SRVPGM and then use that SRVPGM in one or more of our programmes, we are implementing a method that is known as " bind by the reference ".

当我们首次创建一个模块时,将该模块绑定到SRVPGM,然后在一个或多个程序中使用该SRVPGM,我们正在实现一种称为“按引用绑定”的方法。

16. What is meant by the phrase "bind by copy"?

“按复制绑定”是什么意思?
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99525 | 官方: 否 | 付费: 否

答案:

The procedure of constructing a module and then instantly connecting it to PGM is referred to as "bind by copy." At any point in time, we are free to delete the module and transfer the PGM to any other system, where it can then be operated. If we do this, the module will no longer be accessible. We do not require the module at this time because all of the references to the module have already been migrated to the PGM.

构建一个模块然后立即将其连接到PGM的过程被称为“按复制绑定”。在任何时候,我们都可以自由删除该模块并将PGM转移到任何其他系统,在那里它可以运行。如果我们这样做,该模块将不再可访问。此时我们不需要该模块,因为所有对模块的引用都已迁移到PGM中。

17. What are IBM I Services, commonly referred to as IWS? Is it even possible to put them up without ILE being installed in the first place?

什么是 IBM i 服务,通常简称为 IWS?在没有预先安装 ILE 的情况下,是否有可能部署它们?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99528 | 官方: 否 | 付费: 否

答案:

IBM I Services (IWS) are a collection of tools and services that are available for use on the IBM I platform. These tools and services make it possible to create, manage, and consume web services.

IBM i 服务(IWS)是一组可在 IBM i 平台上使用的工具和服务的集合。这些工具和服务使得创建、管理和消费 Web 服务成为可能。

It is possible to install IWS without ILE; but, doing so will result in significant reductions in a number of the capabilities and functions.

在没有 ILE 的情况下安装 IWS 是可行的;但是,这样做将导致许多能力和功能显著减少。

18. How well do you understand the PASE environment in AS400? Describe your degree of understanding.

你对 AS400 中的 PASE 环境了解多少?请描述你的理解程度。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9952b | 官方: 否 | 付费: 否

答案:

The acronym PASE stands for " Portable Application Solutions Environment ," and it is this environment that enables AS400 applications to run on other platforms such as Windows and Linux. PASE was developed by IBM. Its primary purpose is to act as a compatibility layer, which makes it possible for AS400 applications to be portable and run on a range of different systems.

缩写 PASE 代表“可移植应用程序解决方案环境”,正是这个环境使 AS400 应用程序能够在 Windows 和 Linux 等其他平台上运行。PASE 由 IBM 开发。其主要目的是充当兼容层,使 AS400 应用程序具有可移植性,并能在各种不同系统上运行。

19. In specific terms, what are the responsibilities of an AS/400 administrator?

具体而言,AS/400 管理员的职责是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9952e | 官方: 否 | 付费: 否

答案:

The management and maintenance of the AS/400 system fall under the purview of the persons who have the title of AS/400 administrator. This involves a wide range of responsibilities, some of which include managing user accounts, backing up data, installing and configuring the system, and maintaining user accounts.

AS/400 系统的管理和维护属于拥有 AS/400 管理员头衔的人员的职责范围。这涉及广泛的职责,其中一些包括管理用户账户、备份数据、安装和配置系统,以及维护用户账户。

20. What are the different procedures required in producing a file for the printer?

生成打印机文件需要哪些不同步骤?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99531 | 官方: 否 | 付费: 否

答案:

The following is a list of the procedures that must be taken in order to create a printer file:

以下是创建打印机文件必须采取的步骤列表:
  1. To generate the printer file, run the Create Printer File (CRTPRTF) command on your computer. 2. To adjust the attributes of the printer file as required, use the CHGPRTF command, which stands for Change Printer File. 3. Associating the printer file with an output queue can be accomplished by using the WRKOUTQ command, which stands for Work with Output Queues. 4. Start the output queue and the printing process by entering the STROUTQ command to start the output queue.

    1. 要在计算机上生成打印机文件,请运行创建打印机文件(CRTPRTF)命令。 2. 要根据需要调整打印机文件的属性,请使用 CHGPRTF 命令,即更改打印机文件。 3. 将打印机文件与输出队列关联可以通过使用 WRKOUTQ 命令实现,即使用输出队列。 4. 通过输入 STROUTQ 命令启动输出队列和打印过程,以启动输出队列。

21. How does one go about scheduling jobs using AS400?

如何使用 AS400 调度作业?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99534 | 官方: 否 | 付费: 否

答案:

You can able to establish jobs to execute at particular times in AS400 by utilizing the Job Scheduler function. You will be able to determine when a job should run as well as the frequency with which it should run if you use this tool. You may also utilize the Job Scheduler to monitor job performance and make certain that tasks are carried out in accordance with the blueprints. Microsoft offers you the use of this functionality as a service.

你可以利用作业调度器功能在 AS400 中安排在特定时间执行的作业。使用此工具,你将能够确定作业应何时运行以及运行频率。你还可以使用作业调度器监控作业性能,并确保任务按照蓝图执行。微软作为服务向你提供此功能。

22. What are the most important things that the AS400 is capable of doing?

AS400 最重要的功能是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99537 | 官方: 否 | 付费: 否

答案:

The AS400 product family comprises business servers that have been designed primarily for high-volume data management and transaction processing. These two functions were the original impetus for the creation of the AS400. In addition to this, they are commonly used for apps that run on the web and for commercial transactions that take place online.

AS400 产品系列包括主要设计用于高容量数据管理和事务处理的业务服务器。这两个功能是创建 AS400 的初衷。此外,它们还常用于运行在 Web 上的应用程序和在线商业交易。

23. How to determine which records in a table are duplicates in the most time-effective method possible?

如何在最省时的情况下确定表中哪些记录是重复的?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9953a | 官方: 否 | 付费: 否

答案:

When searching for duplicate records inside a database, using the DISTINCT keyword is the most efficient way that may be used. Since this keyword will only return values that are fully unique, it will be quite easy to identify any instances of duplicate content.

在数据库中查找重复记录时,使用 DISTINCT 关键字是可用的最高效方法。由于此关键字只会返回完全唯一的值,识别任何重复内容和实例将变得非常容易。

24. Can we boost the functionality of the AS400 platform? Should we deal with them in some way if the answer to the question is yes?

我们能否提升AS400平台的功能?如果答案是肯定的,我们是否需要以某种方式处理它们?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b99541 | 官方: 否 | 付费: 否

答案:

When working with AS400, it is essential to be aware of a few potential performance difficulties that may develop. These concerns could be caused by a number of different factors. One of them is that the AS400's start-up time can be rather long, which is why it is vital to account for that delay when building programmes. Another one of them is that the AS400 doesn't have a graphical user interface. When creating applications for the AS400, the number of resources that are required by the system should also be taken into mind. Keeping this in mind is absolutely necessary as a result of this reason.

在使用AS400时,必须注意一些可能出现的潜在性能问题。这些问题可能由多种不同因素引起。其中之一是AS400的启动时间可能相当长,这就是为什么在构建程序时考虑该延迟至关重要的原因。另一个问题是AS400没有图形用户界面。在为AS400创建应用程序时,还应考虑系统所需的资源数量。由于这个原因,牢记这一点是绝对必要的。

In conclusion, support for the AS400 is not nearly as prevalent as it is for other platforms; therefore, it is vital to keep this information in mind when picking a basis for the development of software.

总之,对AS400的支持远不如对其他平台那样普遍;因此,在选择软件开发基础时,记住这一信息至关重要。

25. How to write files onto tape devices using the AS400 operating system?

如何使用AS400操作系统将文件写入磁带设备?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99544 | 官方: 否 | 付费: 否

答案:

The SAVLIB command is the one that should be used if you want to save libraries to tape media. Using the TAPDEV parameter is required in order for you to declare the name of the tape device that you are working with.

如果要将库保存到磁带介质,应使用SAVLIB命令。必须使用TAPDEV参数来声明你正在使用的磁带设备的名称。

26. How Error Handling is done in CICS?

CICS中如何处理错误?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c13 | 官方: 否 | 付费: 否

答案:

CICS provides various mechanisms for error handling to ensure that programs can handle any unexpected errors or exceptions that occur during runtime. Here are some ways in which error handling can be achieved in CICS: - Return codes: CICS programs can return various return codes depending on the success or failure of an operation. These return codes can be checked and handled appropriately in the calling program to take corrective action.

CICS提供了多种错误处理机制,以确保程序能够处理运行时发生的任何意外错误或异常。以下是CICS中实现错误处理的一些方式: - 返回码:CICS程序可以根据操作的成功或失败返回各种返回码。这些返回码可以在调用程序中检查并适当处理,以采取纠正措施。
  • Condition handling: CICS programs can use the EXEC CICS HANDLE ABEND command to handle abnormal termination (ABEND) conditions that occur during runtime. This command allows the program to take corrective action when an unexpected exception occurs.
  • Recovery routines: CICS programs can define recovery routines that can be executed when an error occurs. These recovery routines can be used to take corrective action and retry the operation or to log the error for analysis.
  • Exception handling: CICS programs can use the EXEC CICS HANDLE CONDITION command to handle specific exceptions that may occur during runtime. This command allows the program to take corrective action when a specific exception occurs.
  • Logging and tracing: CICS provides various logging and tracing facilities that can be used to track and diagnose errors that occur during runtime. These facilities can be used to identify the root cause of an error and take corrective action.

27. What are the different types of DFHMDF present in the CICS Set?

CICS集合中存在哪些不同类型的DFHMDF?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c16 | 官方: 否 | 付费: 否

答案:

DFHMDF stands for CICS Map Definition Facility, which is used to define maps for CICS applications. There are different types of DFHMDF present in the CICS set. Each type serves a specific purpose and is used to define various aspects of CICS applications, such as maps, programs, files, and terminals. Below mentioned some of the DFHMDF sets: - BMS: Basic Mapping Support. This is the standard format for defining CICS maps.

DFHMDF代表CICS映射定义工具,用于定义CICS应用程序的映射。CICS集合中存在不同类型的DFHMDF。每种类型都有特定用途,用于定义CICS应用程序的各个方面,如映射、程序、文件和终端。下面提到了一些DFHMDF集合: - BMS:基本映射支持。这是定义CICS映射的标准格式。
  • PCT: Program Control Table. This is used to define the properties of the CICS program, such as its name and entry point.
  • FCT: File Control Table. This is used to define the properties of CICS files, such as the file name, record format, and key length.
  • TCT: Terminal Control Table. This is used to define the properties of CICS terminals, such as the terminal type, model, and keyboard layout.
  • XCTL: Transient Program Control. This is used to transfer control from one CICS program to another.
  • MDT: Map Destination Table. This is used to define the properties of the output destination for a CICS map.
  • MCT: Map Conversion Table. This is used to define the properties of the data conversion process for a CICS map.

28. What is COMMAREA and explain its benefits.

什么是COMMAREA,并解释其优点。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c19 | 官方: 否 | 付费: 否

答案:

COMMAREA stands for Communication Area, which is a shared data area that is used by CICS programs to exchange information with each other. The COMMAREA can be used to pass data between programs that are executed within the same CICS task or between different CICS tasks.

COMMAREA代表通信区,是CICS程序用来相互交换信息的共享数据区。COMMAREA可用于在同一CICS任务内执行的程序之间或不同CICS任务之间传递数据。

Using COMMAREA has several advantages: - It helps in efficient and fast data exchange between programs without the overhead of writing data to a file or database.

使用COMMAREA有几个优点: - 它有助于程序之间高效快速的数据交换,而无需将数据写入文件或数据库的开销。
  • It has a standardized format for data exchange between programs that ensures consistent and reliable communication.
  • It allows Dynamic data sharing without the need for pre-defined data structures or file layouts.
  • It reduces I/O overhead which leads to improved performance of the application.
  • It uses Transaction-based processing within a single atomic operation which leads to consistent and accurate data.

29. What is CICS?

什么是CICS?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c1c | 官方: 否 | 付费: 否

答案:

CICS full form is (Customer Information Control System). It is a software system that helps organizations manage their day-to-day business operations. Think of it as a central hub that connects various applications and allows them to interact with each other.

CICS全称是(客户信息控制系统)。它是一个帮助组织管理日常业务运营的软件系统。可以把它想象成一个中心枢纽,连接各种应用程序并允许它们相互交互。

For example , if you are using an ATM to withdraw money, CICS would be the software that connects the ATM to your bank account and handles the transaction. - It is a middleware software system developed by IBM that enables multiple applications to run concurrently and communicate with each other in real time.

例如,如果你使用ATM取款,CICS将是连接ATM到你的银行账户并处理交易的软件。 - 它是IBM开发的一种中间件软件系统,允许多个应用程序并发运行并实时相互通信。
  • It is used in the mainframe system. CICS mainframe provides a runtime environment for executing business transactions, managing resources, and providing security, scalability, and reliability for the applications it supports.

30. What is “TransID”? Why is it used and where is it defined?

什么是“TransID”?为什么使用它,它在何处定义?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c1f | 官方: 否 | 付费: 否

答案:

Transaction Identifier (TransID) is a short name or identifier that is used to identify a specific CICS transaction program. It is a unique identifier that is used to invoke a specific CICS transaction program and can be thought of as a program name or entry point.

事务标识符(TransID)是用于标识特定CICS事务程序的短名称或标识符。它是用于调用特定CICS事务程序的唯一标识符,可视为程序名称或入口点。

A “TransID” is typically a 4-character alphanumeric string, and is defined in the CICS system definition (CSD) file. When a user initiates a transaction, they specify the Transid of the program they want to execute, and CICS invokes that program. “TransIDs” is used extensively in CICS to initiate transactions and execute transaction programs. They are also used for program-to-program communication, where a program can pass control to another program using its TransID.

“TransID”通常是一个由4个字符组成的字母数字字符串,并在CICS系统定义(CSD)文件中定义。当用户发起事务时,他们指定要执行的程序的TransID,然后CICS调用该程序。“TransID”在CICS中广泛用于发起事务和执行事务程序。它们还用于程序间通信,其中一个程序可以通过其TransID将控制权传递给另一个程序。
  • Data Science
  • All Events
  • My Events

31. How can we read a CSAM File in CICS?

我们如何在CICS中读取CSAM文件?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1158d557c902ba2c22 | 官方: 否 | 付费: 否

答案:

To read a VSAM file in a CICS program, we can use the following steps:

要在CICS程序中读取VSAM文件,可以使用以下步骤:
  1. Define the file in the CICS program using a FILE control entry (FCT) in the program's PCT. 2. Open the file using the CICS OPEN command with the appropriate options. The options will depend on the access method required for the VSAM file (like - random, or sequential). 3. Read the data from the file using the CICS READ command with the appropriate options. Again, the options will depend on the access method and type of data to be read from the file. 4. After reading the required data, close the file using the CICS CLOSE command.

    1. 在CICS程序中,使用程序PCT中的FILE控制条目(FCT)定义文件。 2. 使用CICS OPEN命令并带有适当选项打开文件。选项取决于VSAM文件所需的访问方法(如随机或顺序)。 3. 使用CICS READ命令并带有适当选项从文件中读取数据。同样,选项取决于访问方法和要从文件中读取的数据类型。 4. 读取所需数据后,使用CICS CLOSE命令关闭文件。

Consider the below command for the same:

请考虑以下命令:

EXEC CICS

EXEC CICS
OPEN
OPEN
FILE(MYVSAMF)
FILE(MYVSAMF)
RIDFLD(MYKEY)
RIDFLD(MYKEY)
TYPE(EXCI)
TYPE(EXCI)
END-EXEC
END-EXEC

EXEC CICS

EXEC CICS
READ
READ
FILE(MYVSAMF)
FILE(MYVSAMF)
INTO(MYDATA)
INTO(MYDATA)
LENGTH(MYLEN)
LENGTH(MYLEN)
END-EXEC
END-EXEC

EXEC CICS

EXEC CICS
CLOSE
CLOSE
FILE(MYVSAMF)
FILE(MYVSAMF)
END-EXEC
END-EXEC

32. What is the purpose of the CICS Resource Definition Online (RDO), and how is it used?

CICS 资源定义在线(RDO)的目的是什么?它是如何使用的?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c25 | 官方: 否 | 付费: 否

答案:

It is a facility that is used to define and manage CICS system resources. The purpose of RDO is to provide a centralized and consistent way to define and manage system resources, such as files, programs, transactions, and terminals. - Resource definition: RDO is used to define system resources and their attributes, such as record layouts for files or transaction codes for programs.

它是一种用于定义和管理 CICS 系统资源的设施。RDO 的目的是提供一种集中且一致的方式来定义和管理系统资源,如文件、程序、事务和终端。- 资源定义:RDO 用于定义系统资源及其属性,例如文件的记录布局或程序的事务代码。
  • Resource maintenance: RDO is used to maintain system resources, such as changing the attributes of a file or deleting a transaction code.
  • Security: RDO is used to control access to system resources by defining security profiles for users and groups.
  • Backup and recovery: RDO is used to manage the backup and recovery of system resources by defining backup and recovery procedures for each resource.
  • Performance monitoring: RDO is used to monitor the performance of system resources by collecting and analyzing performance statistics.
    RDO is used through a set of commands and panels that are accessed through the CICS system console or an interactive terminal session. The RDO commands are used to define, modify, and delete system resources, while the RDO panels provide a graphical interface for resource management and monitoring.

    RDO 通过一组命令和面板来使用,这些命令和面板可通过 CICS 系统控制台或交互式终端会话访问。RDO 命令用于定义、修改和删除系统资源,而 RDO 面板则提供用于资源管理和监控的图形界面。

33. What is the difference between a transient and a permanent dataset in CICS?

CICS 中临时数据集和永久数据集有什么区别?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c28 | 官方: 否 | 付费: 否

答案:

Transient DatasetPermanent Dataset
PurposeTemporary storage for data processing
Permanent storage for data retention
LocationStored in main storage
Stored in secondary storage (like - disk or tape)
LifespanExists only for the duration of the transaction
Exists until explicitly deleted or the system is shut down
Size limitationsLimited by the amount of available main storage
Limited by the amount of available secondary storage
AccessDirectly accessed by programs
Accessed through CICS file control
RecoveryNot recoverable in case of system failure
Recoverable through backup and restore procedures

Let’s understand the use case scenario of both datasets. - Transient datasets are typically used to hold intermediate results or temporary data that is not needed beyond the current job or program execution. Transient datasets are automatically deleted when the job or program completes or terminates. One common use case for transient datasets is batch processing.

让我们了解这两种数据集的使用场景。- 临时数据集通常用于保存中间结果或临时数据,这些数据在当前作业或程序执行之后不再需要。当作业或程序完成或终止时,临时数据集会自动删除。临时数据集的一个常见使用场景是批处理。
For example - a batch job that processes a large amount of data might create temporary datasets to hold intermediate results, such as sorted or filtered data. These temporary datasets can then be passed as input to subsequent steps in the batch job. - Permanent datasets can be accessed and updated by multiple jobs or programs and can be used for long-term storage of important data. A common use case for permanent datasets is in storing transactional data, such as customer orders or financial transactions.
例如 - 一个处理大量数据的批处理作业可能会创建临时数据集来保存中间结果,如排序或过滤后的数据。这些临时数据集随后可作为输入传递给批处理作业中的后续步骤。- 永久数据集可由多个作业或程序访问和更新,并可用于重要数据的长期存储。永久数据集的一个常见使用场景是存储事务数据,如客户订单或财务交易。
In this scenario, the permanent dataset would be used to store the transactional data for future reference or analysis. Permanent datasets can also be used to store system configuration data, such as application settings or user preferences.
在此场景中,永久数据集将用于存储事务数据,以供将来参考或分析。永久数据集还可用于存储系统配置数据,如应用程序设置或用户偏好。

34. How are transactions processed in CICS?

CICS 中事务是如何处理的?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c2b | 官方: 否 | 付费: 否

答案:

There are certain steps followed while the transaction is being processed. The steps are-

在事务处理过程中会遵循某些步骤。步骤如下 -
  1. The user initiates the transaction: A user initiates a transaction by sending a request through a terminal or other input device. The user enters a transaction code, which is associated with a program or set of programs that perform the requested task. 2. Transaction identification and routing: The CICS system receives the transaction request and identifies the program or programs that need to be executed. The system also determines the resources, such as files and databases, that the transaction needs to access. 3. Program execution: The CICS system loads and executes the required programs to perform the transaction. The programs perform the requested task, such as updating a file or generating a report. 4. Resource management: During program execution, the transaction may need to access system resources, such as files or databases. The CICS system manages resource allocation and ensures that the transaction has the necessary permissions to access the resources. 5. Data storage: If the transaction updates data, the CICS system stores the data in temporary storage until the transaction is complete. If the transaction completes successfully, the updated data is written to permanent storage. 6. Transaction completion: Once the transaction is complete, the CICS system returns control to the user, and the user receives a response or output based on the requested task

    1. 用户发起事务:用户通过终端或其他输入设备发送请求来发起事务。用户输入一个事务代码,该代码与执行请求任务的一个程序或一组程序相关联。 2. 事务标识和路由:CICS 系统接收事务请求,并识别需要执行的程序。系统还确定事务需要访问的资源,如文件和数据库。 3. 程序执行:CICS 系统加载并执行所需程序以执行事务。程序执行请求的任务,如更新文件或生成报告。 4. 资源管理:在程序执行期间,事务可能需要访问系统资源,如文件或数据库。CICS 系统管理资源分配,并确保事务具有访问资源所需的权限。 5. 数据存储:如果事务更新数据,CICS 系统会将数据存储在临时存储中,直到事务完成。如果事务成功完成,更新后的数据将写入永久存储。 6. 事务完成:一旦事务完成,CICS 系统将控制权返回给用户,用户根据请求的任务接收响应或输出。

35. Describe CICS Task.

描述CICS任务。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c2e | 官方: 否 | 付费: 否

答案:

A CICS task is a logical unit of work initiated by a CICS transaction. It consists of a sequence of program calls and operations that are performed by CICS on behalf of the transaction. Each task has its environment and resources, including program work areas, communication buffers, and system control blocks.

CICS任务是由CICS事务启动的逻辑工作单元。它由一系列程序调用和操作组成,这些操作由CICS代表事务执行。每个任务都有其环境和资源,包括程序工作区、通信缓冲区和系统控制块。

Tasks can run in parallel with other tasks within a CICS region and can communicate with each other and exchange data using a variety of techniques. When the task is complete, CICS frees the resources allocated to it and returns control to the transaction.

任务可以在CICS区域内与其他任务并行运行,并可以使用多种技术相互通信和交换数据。当任务完成时,CICS释放分配给它的资源,并将控制权返回给事务。

36. What is the difference between a program and a transaction in CICS?

在CICS中,程序和事务之间有什么区别?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c31 | 官方: 否 | 付费: 否

答案:

  • Program: A program in CICS is a set of instructions written in a high-level language, such as COBOL or PL/I. It is compiled, linked, and executed within the CICS environment. A program can perform a specific task, such as updating a file or generating a report.
  • Transaction: A transaction in CICS is a logical unit of work that is processed by the system. It represents a user request, such as a query, an update, or a retrieval of information. A transaction is initiated by a user through a terminal or other input device, and it typically involves a sequence of program executions.

37. What are the main components of a CICS system?

CICS系统的主要组成部分是什么?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c34 | 官方: 否 | 付费: 否

答案:

A CICS system is composed of several key components that work together to process transactions and manage system resources. Some of the main components are: - CICS Region: A CICS region is a logical grouping of CICS resources, including terminals, programs, and files. It is responsible for managing system resources and processing transactions.

CICS系统由几个关键组件组成,这些组件协同工作以处理事务和管理系统资源。一些主要组件包括:- CICS区域:CICS区域是CICS资源的逻辑分组,包括终端、程序和文件。它负责管理系统资源和处理事务。
  • Terminal Control Program (TCP): The TCP manages communication between the CICS system and user terminals. It handles input and output operations, manages screen displays, and processes user requests.
  • Program Control Table (PCT): The PCT is a table that contains information about programs and transactions in the CICS system. It is used to load and execute programs and to manage program flow.
  • File Control Table (FCT): The FCT is a table that contains information about files and datasets in the CICS system. It is used to manage file access and processing, such as reading, writing, and updating files.
  • Resource Definition Online (RDO): The RDO is a facility that is used to define and manage CICS resources, such as programs, files, and transactions. It allows authorized users to create, modify, and delete resources in the CICS system.
  • Data Communication System (DCS): The DCS manages communication between the CICS system and other systems or applications. It provides communication protocols, message formatting, and network connectivity.
  • CICS Commands: CICS provides a set of commands that are used to manage system resources and perform transactions. These commands are typically entered by users through terminal screens or batch jobs.

Successful Tech Career for FREE!

免费开启成功的科技职业生涯!

Successful Tech Career!

成功的技术职业生涯!

Interview Process

面试流程

CTC & Designation

CTC与职位级别

Projects on the Job

工作项目

Referral System

推荐系统

Try It Out

试试看

2 Lakh+ Roadmaps Created

已生成20万+职业规划

38. Difference between PCT (Program Control Table) and FCT (File Control Table)?

PCT(程序控制表)和FCT(文件控制表)之间的区别是什么?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c37 | 官方: 否 | 付费: 否

答案:

PCT (Program Control Table)
PCT(程序控制表)
FCT (File Control Table)
FCT(文件控制表)
It manages programs and transactions in a CICS system.
它管理CICS系统中的程序和事务。
It manages files and datasets in a CICS system.
它管理CICS系统中的文件和数据集。
It contains information about each program or transaction, such as the program name, transaction ID, and load module name.
它包含每个程序或事务的信息,如程序名、事务ID和加载模块名。
It contains information about each file or dataset, such as the file name, record format, and physical location.
它包含每个文件或数据集的信息,如文件名、记录格式和物理位置。
It is used by CICS to load and execute programs and transactions and to manage program flow.
CICS使用它来加载和执行程序及事务,并管理程序流程。
It is used by CICS to manage file access and processing, such as reading, writing, and updating files.
CICS使用它来管理文件访问和处理,如读取、写入和更新文件。
It allows CICS to dynamically load and execute programs, and to maintain program versions and libraries.
它允许CICS动态加载和执行程序,并维护程序版本和库。
It allows CICS to manage file access modes, such as read-only, write-only, or update.
它允许CICS管理文件访问模式,如只读、只写或更新。
It can be updated dynamically by authorized users without requiring a system shutdown.
授权用户可以动态更新它,无需系统停机。
It requires a system shutdown to update the FCT.
更新FCT需要系统停机。
The PCT is typically stored in the main storage (in memory) to improve program execution speed.
PCT通常存储在主存储器(内存)中以提高程序执行速度。
The FCT is typically stored in auxiliary storage (on disk) to reduce memory usage.
FCT通常存储在辅助存储器(磁盘)中以减少内存使用。
Suppose you have a CICS application that processes insurance claims. The PCT for this application might contain entries for various programs, such as a program to search for customer information, a program to calculate claim amounts, and a program to update customer records.
假设您有一个处理保险理赔的CICS应用程序。此应用的PCT可能包含各种程序的条目,例如搜索客户信息的程序、计算理赔金额的程序以及更新客户记录的程序。
Suppose your insurance claims application needs to access a database of customer records. The FCT for this application might contain an entry for the customer database file, specifying its name, location, and access method (such as VSAM or DB2).
假设您的保险理赔应用程序需要访问客户记录数据库。此应用的FCT可能包含客户数据库文件的条目,指定其名称、位置和访问方法(如VSAM或DB2)。

39. Explain TCT and RCT.

解释TCT和RCT。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c3a | 官方: 否 | 付费: 否

答案:

  • TCT (Terminal Control Table): The TCT is a table that stores information about each terminal connected to the CICS system. This information includes the terminal device type, device address, and current status. The TCT is used by CICS to manage terminal activity, such as routing transactions to the correct terminal and managing screen displays. When a user initiates a transaction, CICS uses the TCT to determine which terminal the user is using and to route the transaction to that terminal. The TCT also helps to manage terminal resources and ensures that terminals are being used efficiently.
  • RCT (Resource Control Table): The RCT is a table that stores information about various resources in the CICS system, such as files, programs, and transactions. This information includes the resource name, status, location, and other details. The RCT is used by CICS to manage resource activity, such as allocating and deallocating resources and coordinating resource sharing between multiple users. For example, if multiple users need to access the same file, the RCT will ensure that the file is locked and that users can access it without conflicts. The RCT also helps to manage system resources and ensures that they are being used efficiently.

The TCT and RCT work together to manage CICS resources and control terminals. For example , when a user initiates a transaction, CICS uses the TCT to determine which terminal the user is using and to route the transaction to that terminal. CICS then uses the RCT to allocate the necessary resources, such as programs and files, and to coordinate resource sharing between multiple users.

TCT和RCT协同工作以管理CICS资源和控制终端。例如,当用户发起事务时,CICS使用TCT来确定用户正在使用哪个终端,并将事务路由到该终端。然后CICS使用RCT来分配必要的资源(如程序和文件),并协调多个用户之间的资源共享。

40. What are the basic functions of CICS?

CICS的基本功能是什么?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c3d | 官方: 否 | 付费: 否

答案:

Some of the basic functions of CICS include the following: - Transaction management: CICS provides facilities to initiate, monitor, and control the execution of transactions, which are the basic units of work in an OLTP system.

CICS的一些基本功能包括以下内容:- 事务管理:CICS提供设施来启动、监控和控制事务的执行,事务是OLTP系统中的基本工作单元。
  • Task management: CICS creates and manages tasks that execute programs, handle input and output, and communicate with other tasks.
  • Program management: CICS provides facilities to load, link, and execute programs written in a variety of programming languages, including COBOL, PL/I, Assembler, and C.
  • Data management: CICS provides access to various types of data sources, including databases, files, and message queues. CICS also provides facilities to manage data integrity and concurrency.
  • Communications management: CICS provides facilities to manage communication between applications running in different CICS regions or different systems.
  • Security management: CICS provides facilities to protect data and resources from unauthorized access and control access to CICS transactions and programs.
  • System management: CICS provides facilities to manage the CICS system itself, including monitoring system performance, managing system resources, and maintaining system availability.

41. What is COBOL?

什么是COBOL?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34d8 | 官方: 否 | 付费: 否

答案:

COBOL stands for Common Business Oriented Language and is one of the oldest high-level programming languages used for solving complex business problems in different domains like business verticals, finance, security and administrative purposes. Following are the features of this programming language: - Simplicity: It is an easy-to-learn language with a simple and wide vocabulary for syntax and has an uncluttered style of coding.

COBOL代表面向商业的通用语言,是最古老的高级编程语言之一,用于解决不同领域(如商业垂直行业、金融、安全和行政用途)中的复杂业务问题。以下是这种编程语言的特点:- 简单性:它是一种易于学习的语言,语法简单且词汇丰富,编码风格简洁明了。
  • Business-oriented capabilities: COBOL has advanced capabilities for file handling that let it operate on huge data and can be used for simple to complex processing operations thereby being it the most popular technology for handling business transactions.
  • Universality: COBOL is one of the oldest programming languages and has survived for more than 6 decades across growing business needs and has adapted across almost every platform, product and compiler.
  • Scalability: COBOL is highly scalable, reliable and is also portable across different platforms. They provide variables control structures that make it easy to read, debug and modify.

42. What are the available data types in the COBOL language?

COBOL语言中可用的数据类型有哪些?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34db | 官方: 否 | 付费: 否

答案:

There are mainly three data types supported by COBOL, they are: - Numeric data type – Used for representing numerical values between 0-9.

COBOL主要支持三种数据类型,它们是:- 数字数据类型——用于表示0-9之间的数值。
  • Alphabetic data type – Used for representing alphabetic values ranging from A-Z.
  • Alphanumeric data type – Used for representing both numeric and alphabetic types.

43. How is the NEXT SENTENCE statement different from CONTINUE statement?

NEXT SENTENCE 语句与 CONTINUE 语句有何不同?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34de | 官方: 否 | 付费: 否

答案:

The CONTINUE statement is like a null statement that indicates no operation and the control needs to be passed to the next executable instruction after explicit scope terminator. It can be used anywhere in conditional statements or imperative statements are used. Example syntax for CONTINUE in case of IF construct is:

CONTINUE 语句类似于一个空语句,表示不执行任何操作,控制需要传递给显式作用域终止符之后的下一条可执行指令。它可以在条件语句或命令语句中使用的任何位置使用。在 IF 结构中 CONTINUE 的示例语法为:

IF condition-1 THEN

IF 条件-1 THEN
{statement-1 ... | CONTINUE}
{语句-1 ... | CONTINUE}
[ELSE {statement-2 ... | CONTINUE}]
[ELSE {语句-2 ... | CONTINUE}]
[END-IF]
[END-IF]
The NEXT SENTENCE statement does the task of simply transferring the control to an implicit CONTINUE statement that is present immediately after the next separator period. If the statement is specified along with the END-IF statement then the control passes to the statement after the closest following period. It is mainly used to transfer control to the next sentence.
NEXT SENTENCE 语句通过简单地将控制传递给紧接着下一个分隔句点之后存在的隐式 CONTINUE 语句来完成任务。如果该语句与 END-IF 语句一起指定,则控制将传递给紧随其后的最接近句点之后的语句。它主要用于将控制转移到下一个句子。

IF condition-1 THEN

IF 条件-1 THEN
{statement-1 ... | NEXT SENTENCE}
{语句-1 ... | NEXT SENTENCE}

44. What is IS NUMERIC clause?

什么是 IS NUMERIC 子句?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34e1 | 官方: 否 | 付费: 否

答案:

This clause is used for checking if an item is a numeric value or not. If it is numeric - positive or negative, TRUE will be returned. For example:

此子句用于检查某个项是否为数值。如果是数值(正数或负数),则返回 TRUE。例如:

CHECK-NUMBER SECTION.

CHECK-NUMBER 节。
DISPLAY 'Check if input is numeric ' INPUT-NUM
DISPLAY '检查输入是否为数值 ' INPUT-NUM
IF INPUT-NUM IS NUMERIC
IF INPUT-NUM IS NUMERIC
DISPLAY 'input is numeric'
DISPLAY '输入是数值'
ELSE
ELSE
DISPLAY 'input is non numeric'
显示“输入为非数值”

45. What is the importance of using REPLACING option in a COPY statement?

在COPY语句中使用REPLACING选项的重要性是什么?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34e4 | 官方: 否 | 付费: 否

答案:

REPLACING option is used for allowing the same copy to be used multiple times by changing the replace value in the same code. Syntax COPY REPLACING BY

REPLACING选项用于通过在同一代码中更改替换值,使同一副本能被多次使用。语法:COPY REPLACING BY

46. How is SSRANGE different from NOSSRANGE?

SSRANGE与NOSSRANGE有何不同?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34e9 | 官方: 否 | 付费: 否

答案:

Both are options used by the compiler for finding subscript outside of range. SSRANGE is used for handling the overflow of an array systematically. It needs to be specified explicitly which helps in finding exact subscript outside of range. Whereas the NOSSRANGE is used in cases of very sensitive applications that are driven by performance. It is the default option that gets applied and need not be specified explicitly and it does not support runtime errors whenever the index goes out of range.

两者都是编译器用于查找下标超出范围的选项。SSRANGE用于系统地处理数组溢出,需显式指定,有助于精确找出超出范围的下标。而NOSSRANGE用于对性能敏感的应用程序,是默认选项,无需显式指定,且当下标超出范围时不支持运行时错误。

47. How is PERFORM … WITH TEST AFTER different from PERFORM … WITH TEST BEFORE?

PERFORM … WITH TEST AFTER与PERFORM … WITH TEST BEFORE有何不同?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34ec | 官方: 否 | 付费: 否

答案:

PERFORM ... WITH TEST BEFORE indicates that the condition must be tested at the beginning of every execution of the specified PERFORM range. Whereas TEST AFTER is used for testing the condition after every execution.

PERFORM ... WITH TEST BEFORE表示条件必须在指定PERFORM范围的每次执行开始时测试。而TEST AFTER用于每次执行后测试条件。

48. What happens during INPUT PROCEDURE and OUTPUT PROCEDURE?

在INPUT PROCEDURE和OUTPUT PROCEDURE期间会发生什么?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34ef | 官方: 否 | 付费: 否

答案:

In INPUT PROCEDURE, the input file will be opened, the records from the file are read and can also be edited. The records will then be released to sorting operation and then the file will be closed. Whereas in OUTPUT PROCEDURE, the output file will be opened, the records post sorting will be written in the output file and then the file will be closed.

在INPUT PROCEDURE中,输入文件将被打开,从文件中读取记录并可进行编辑,然后将记录释放到排序操作中,最后关闭文件。而在OUTPUT PROCEDURE中,输出文件将被打开,排序后的记录将写入输出文件,然后关闭文件。

49. Why is LINKAGE SECTION needed?

为什么需要LINKAGE SECTION?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34f2 | 官方: 否 | 付费: 否

答案:

It is used for passing data from one program to another. It can also be used for passing data from a procedure to another program. It maps data in the calling program’s working storage.

它用于将数据从一个程序传递到另一个程序,也可用于将数据从过程传递到另一程序。它映射调用程序工作存储区中的数据。

50. Why should we not define OCCURS clause at 01 level?

为什么我们不应在01级别定义OCCURS子句?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34f5 | 官方: 否 | 付费: 否

答案:

01 level is the level of record. We can repeat the fields within a record but we cannot repeat the record itself. The OCCURS clause indicates the repetition of the definition of data names. This is why we cannot use the OCCURS clause at the 01 level.

01级别是记录级别。我们可以在记录内重复字段,但不能重复记录本身。OCCURS子句表示数据名定义的重复,这就是不能在01级别使用OCCURS子句的原因。

51. How do we find current date from the system within a century?

我们如何在世纪内从系统获取当前日期?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34f8 | 官方: 否 | 付费: 否

答案:

We can find it out by using the Intrinsic function called FUNCTION CURRENT-DATE . We can also make use of the DATE function for accepting the current date. It has to be noted that the current date cannot be accepted if we are using CICS COBOL programs.

我们可以通过使用名为FUNCTION CURRENT-DATE的内建函数来获取。我们也可以使用DATE函数来接受当前日期。但需注意,如果使用CICS COBOL程序,则无法接受当前日期。

52. How is CALL command different from LINK?

CALL命令与LINK有何不同?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34fb | 官方: 否 | 付费: 否

答案:

CALL command is an actual command that initiates an external program and returns. The LINK command is also similar to CALL but it does not belong to COBOL verb vocabulary. The LINK command runs like a separate run unit whereas CALL is executed as a single run unit.

CALL 命令是一个实际命令,用于启动外部程序并返回。LINK 命令与 CALL 类似,但不属于 COBOL 动词词汇表。LINK 命令如同独立的运行单元运行,而 CALL 则作为单个运行单元执行。

53. What is the importance of INITIALIZE verb?

INITIALIZE 动词的重要性是什么?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba34fe | 官方: 否 | 付费: 否

答案:

INITIALIZE verb is used for initializing values in data items to their default value. Numeric items will be set to 0, alphabetic and alphanumeric items will be set to spaces. Items like FILLERS, OCCURS DEPENDING ON are to be left untouched during the initialization.

INITIALIZE 动词用于将数据项中的值初始化为其默认值。数字项将设置为 0,字母和字母数字项将设置为空格。像 FILLERS、OCCURS DEPENDING ON 这样的项在初始化期间应保持不变。

54. Differentiate between OS/VS COBOL and VS COBOL II.

区分 OS/VS COBOL 和 VS COBOL II。
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3501 | 官方: 否 | 付费: 否

答案:

OS/VS COBOLVS COBOL II
Runs in 24-bit addressing mode.
在 24 位寻址模式下运行。
Runs either in 24-bit or 31-bit addressing modes.
可在 24 位或 31 位寻址模式下运行。
Supports Report Writer.
支持报表编写器。
Does not support Report Writer.
不支持报表编写器。
USAGE IS POINTER is not supported.
不支持 USAGE IS POINTER。
USAGE IS POINTER is supported.
支持 USAGE IS POINTER。
Reference modification is not supported here.
此处不支持引用修改。
Reference modification is supported here.
此处支持引用修改。
EVALUATE is not supported here.
此处不支持 EVALUATE。
EVALUATE is supported here.
此处支持 EVALUATE。
Scope terminators are not supported.
不支持作用域终止符。
Scope terminators are supported.
支持作用域终止符。
Follows ANSI 74 standards.
遵循 ANSI 74 标准。
ANSI 85 standards are followed here.
此处遵循 ANSI 85 标准。
Calls between programs are not supported under CICS (Customer Information Control System).
在 CICS(客户信息控制系统)下不支持程序间调用。
Calls between programs are supported under CICS.
在 CICS 下支持程序间调用。

55. What do you understand by static and dynamic linking?

你如何理解静态链接和动态链接?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3504 | 官方: 否 | 付费: 否

答案:

Static and dynamic linking are two types of linking available in COBOL. Static linking refers to the linking of subroutine into calling program and not existing as a separate module. In dynamic linking, the subroutine exists as a separate program and does not link to the main program. The static linking can be done by using the NODYNAM link option and the dynamic linking can be done by using the DYNAM option.

静态链接和动态链接是 COBOL 中可用的两种链接类型。静态链接是指将子程序链接到调用程序中,而不作为单独的模块存在。在动态链接中,子程序作为单独的程序存在,并且不链接到主程序。静态链接可以通过使用 NODYNAM 链接选项来完成,而动态链接可以通过使用 DYNAM 选项来完成。

56. What are the object oriented features provided in COBOL?

COBOL 中提供的面向对象特性有哪些?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3507 | 官方: 否 | 付费: 否

答案:

Object-Oriented COBOL provides the following features: - Define classes and let programs define and create objects of those classes.

面向对象 COBOL 提供以下特性:- 定义类,并让程序定义和创建这些类的对象。
  • Data encapsulation is due to the ability to create objects. The data properties will be encapsulated in the objects.
  • Behaviour of objects can be defined for the class by means of methods.
  • Inheritance is supported in COBOL.
  • Provides maximum flexibility by means of polymorphism and defining interfaces.
  • Also compatible with procedural programming.

    Cobol Questions for Experienced

57. Consider a scenario where we have a program having an array of 20 items. When the program tries to access the 21st item, the program fails to abend. What is the reason for this?

考虑一个场景,我们有一个包含 20 个项目的数组的程序。当程序尝试访问第 21 个项目时,程序未能异常终止。原因是什么?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba350a | 官方: 否 | 付费: 否

答案:

The default compiler option NOSSRANGE must have been used which does not allow the program to abend. If we want the program to abend whenever accessing an array element that is out of bounds, we need to use the compiler option of SSRANGE. Using this option, the program abends with SOC4 error which indicates that it tried to access an invalid address by using the wrong index.

默认编译器选项 NOSSRANGE 可能已被使用,该选项不允许程序异常终止。如果我们希望程序在访问越界数组元素时异常终止,我们需要使用 SSRANGE 编译器选项。使用此选项,程序会以 SOC4 错误异常终止,这表示它尝试通过错误的索引访问无效地址。

58. Why is S9(4) COMP needed despite knowing that Comp-3 would utilise less space?

为什么需要 S9(4) COMP,尽管知道 Comp-3 会占用更少的空间?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba350d | 官方: 否 | 付费: 否

答案:

S9(4) COMP represents that the item is a small integer which means two words of 1 byte each can occupy a total of 2 bytes. In S9(4) COMP-3, one word is equal to half a byte which means 4 words can occupy 2 bytes and additionally, the sign occupies another half byte which results in a maximum of 3 bytes usage. More can be accommodated in S9(4) COMP when compares to COMP-3.

S9(4) COMP 表示该项目是一个小整数,意味着两个各 1 字节的字总共可以占用 2 字节。在 S9(4) COMP-3 中,一个字等于半字节,这意味着 4 个字可以占用 2 字节,此外,符号还占用另外半字节,导致最多使用 3 字节。与 COMP-3 相比,S9(4) COMP 中可以容纳更多内容。

59. What do you understand by the following terminologies?

你如何理解以下术语?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3510 | 官方: 否 | 付费: 否

答案:

  • AMODE(31)
  • AMODE(24)

    1. AMODE(24)
  • RMODE(24)

    1. RMODE(24)
  • RMODE(ANY)

    1. RMODE(ANY)
      All 4 are the options that are available in compile or link editing. AMODE expands to Addressing Mode. AMODE(31) and AMODE(24) represents that the addressing mode used is 31-bit and 24-bit respectively. When we use AMODE(ANY), it indicates that either 31-bit mode or 24-bit addressing mode can be used and it is dependent on the value of RMODE.
      以上4个选项都是编译或链接编辑时可用的选项。AMODE代表寻址模式。AMODE(31)和AMODE(24)分别表示所使用的寻址模式是31位和24位。当我们使用AMODE(ANY)时,它表示可以使用31位模式或24位寻址模式,具体取决于RMODE的值。

RMODE represents Resident Mode within the virtual storage. RMODE(24) represents that the mode can reside within virtual storage below the 16 Meg line. RMODE(ANY) represents that the mode can reside below or above 16 Meg line and the address bit can be either 24-bit or 31-bit depending on the RMODE.

RMODE代表虚拟存储中的驻留模式。RMODE(24)表示该模式可以驻留在16兆线以下的虚拟存储中。RMODE(ANY)表示该模式可以驻留在16兆线以下或以上,地址位可以是24位或31位,具体取决于RMODE。

60. How is INCLUDE different from COPY?

INCLUDE与COPY有何不同?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3513 | 官方: 否 | 付费: 否

答案:

The main similarity between INCLUDE and COPY is that both help in expanding the program variables or codes. The important difference between them is that INCLUDE is used for expanding the code at the time of pre-compilation. Whereas the COPY expands the code at compilation time. DB2 pre-compilers won’t be able to process COPY statements which is why the statements involving the validation of table attributes and DCL statements are embedded using INCLUDE.

INCLUDE和COPY之间的主要相似之处在于两者都有助于扩展程序变量或代码。它们之间的重要区别在于,INCLUDE用于在预编译时扩展代码,而COPY在编译时扩展代码。DB2预编译器无法处理COPY语句,这就是为什么涉及表属性验证和DCL语句的语句使用INCLUDE嵌入的原因。

61. What are the problems associated with using ordered sequential files?

使用有序顺序文件存在哪些问题?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3516 | 官方: 否 | 付费: 否

答案:

The main nature of ordered sequential files is that the records are arranged based on some key field(s). When a user wants to perform operations like insert or deletion, then the order based on the field(s) should be maintained at all times. This is attained only by creating a new file where we insert or update or delete the records within the new file and then maintain the ordered nature. All these take place on the disk directly and the time required to access data on disk is the main bottleneck while processing any functionality. This reduces the speed of computation and slows down the system unnecessarily if we try to use ordered sequential files whenever not needed.

有序顺序文件的主要特点是记录基于某个或多个键字段排列。当用户想要执行插入或删除等操作时,必须始终保持基于这些字段的顺序。这只能通过创建一个新文件来实现,我们在此新文件中插入、更新或删除记录,然后维护有序性。所有这些操作直接发生在磁盘上,而访问磁盘数据所需的时间是处理任何功能时的主要瓶颈。如果我们在不必要的情况下尝试使用有序顺序文件,这会降低计算速度,并导致系统不必要的变慢。

62. Under what circumstances are scope terminators mandatorily needed?

在什么情况下必须使用作用域终止符?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3519 | 官方: 否 | 付费: 否

答案:

When we are using in-line PERFORMS or EVALUATE statements, we need to use scope terminators. It is recommended because it helps to read the code better and is deemed as a good coding practice.

当我们使用内联PERFORMS或EVALUATE语句时,需要使用作用域终止符。建议使用它,因为这有助于更好地阅读代码,并被视为良好的编码实践。

63. What are the causes of S0C7, S0C5 and S0C1?

S0C7、S0C5和S0C1的原因是什么?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba351c | 官方: 否 | 付费: 否

答案:

S0C7 is caused mainly due to the following reasons: - Whenever numeric operations are performed on data of non-numeric type.

S0C7主要由以下原因引起:- 对非数值类型数据执行数值运算时。
  • When we are working on the uninitialized storage.
  • When we try to code excessively that surpasses the maximum permitted dub script.
    S0C5 is caused mainly due to the following reasons: - Damaged index or subscript.

    S0C5主要由以下原因引起:- 索引或下标损坏。
  • Exit occurred incorrectly from a perform.
  • Before the read operation, I/O is accessed.
  • When we try to close an unopened dataset.
    S0C1 is caused mainly due to the following reasons: - Incorrectly spelt DD name.

    S0C1主要由以下原因引起:- DD名称拼写错误。
  • When we perform a read or write operation on an unopened dataset.
  • When the subprograms that are called are not found.

64. What are the differences between Structured COBOL and Object-Oriented COBOL programming?

结构化COBOL和面向对象COBOL编程之间有何区别?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba351f | 官方: 否 | 付费: 否

答案:

Structured COBOL Programming
结构化COBOL编程
Object-Oriented COBOL Programming
面向对象COBOL编程
All functionalities are divided into modules.
所有功能都划分为模块。
This follows a logical style of programming that helps to write code logic in a clean manner.
这遵循一种逻辑编程风格,有助于以清晰的方式编写代码逻辑。
Less secure as there is no data hiding feature involved.
安全性较低,因为不涉及数据隐藏特性。
Since it follows an object-oriented approach, there is encapsulation and abstraction involved which helps in data hiding.
由于它遵循面向对象的方法,涉及封装和抽象,这有助于数据隐藏。
More natural way of coding.
更自然的编码方式。
Here, objects are first identified and functionalities of those are then written. Hence, it is more secure.
在这里,首先识别对象,然后编写这些对象的功能。因此,它更安全。

65. How can we reference or make COBOL program realise that about the following file formats?

我们如何引用或让COBOL程序识别以下文件格式?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3522 | 官方: 否 | 付费: 否

答案:

  • Fixed Block File 2. Fixed Unblock File 3. Variable Block File 4. Variable Unblock File 5. Printer File

Following are the explanation to the points one by one:

以下是对各点的逐一解释:
  1. Fixed Block File: We can identify that a file is a fixed block file if the following 3 conditions are met: ORGANIZATION IS SEQUENTIAL RECORDING MODE IS F BLOCK CONTAINS 0 2. Fixed Unblock File: We can identify that a file is a fixed unblock file if the following 2 conditions are met: ORGANIZATION IS SEQUENTIAL RECORDING MODE IS F 3. Variable Block File: We can identify that a file is a variable block file if the following 4 conditions are met: ORGANIZATION IS SEQUENTIAL RECORDING MODE IS V BLOCK CONTAINS 0 Record length is never coded as 4 bytes in FD as JCL will consider the record length as the max length of record plus 4. 4. Variable Unblock File: We can identify that a file is a variable unblock file if the following 3 conditions are met: ORGANIZATION IS SEQUENTIAL RECORDING MODE IS V Record length is never coded as 4 bytes in FD as JCL will consider the record length as the max length of record plus 4. 5. Printer File: We can reference that a file is a printer file if the following 3 conditions are met: ORGANIZATION IS SEQUENTIAL RECORDING MODE IS F BLOCK CONTAIN 0

    1. 定长块文件:如果满足以下3个条件,我们可以识别出文件是定长块文件:组织为顺序,记录模式为F,块包含0。2. 定长非块文件:如果满足以下2个条件,我们可以识别出文件是定长非块文件:组织为顺序,记录模式为F。3. 变长块文件:如果满足以下4个条件,我们可以识别出文件是变长块文件:组织为顺序,记录模式为V,块包含0,记录长度在FD中从不编码为4字节,因为JCL会将记录长度视为最大记录长度加4。4. 变长非块文件:如果满足以下3个条件,我们可以识别出文件是变长非块文件:组织为顺序,记录模式为V,记录长度在FD中从不编码为4字节,因为JCL会将记录长度视为最大记录长度加4。5. 打印文件:如果满足以下3个条件,我们可以引用文件为打印文件:组织为顺序,记录模式为F,块包含0。

66. How can we process two files by comparing key fields?

我们如何通过比较键字段来处理两个文件?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3525 | 官方: 否 | 付费: 否

答案:

There are 2 possible approaches for this: - Approach 1:

有两种可能的方法:- 方法1:
We can read records from both files, if the key fields match, then they can be ignored. If upon key comparison, the results are unequal, then we identify which file has missing or new records and update the file with missing records accordingly. - Approach 2:
我们可以从两个文件中读取记录,如果键字段匹配,则可以忽略它们。如果在键比较后结果不相等,则我们识别哪个文件有缺失或新记录,并相应地将缺失记录更新到文件中。- 方法2:
If both files have the same records, then the work will be reduced. If file 1 comes to the AT END state, then we have to move HIGH VALUES into the key field. The same goes to file 2. This process needs to be repeated until both key fields are equal to HIGH VALUES. For this process to work, the key fields should be in PIC(X) format and not numeric.
如果两个文件具有相同的记录,则工作量将减少。如果文件1进入AT END状态,则我们必须将HIGH VALUES移动到键字段中。文件2也是如此。此过程需要重复,直到两个键字段都等于HIGH VALUES。为使此过程有效,键字段应为PIC(X)格式,而不能是数字格式。

To make the process easier, we can avoid a lot of I-O operations by reading data to the local array table and then processing the records from there.

为了使过程更简单,我们可以通过将数据读取到本地数组表,然后从那里处理记录,来避免大量I-O操作。

67. How do we remove the spaces at end of every record in an output file that is of variable length?

我们如何移除输出文件中每个记录末尾的空格(该文件是变长的)?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3528 | 官方: 否 | 付费: 否

答案:

Spaces that are present at the end of the record are called trailing spaces. COBOL does not provide the functionality to remove such trailing spaces. But it can be achieved by using the RECORD-LENGTH field as follows: Consider a scenario where we have a file of variable length and the maximum possible record length is 4000. To remove trailing space from every record, then we can alter the record length value to RECORD-LENGTH. This ensures that the records are trimmed which are beyond actual record length. Assuming that a variable-length file has a maximum record length of 4000. - Move the original record length value to RECORD-LENGTH. This process enables the trimming of the entire record that is beyond the length.

记录末尾存在的空格称为尾随空格。COBOL不提供移除此类尾随空格的功能。但可以通过使用RECORD-LENGTH字段来实现,如下所示:考虑一个场景,我们有一个变长文件,最大可能记录长度为4000。要移除每条记录中的尾随空格,我们可以将记录长度值更改为RECORD-LENGTH。这确保超出实际记录长度的记录被修剪。假设变长文件的最大记录长度为4000。- 将原始记录长度值移动到RECORD-LENGTH。此过程能够修剪超出该长度的整个记录。
  • In case the data is populated only up to 3000 bytes - meaning there are 1000 trailing spaces. Then move the record length value to RECORD-LENGTH.
  • By doing this, the records would be trimmed off and 1000 bytes would be freed.

68. Why should the file be opened in I-O mode when it is being used for REWRITE purposes?

当文件用于REWRITE目的时,为什么应以I-O模式打开?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba352b | 官方: 否 | 付费: 否

答案:

When the file REWRITE of the record needs to be performed, the file should first be opened and then the record must be read from the file. This is why the file should always be opened in I-O mode.

当需要执行记录的REWRITE时,应首先打开文件,然后必须从文件中读取记录。这就是为什么文件应始终以I-O模式打开。

69. How is sorting achieved in the COBOL program?

如何在COBOL程序中实现排序?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba352e | 官方: 否 | 付费: 否

答案:

It is done by using the SORT command whose syntax goes as follows:

通过使用SORT命令完成,其语法如下:

SORT file_1 ON ASCENDING/DESCENDING KEY key…

SORT file_1 ON ASCENDING/DESCENDING KEY key…
USING file_2
USING file_2
GIVING file_3.
GIVING file_3.
where - file_1 - sort workfile that needs to be described by using SD entry in FILE SECTION.
where - file_1 - 排序工作文件,需要通过 FILE SECTION 中的 SD 条目来描述。
  • file_2 - input file for SORT that needs to be described using FD entry in FILE SECTION and using a SELECT clause in FILE CONTROL.
  • file_3 - output file from SORT and again needs to be described using FD entry in FILE SECTION and SELECT clause in FILE CONTROL section.
    All three files are not supposed to be opened explicitly.

    所有这三个文件都不应被显式打开。

Note: - USING clause can be replaced by INPUT PROCEDURE IS para_1 THRU para_2. While using INPUT PROCEDURE, we need to remember that the section will be executed before sort and the records need to be released to the work file from the result of the input procedure.

注意: - USING 子句可以被 INPUT PROCEDURE IS para_1 THRU para_2 所替代。在使用 INPUT PROCEDURE 时,我们需要记住该节将在排序之前执行,并且记录需要根据输入过程的结果释放到工作文件中。
  • GIVING clause can be replaced by OUTPUT PROCEDURE IS para_1 THRU para_2. While using OUTPUT PROCEDURE, we need to note that the procedure will be executed once all records were sorted and the records from the sort work file should be populated one record at a time to the output procedure.

70. What are the different divisions in COBOL programs?

COBOL 程序中有哪些不同的部(division)?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3531 | 官方: 否 | 付费: 否

答案:

There are mainly 4 divisions in a COBOL program, they are: - IDENTIFICATION DIVISION: This is the most important division that is used for identifying the program. This division is needed for any COBOL program to run. If this division is not included in your program, then the program cannot be compiled.

一个 COBOL 程序中主要有 4 个部,它们是: - 标识部:这是用于标识程序的最重要的部。任何 COBOL 程序运行都需要这个部。如果您的程序中不包含此部,那么程序将无法编译。
  • ENVIRONMENT DIVISION: This division is subdivided into 2 types - Configuration and Input-Output section. They define the written program’s environment.
  • DATA DIVISION: This division is used for identifying the data items, allocating proper memory and defining the names within the program. It also has a file, linkage section and working storage.
  • PROCEDURE DIVISION: This division supports the main logic of the program. It should consist of at least one statement for using user-defined variables.

71. What are some of the guidelines that can be followed while developing a structured COBOL program?

在开发结构化 COBOL 程序时,可以遵循哪些指导原则?
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3534 | 官方: 否 | 付费: 否

答案:

Certain guidelines need to be followed while writing a structured COBOL program. - When developing the CASE construct, we can use EQUIVALENT statements.

在编写结构化 COBOL 程序时需要遵循某些指导原则。 - 在开发 CASE 构造时,可以使用等效语句。
  • We can use Scope Terminators while using nested constructs.
  • We can also try using IN-LINE PERFORM statements whenever possible when we want a program to perform something.
  • To perform a proper conditional check, we can also try using TEST BEFORE and TEST AFTER statements while using loop constructs to ensure desired results.

    Cobol Sample Programs

72. Write a COBOL program example for demonstrating the DELETE concept from a file based on a matching record.

编写一个 COBOL 程序示例,以演示基于匹配记录从文件中删除的概念。
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba3537 | 官方: 否 | 付费: 否

答案:

IDENTIFICATION DIVISION.

标识部。
PROGRAM-ID.
PROGRAM-ID.
ENVIRONMENT DIVISION.
环境部。
INPUT-OUTPUT SECTION.
输入-输出节。
FILE-CONTROL.
文件控制。
SELECT RECORD-FILE ASSIGN TO DISK1.
选择记录文件分配给 DISK1。
ORGANIZATION IS INDEXED.
组织方式是索引的。
ACCESS MODE IS RANDOM.
访问模式是随机的。
RECORD KEY IS STD-ID.
记录键是 STD-ID。
FILE STATUS IS WS-FS.
文件状态为 WS-FS。
DATA DIVISION.
数据部。
FILE SECTION.
文件节。
FD RECORD-FILE.
FD RECORD-FILE。
01 STD-RECORD.
01 STD-RECORD。
02 STD-ID PIC 9(03).
02 STD-ID PIC 9(03)。
02 STD-NAME PIC X(20).
02 STD-NAME PIC X(20)。

WORKING-STORAGE SECTION.

工作存储节。
77 WS-FS PIC 9(02).
77 WS-FS PIC 9(02)。
01 WS-EOF-SW PIC X(01) VALUE 'N'.
01 WS-EOF-SW PIC X(01) 值 'N'。
88 EOF-SW VALUE 'Y'.
88 EOF-SW 值 'Y'。

PROCEDURE DIVISION.

PROCEDURE DIVISION.
DISPLAY 'ENTER THE STUDENT ID TO BE MATCHED'
显示 '输入要匹配的学生ID'
ACCEPT STD-ID.
接受 STD-ID。
DISPLAY 'OPENING FILE TO DELETE MATCHING RECORD..'.
显示 '打开文件以删除匹配记录..'。
OPEN INPUT RECORD-FILE.
打开输入记录文件。
PERFORM UNTIL EOF-SW
执行直到文件结束标志
READ RECORD-FILE
读取记录文件
KEY IS STD-ID
键为 STD-ID
AT END MOVE 'Y' TO WS-EOF-SW
在结尾时将 'Y' 移动到 WS-EOF-SW
IF WS-FS = 00
如果 WS-FS 等于 00
DELETE STD-RECORD
删除 STD-RECORD
MOVE 'Y' TO WS-EOF-SW
将 'Y' 移动到 WS-EOF-SW
ELSE
ELSE
DISPLAY 'RECORD NOT AVAILABLE'
显示 '记录不可用'
END-IF
END-IF
END-PERFORM.
结束执行。
CLOSE RECORD-FILE.
关闭记录文件。
DISPLAY STD-RECORD .
显示 STD-RECORD。
STOP RUN.
停止运行。
Conclusion
结论
COBOL has been around for many decades and has found its use in various business purposes due to its strong computational capabilities. In this article, we have seen the most commonly asked COBOL interview questions for both freshers and experienced professionals.
COBOL 已经存在了几十年,并因其强大的计算能力在各种商业用途中得到了应用。在本文中,我们看到了针对新手和经验丰富的专业人士最常被问到的 COBOL 面试问题。

73. Write a COBOL program that takes 2 numbers as inputs and performs addition and multiplication on them and displays the result.

编写一个 COBOL 程序,接收两个数字作为输入,对它们执行加法和乘法运算,并显示结果。
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba353a | 官方: 否 | 付费: 否

答案:

IDENTIFICATION DIVISION.

标识部。
PROGRAM-ID.
PROGRAM-ID.

DATA DIVISION.

数据部。
WORKING-STORAGE SECTION.
工作存储节。
01 NUMBER1 PIC 9 VALUE ZEROS.
01 NUMBER1 PIC 9 VALUE ZEROS.
01 NUMBER2 PIC 9 VALUE ZEROS.
01 NUMBER2 PIC 9 VALUE ZEROS.
01 RESULTANT PIC 99 VALUE ZEROS.
01 RESULTANT PIC 99 VALUE ZEROS.
01 OPERATOR PIC X VALUE SPACE.
01 OPERATOR PIC X VALUE SPACE.

PROCEDURE DIVISION.

PROCEDURE DIVISION.
ADDER-MULTIPLIER.
ADDER-MULTIPLIER.
DISPLAY "FIRST INPUT: " WITH NO ADVANCING
显示“第一个输入:”且不换行
ACCEPT NUMBER1
接受 NUMBER1
DISPLAY "SECOND INPUT: " WITH NO ADVANCING
显示“第二个输入:”且不换行
ACCEPT NUMBER2
接受 NUMBER2
DISPLAY "ENTER + FOR ADD AND * FROM MULTIPLY: " WITH NO ADVANCING
显示“输入 + 进行加法,输入 * 进行乘法:”且不换行
ACCEPT OPERATOR
接受操作符

IF OPERATOR = "+" THEN

如果操作符 = "+" 则
ADD NUMBER1, NUMBER2 GIVING RESULTANT
将数字1和数字2相加并赋给结果变量
END-IF
END-IF

IF OPERATOR = "*" THEN

如果操作符 = "*" 则
MULTIPLY NUMBER1 BY NUMBER2 GIVING RESULTANT
将数字1乘以数字2并赋给结果变量
END-IF
END-IF

DISPLAY "RESULT OF OPERATION = ", RESULTANT

显示 "操作结果 = ", 结果变量
STOP RUN.
停止运行。

74. Write a COBOL program that allows users to enter the names of students of a class and then displays it. Try to use OCCURS clause for achieving this.

编写一个COBOL程序,允许用户输入一个班级学生的姓名,然后显示它们。尝试使用OCCURS子句来实现这一点。
  • 知识点: 大型机与遗留系统 (主题: cobol, mainframe;标签: interviewbit, cobol, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1f58d557c902ba353d | 官方: 否 | 付费: 否

答案:

  • OCCURS clause is used for specifying the table where the contents can be accessed using indexing. It is advantageous when we do not require different data entries for data of a similar kind.
  • COBOL Program:

IDENTIFICATION DIVISION

标识部
PROGRAM-ID
程序-ID
ENVIRONMENT DIVISION
环境部
DATA DIVISION
数据部
WORKING-STORAGE SECTION
工作存储节
01 N PIC 9(2) VALUE 0
01 N 图片 9(2) 值 0
01 I PIC 9(2) VALUE 0
01 I PIC 9(2) VALUE 0
01 NAME-IN
01 NAME-IN
02 NAME PIC X(10) OCCURS 10 times
02 NAME PIC X(10) OCCURS 10 times
01 KEY-IN PIC X VALUE SPACE
01 KEY-IN PIC X VALUE SPACE
PROCEDURE DIVISION
PROCEDURE DIVISION
P-1
P-1
DISPLAY(1 1) ERASE
DISPLAY(1 1) ERASE
DISPLAY(3 5) "HOW MANY STUDENTS?"
DISPLAY(3 5) "HOW MANY STUDENTS?"
ACCEPT N
ACCEPT N
DISPLAY(1 1) ERASE
DISPLAY(1 1) ERASE
PERFORM GET-DATA-PROC N TIMES
PERFORM GET-DATA-PROC N TIMES
DISPLAY(1 1) ERASE
DISPLAY(1 1) ERASE
MOVE 0 to I
MOVE 0 to I
PERFORM DISPLAY-DATA-PROC N TIMES
PERFORM DISPLAY-DATA-PROC N TIMES
STOP RUN
STOP RUN
GET-DATA-PROC
GET-DATA-PROC
ACCEPT NAME(I)
接受名字(I)
ADD 1 TO I
将I加1
DISPLAY-DATA-PROC
显示数据进程
DISPLAY NAME(I)
显示名字(I)
ACCEPT KEY-IN
接受键输入
ADD 1 TO I
将I加1

75. How is INNER JOIN different from simply writing a JOIN?

INNER JOIN 与简单编写 JOIN 有何不同?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6a58d557c902ba6695 | 官方: 否 | 付费: 否

答案:

If we do not specify the type of join, by default, the join is an INNER JOIN. So, there is no difference between writing INNER JOIN or simply writing JOIN.

如果我们不指定连接类型,默认情况下,连接是 INNER JOIN。因此,编写 INNER JOIN 或简单编写 JOIN 之间没有区别。

Now that we have seen some of the most popular interview questions of DB2 for freshers, let us move to some intermediate and advanced questions too that are asked in the interviews from an experienced candidate.

既然我们已经了解了一些DB2针对新人的最流行面试问题,现在让我们也转向一些针对有经验候选人面试中提出的中级和高级问题。

76. Explain DB2.

解释DB2。
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba6698 | 官方: 否 | 付费: 否

答案:

DB2 is a family of data management tools developed by IBM. However, if we specifically talk about the databases, DB2 is a relational database that was released in 1989 by IBM. DB2 was written using many programming languages that include C, C++, Java, and even Assembly Language. It has an operating system that works on Linux and Windows .

DB2是IBM开发的一系列数据管理工具。然而,如果我们专门讨论数据库,DB2是IBM于1989年发布的一个关系数据库。DB2使用多种编程语言编写,包括C、C++、Java,甚至汇编语言。它有一个运行在Linux和Windows之上的操作系统。

77. What is DCLGEN in DB2?

在DB2中什么是DCLGEN?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba669b | 官方: 否 | 付费: 否

答案:

DCLGEN stands for Declarations generator. The programs that we write should declare the tables and views that it accesses. The declarations generator i.e. DCLGEN produces these DECLARE statements for C, Cobol and PL/I programs so that one does not need to code the statements manually. It also generates corresponding host variable structures. When DCLGEN is used to generate a table declaration, the DB2 uses the DB2 catalog to get the relevant information from it. DCLGEN, then uses this information to create an SQL DECLARE TABLE statement for the table/view.

DCLGEN代表声明生成器。我们编写的程序应声明其访问的表和视图。声明生成器,即DCLGEN,为C、Cobol和PL/I程序生成这些DECLARE语句,这样就不需要手动编写这些语句。它还生成相应的宿主变量结构。当使用DCLGEN生成表声明时,DB2使用DB2目录从中获取相关信息。然后,DCLGEN利用该信息为表/视图创建SQL DECLARE TABLE语句。

78. As you know there are different sizes of locks. Can you tell how DB2 decides which lock size should be used?

如你所知,锁有不同的尺寸。你能告诉我DB2如何决定应该使用哪种锁尺寸吗?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba669e | 官方: 否 | 付费: 否

答案:

The lock size is determined by three methods. These methods are: - The lock size can be decided based on the lock size given while creating a new TABLESPACE.

锁尺寸由三种方法决定。这些方法是:- 锁尺寸可以根据创建新TABLESPACE时给定的锁尺寸来决定。
  • Also, Programming directs DB2 about the lock size.
  • If the lock size ANY is specified, then DB2 (in most of the cases) chooses the lock size of PAGE.

79. What are the two levels of isolation and what is the major difference between the 2 levels?

隔离级别有哪两个层级,两个层级之间的主要区别是什么?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66a1 | 官方: 否 | 付费: 否

答案:

The two levels of isolation are Cursor Stability (CS) and Repeatable Read (RR). The major difference between these 2 levels is that the Cursor Stability (CS) releases the lock on a page after the use whereas the Repeatable Read (RR) retains all the locks till the end of a transaction.

两个隔离级别是游标稳定性(CS)和可重复读(RR)。这两个层级之间的主要区别在于,游标稳定性(CS)在使用后释放页面上的锁,而可重复读(RR)在事务结束前保留所有锁。

80. How can you move a tablespace to a different DASD volume allocated to that tablespace if you have to use STOGROUP?

如果必须使用STOGROUP,你如何将表空间移动到分配给该表空间的不同DASD卷上?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66a4 | 官方: 否 | 付费: 否

答案:

The method to move the tablespace to a different DASD volume allocated to that tablespace is:

将表空间移动到分配给该表空间的不同DASD卷的方法如下:

ALTER STOGROUP - ADD VOLUME (new volume) DELETE VOLUME (old volume)

ALTER STOGROUP - ADD VOLUME (新卷) DELETE VOLUME (旧卷)

REORG TABLESPACE or RECOVER TABLESPACE

REORG TABLESPACE 或 RECOVER TABLESPACE

So, basically, the method is that we create a new STOGROUP that points to the new volume and ALTER the tablespace and REORG or RECOVER the tablespace.

所以,基本上,方法是创建一个指向新卷的新STOGROUP,ALTER表空间,并REORG或RECOVER表空间。

81. What is MAX in DB2? Is it possible to use MAX in a CHAR column?

在DB2中什么是MAX?是否可以在CHAR列上使用MAX?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66a7 | 官方: 否 | 付费: 否

答案:

MAX() is an aggregate function that returns the maximum value from a set of values. For example, if we have a database of movies, we can apply MAX(rating) on the rating attribute and it will select the rows in which we have the movies with the highest ratings. Yes, MAX can be used on a CHAR column.

MAX()是一个聚合函数,它从一组值中返回最大值。例如,如果我们有一个电影数据库,我们可以在rating属性上应用MAX(rating),它将选择拥有最高评分电影的记录。是的,MAX可以用于CHAR列。

82. What is a CURSOR and What is the use of it?

什么是 CURSOR,它的用途是什么?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66aa | 官方: 否 | 付费: 否

答案:

CURSOR is a programming device that is used to find a set of rows corresponding to a SELECT statement. However, the rows are displayed one at a time.

CURSOR 是一种编程设备,用于查找与 SELECT 语句对应的行集。然而,这些行每次只显示一行。

83. What is concurrency in terms of DB2?

在 DB2 中,什么是并发?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66ad | 官方: 否 | 付费: 否

答案:

Concurrency means that more than one application process of DB2 can access the data at the same time. Concurrency can cause some issues like lost updates, access to unrepeatable reads and uncommitted data.

并发意味着多个 DB2 应用程序进程可以同时访问数据。并发可能会导致一些问题,例如丢失更新、访问不可重复读和未提交的数据。

84. What are UNION and UNION ALL in DB2? How do you differentiate between them?

在 DB2 中,什么是 UNION 和 UNION ALL?如何区分它们?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66b0 | 官方: 否 | 付费: 否

答案:

The union command is used to merge 2 or more SELECT statements and the select statements can be applied on a single table as well as on multiple tables. The major difference between UNION and UNION ALL is that UNION removes the duplicate rows when it is applied on the tables whereas UNION ALL retains the duplicates.

UNION 命令用于合并两个或多个 SELECT 语句,这些 SELECT 语句可以应用于单个表或多个表。UNION 和 UNION ALL 的主要区别在于,UNION 在应用于表时会删除重复行,而 UNION ALL 会保留重复行。

85. What is the difference between the above two queries i.e. DELETE and DROP?

上述两个查询(即 DELETE 和 DROP)之间有什么区别?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66b3 | 官方: 否 | 付费: 否

答案:

The DELETE * FROM table-name query deletes all the rows from the table but, there is still an empty table with no rows and no columns in the database. However, the DROP TABLE table-name query deletes all the rows and columns and along with that, the table gets deleted from the database too i.e. the table is completely removed (deleted) from the database.

DELETE * FROM table-name 查询会删除表中的所有行,但数据库中仍然会留下一个没有行和列的空表。然而,DROP TABLE table-name 查询会删除所有行和列,随之表也会从数据库中被删除,即表完全从数据库中移除(删除)。

86. Write a query to delete the entire table from the database in DB2.

编写一个查询,从 DB2 数据库中删除整个表。
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66b6 | 官方: 否 | 付费: 否

答案:

The query to delete the entire table from the database is given below:

从数据库中删除整个表的查询如下:

DROP TABLE table-name

DROP TABLE table-name

87. Write a query to delete all the rows from a table in DB2.

编写一个查询,删除 DB2 表中的所有行。
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66bd | 官方: 否 | 付费: 否

答案:

The query to delete all the rows from a table in DB2 is:

在 DB2 中删除表中所有行的查询是:

DELETE * FROM table-name

DELETE * FROM table-name

88. Write a Query to find the number of rows in a DB2 table.

编写一个查询,查找 DB2 表中的行数。
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66c0 | 官方: 否 | 付费: 否

答案:

Here, the interviewer might ask you to write down the query on a piece of paper or a google doc or any other method. Mostly, the interviewers do not ask you to write a query upon a pre-existing table.

在这里,面试官可能会要求你在纸上、Google 文档或任何其他方法上写下查询。大多数情况下,面试官不会要求你在预先存在的表上编写查询。

The query is:

查询是:

SELECT COUNT * FROM tablename

SELECT COUNT * FROM tablename

89. What is the difference between SMALLINT and INTEGER?

SMALLINT 和 INTEGER 有什么区别?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66c6 | 官方: 否 | 付费: 否

答案:

The difference is in the range and precision. While the SMALLINT can store the numbers up to a precision of 15 bits with a range of -32768 to +32767, the INTEGER data type can store the numbers up to a precision of 31 bits having the range from -2,147,483,648 to +2147483648. There is also one more data type to store the integer type of data. It is called BIGINT and its range is even higher than INTEGER.

区别在于范围和精度。SMALLINT 可以存储精度高达 15 位、范围从 -32768 到 +32767 的数字,而 INTEGER 数据类型可以存储精度高达 31 位、范围从 -2,147,483,648 到 +2147483648 的数字。还有一种数据类型用于存储整数类型的数据,称为 BIGINT,其范围甚至比 INTEGER 更高。

90. What are the different data types available in DB2?

DB2 中有哪些不同的数据类型?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66c9 | 官方: 否 | 付费: 否

答案:

There is a total of 8 data types in DB2. They are SMALLINT, INTEGER, FLOAT, DECIMAL, CHAR, VARCHAR, DATE, and TIME.

DB2 中总共有 8 种数据类型。它们是 SMALLINT、INTEGER、FLOAT、DECIMAL、CHAR、VARCHAR、DATE 和 TIME。

91. What do you understand about procedural programming? How is it different from object oriented programming?

你对过程式编程有何理解?它与面向对象编程有何不同?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf18b | 官方: 否 | 付费: 否

答案:

Procedural programming is a programming model that evolved from structured programming and is based on the concept of invoking procedures. Procedures, often known as routines, subroutines, or functions, are essentially a set of instructions to be executed. Any procedure in a program can be invoked at any time during execution, either by other procedures or by the program itself.

过程式编程是一种从结构化编程演变而来的编程模型,基于调用过程的概念。过程,通常称为例程、子例程或函数,本质上是一组要执行的指令。程序中的任何过程都可以在执行期间的任何时候被其他过程或程序本身调用。

The following table illustrates the differences between procedural programming and object-oriented programming:

下表说明了过程式编程与面向对象编程之间的区别:
Procedural Programming
过程式编程
Object-Oriented Programming
面向对象编程
In procedural programming, the program is broken down into little modules known as functions.
在过程式编程中,程序被分解为称为函数的小模块。
Object-oriented programming divides a program into discrete pieces called objects.
面向对象编程将程序划分为称为对象的离散部分。
The top-down technique is used in procedural programming.
过程式编程使用自顶向下技术。
The bottom-up method is used in object-oriented programming.
面向对象编程使用自底向上方法。
It's not straightforward to add new data and functions.
添加新的数据和函数并不简单。
It's simple to add additional data and functions.
添加额外的数据和函数很简单。
Overloading is not possible with procedural programming.
过程式编程无法实现重载。
In object-oriented programming, overloading is possible.
面向对象编程可以实现重载。
Because procedural programming lacks a proper method for hiding data, it is insecure.
由于过程式编程缺乏适当的数据隐藏方法,因此不安全。
Data is hidden in object-oriented programming, making it safer.
面向对象编程中数据是隐藏的,因此更安全。
In procedural programming, function takes precedence over data.
在过程式编程中,函数优先于数据。
Data is more important than function in object-oriented programming.
在面向对象编程中,数据比函数更重要。
C, FORTRAN, Pascal, Basic, and other programming languages are examples.
C、FORTRAN、Pascal、Basic等编程语言是示例。
C++, Java, Python, C#, and other programming languages are examples.
C++、Java、Python、C#等编程语言是示例。

92. What are the three types of schedulers in the context of operating systems? Explain.

在操作系统的上下文中,调度器有哪三种类型?请解释。
  • 知识点: 大型机与遗留系统 / 行为与软技能 (标签: interviewbit, ibm, company-specific)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf18e | 官方: 否 | 付费: 否

答案:

Schedulers are specialised computer programs that manage process scheduling in a variety of ways. Their primary responsibility is to choose which jobs to submit into the system and which processes to run.

调度器是专门的计算机程序,以多种方式管理进程调度。它们的主要职责是选择哪些作业提交到系统以及哪些进程运行。

Following are the three types of schedules:

以下是三种类型的调度器:
  • Long Term Scheduler: It is also known as a job scheduler. A long-term scheduler determines which programs are accepted for processing into the system. It chooses processes from the ready queue and loads them into memory so they can be executed. For CPU scheduling, the process loads into memory. The job scheduler's main goal is to deliver a balanced mix of jobs, such as I/O bound and CPU bound workloads. It also regulates how much multiprogramming is done. If the degree of multiprogramming remains constant, the average rate of process creation must be equal to the average rate of process departure from the system.
  • Medium Term Scheduler: Medium Term Schedulers are used for swapping processes in the main memory. It clears the memory occupied by the processes. The degree of multiprogramming is reduced as a result. The swapped out-processes are handled by the medium-term scheduler.
  • Short Term Scheduler: It's also referred to as a CPU scheduler. Its primary goal is to improve system performance in accordance with the set of criteria established. It is the transition from the process's ready to running stage. The CPU scheduler chooses a process from among those that are ready to run and allocates CPU to that process. Short-term schedulers usually referred to as dispatchers, decide which process to run next.

93. What do you know about virtual memory in the context of operating systems?

在操作系统的上下文中,你对虚拟内存了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf191 | 官方: 否 | 付费: 否

答案:

Virtual Memory is a storage allocation system that allows secondary memory to be addressed as if it were the main memory. The addresses used by an application to refer to memory are distinct from the addresses used by the memory system to designate physical storage sites, and program-generated addresses are automatically translated to machine addresses.

虚拟内存是一种存储分配系统,允许将辅助内存当作主内存来寻址。应用程序用于引用内存的地址与内存系统用于指定物理存储位置的地址不同,程序生成的地址会自动转换为机器地址。

The capacity of virtual storage is limited by the computer system's addressing method, and the amount of secondary memory available is determined by the number of main storage sites available rather than the actual number of main storage locations.

虚拟存储的容量受计算机系统寻址方式的限制,可用的辅助内存量取决于可用的主存储位置数量,而不是实际的主存储位置数量。

94. What is the purpose of the sudo command in the context of the UNIX operating system?

在UNIX操作系统的上下文中,sudo命令的用途是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf194 | 官方: 否 | 付费: 否

答案:

sudo is a short form of Super Users DO. In Linux, the sudo command is commonly used as a prefix to a command that only superusers are permitted to run. If you use the prefix "sudo" before any command, it will run it with elevated privileges, allowing a user with the necessary permissions to run a command as another user, such as the superuser. This is the Windows version of the "run as administrator" option.

sudo 是 Super Users DO 的缩写。在 Linux 中,sudo 命令通常用作只有超级用户才被允许运行的命令的前缀。如果你在任何命令前使用前缀 "sudo",它将以提升的权限运行该命令,允许具有必要权限的用户以另一个用户(例如超级用户)的身份运行命令。这是 Windows 中"以管理员身份运行"选项的对应版本。

The sudoers file, stored at "/etc/sudoers," must contain an entry for each user who may use the sudo command. Remember to use the sudo command to edit or inspect the sudoers file. The "visudo" command is suggested for editing the sudoers file.

sudoers 文件存储在 "/etc/sudoers",必须为每个可能使用 sudo 命令的用户包含一个条目。请记住使用 sudo 命令来编辑或查看 sudoers 文件。建议使用 "visudo" 命令来编辑 sudoers 文件。

95. Write a program to calculate how many ways can we make change for N cents if we have an endless supply of each of the C = C1, C2,..Cm valued coins? It makes no difference what order the coins are placed in.

编写一个程序,计算如果我们有无限供应的每种面值为 C = C1, C2,..Cm 的硬币,有多少种方式可以为 N 分钱找零?硬币的排列顺序无关紧要。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf197 | 官方: 否 | 付费: 否

答案:

Example: Input : N = 4, C = { 1, 2, 3} Output : 4 Explanation: There are 4 possible combinations : {1, 1, 1, 1}, {1, 1, 2}, {1, 3}, {2, 2}

示例:输入:N = 4, C = { 1, 2, 3} 输出:4 解释:有 4 种可能的组合:{1, 1, 1, 1}, {1, 1, 2}, {1, 3}, {2, 2}

Input : N = 10, C = {2, 3, 5, 6} Output : 5 Explanation: There are 5 possible combinations ; {2, 2, 2, 2, 2}, {2, 2, 3, 3}, {2, 2, 6}, {2, 3, 5}, {5, 5}

输入:N = 10, C = {2, 3, 5, 6} 输出:5 解释:有 5 种可能的组合;{2, 2, 2, 2, 2}, {2, 2, 3, 3}, {2, 2, 6}, {2, 3, 5}, {5, 5}

Approach:

方法:
We can divide all set solutions into two sets to count the total number of solutions.
我们可以将所有解的集合分为两个集合来计算解的总数。

1) Solutions that are devoid of the mth coin (or Cm).

1) 不包含第 m 个硬币(或 Cm)的解。

2) At least one Cm is present in the solution.

2) 解中至少包含一个 Cm。

If solve(C[], m, n) is the function for counting the number of solutions, it may be represented as the sum of solve(C[], m-1, n) and solve(C[], m, n-Cm). We will use dynamic programming to store the result for a particular value of n and m. This will optimise our time complexity to O(nm).

如果 solve(C[], m, n) 是用于计算解数的函数,它可以表示为 solve(C[], m-1, n) 和 solve(C[], m, n-Cm) 之和。我们将使用动态规划来存储特定 n 和 m 值的结果。这将把我们的时间复杂度优化到 O(nm)。

Code:

代码:

include<bits/stdc++.h>

using namespace std;

using namespace std;
// function to count the number of ways n can be represented from a coin set of size m
// 用于计算从大小为 m 的硬币集合中表示 n 的方式数的函数
int solve( int C[], int m, int n )
int solve( int C[], int m, int n )
{
int dpn + 1;//Creating a 2D matrix of size (n + 1) 8 m to store the result of each state of our problem
int dpn + 1;//创建一个大小为 (n + 1) 8 m 的二维矩阵,用于存储我们问题每个状态的结果

// Filling the matrix for the base case when n = 0

// 为 n = 0 的基本情况填充矩阵
for (int i = 0; i < m; i++)
for (int i = 0; i < m; i++)
dp0 = 1;
dp0 = 1;

// Filling the entries in the dp table in bottom up fashion

// 以自底向上的方式填充dp表中的条目
for (int i = 1; i < n + 1; i++)
for (int i = 1; i < n + 1; i++)
{
for (int j = 0; j < m; j++)
for (int j = 0; j < m; j++)
{
// Including C[j] in our current state's answer
// 将C[j]包含在我们当前状态的答案中
int x = (i-C[j] >= 0) ? dp[i - C[j]][j] : 0;
int x = (i-C[j] >= 0) ? dp[i - C[j]][j] : 0;

// Excluding C[j] in our current state's answer

// 将C[j]排除在我们当前状态的答案中
int y = (j >= 1) ? dpi : 0;
int y = (j >= 1) ? dpi : 0;

// storing the sum of x and y in our current state's answer

// 将x和y的和存储在我们当前状态的答案中
dpi = x + y;
dpi = x + y;
}
}
return dpn;
return dpn;
}

int main()

int main()
{
int C[] = {2, 3, 5, 6};
int C[] = {2, 3, 5, 6};
int m = sizeof(C)/sizeof(C[0]);
int m = sizeof(C)/sizeof(C[0]);
int n = 10;
int n = 10;
cout << solve(C, m, n);
cout << solve(C, m, n);
return 0;
return 0;
}
Output:
输出:

5
Explanation:

说明:

In the above code, we define a function named ‘solve’ which returns the number of ways in which n can be represented from a set of m coins having distinct values. We create a dp table of size (n+1) * m. dpi represents the number of ways in which i can be represented by a set of j coins. Here, we have used the recurrence formula dpi = x + y. Here, x = dp[i - C[j]][j], y = dpi.

在上面的代码中,我们定义了一个名为‘solve’的函数,它返回用一组具有不同值的m个硬币表示n的方法数。我们创建一个大小为(n+1) * m的dp表。dpi表示用一组j个硬币表示i的方法数。在这里,我们使用了递推公式dpi = x + y。其中,x = dp[i - C[j]][j],y = dpi。

96. Write a program to convert the characters of a string into the opposite case, that is, if a character is lowercase, convert it to upper case and vice versa.

编写一个程序,将字符串中的字符转换为相反的大小写,即,如果字符是小写,则将其转换为大写,反之亦然。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf19a | 官方: 否 | 付费: 否

答案:

Input : “inTerVieWbiT” Output : “INtERvIEwVIt”

输入:“inTerVieWbiT” 输出:“INtERvIEwVIt”

Input : “Hello World” Output : “hELLO wORLD”

输入:“Hello World” 输出:“hELLO wORLD”

Approach:

方法:
We scan each character of the string one by one. If the current character is in lowercase, we subtract 32 from the character and convert it to uppercase. Similarly, if the current character is in uppercase, we add 32 to the character and convert it to lowercase.
我们逐个扫描字符串中的每个字符。如果当前字符是小写,我们从该字符中减去32并将其转换为大写。同样,如果当前字符是大写,我们向该字符加上32并将其转换为小写。

Code:

代码:

include

using namespace std;

using namespace std;

// Function to convert the characters of the string to its opposite case

// 将字符串中的字符转换为相反大小写的函数
void changeCase(string& s)
void changeCase(string& s)
{
int len = s.length();
int len = s.length();
for (int i = 0; i < len; i++) {
for (int i = 0; i < len; i++) {
if (s[i] >= 'a' && s[i] <= 'z')
if (s[i] >= 'a' && s[i] <= 'z')
{
s[i] = s[i] - 32;// Subtracting 32 from the character
s[i] = s[i] - 32;// 从字符中减去 32
}
else if (s[i] >= 'A' && s[i] <= 'Z')
else if (s[i] >= 'A' && s[i] <= 'Z')
{
s[i] = s[i] + 32;// Adding 32 to the character
s[i] = s[i] + 32;// 给字符加上 32
}
}
}

int main()

int main()
{
string s = "inTerVieWbiT";
string s = "inTerVieWbiT";
cout << "Original String : " << s << "\n";
cout << "Original String : " << s << "\n";
changeCase(s);
changeCase(s);
cout << "Changed String : " << s << "\n";
cout << "Changed String : " << s << "\n";
return 0;
return 0;
}
Output:
输出:

Original String : inTerVieWbiT

Original String : inTerVieWbiT
Changed String : INtERvIEwBIt
更改后的字符串:INtERvIEwBIt
Explanation :
解释:

In the above code, we define a function named ‘changeCase’ which takes a reference of a string as a parameter. We iterate through each character of the string and change the character to its opposite case by either adding or subtracting 32.

在上面的代码中,我们定义了一个名为‘changeCase’的函数,它接受一个字符串的引用作为参数。我们遍历字符串中的每个字符,并通过加上或减去32将字符更改为其相反的大小写。

97. Given a sorted array of 0s and 1s. The goal is to discover the index of the sorted array’s first '1'. It's possible that the array is made up entirely of 0s or 1s. If there are no 1's in the array, display "-1."

给定一个由0和1组成的有序数组。目标是找到有序数组中第一个‘1’的索引。数组可能完全由0或1组成。如果数组中没有1,则显示“-1”。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf19d | 官方: 否 | 付费: 否

答案:

Example: Input: arr = {0, 0, 0, 0, 1, 1, 1} Output : 4

示例:输入:arr = {0, 0, 0, 0, 1, 1, 1} 输出:4

Input : Arr = {0, 0, 0, 0} Output : -1

输入:Arr = {0, 0, 0, 0} 输出:-1

Approach:

方法:
It is given that the array is sorted. We use this property of the array and apply binary search to find the first occurrence of 1 in the given array. We start with the whole array as our search space and find the middle element. If we encounter 0 as the middle element, it implies that our answer lies to the right side of the middle element. If we encounter 1 as the middle element, our answer can either be this index or the indices left to the current middle if there are more 1s preceding the current middle.
已知数组是有序的。我们利用数组的这一特性,应用二分查找来找到给定数组中1的第一次出现。我们从整个数组作为搜索空间开始,找到中间元素。如果中间元素是0,这意味着我们的答案位于中间元素的右侧。如果中间元素是1,我们的答案可能是这个索引,或者如果当前中间元素之前有更多的1,则可能是当前中间元素左侧的索引。

Code:

代码:

include <bits/stdc++.h>

using namespace std;

using namespace std;

// function to find the first occurrence of 1 in the give sorted array

// 函数用于在给定的有序数组中查找1的第一次出现
int findIndex(int arr[], int low, int high)
int findIndex(int arr[], int low, int high)
{
while (low <= high) {
while (low <= high) {
int mid = low + (high - low) / 2;
int mid = low + (high - low) / 2;

// we check if the mid element is a 1 and the mid - 1 element is 0

// 我们检查中间元素是否为1且中间元素前一个元素是否为0
if (arr[mid] == 1 && (mid == 0 || arr[mid - 1] == 0))
if (arr[mid] == 1 && (mid == 0 || arr[mid - 1] == 0))
return mid;
返回 mid;

// our answer lies to the left of mid, we reduce our search space

// 我们的答案位于 mid 的左侧,我们缩小搜索空间
else if (arr[mid] == 1)
else if (arr[mid] == 1)
high = mid - 1;
high = mid - 1;

// our answer lies to the right of mid, we reduce our search space

// 我们的答案位于 mid 的右侧,我们缩小搜索空间
else
else
low = mid + 1;
low = mid + 1;
}

// we return -1 since 1 is not present in the array

// 我们返回 -1,因为数组中不存在 1
return -1;
return -1;
}

int main()

int main()
{
int arr[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
int arr[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
int n = sizeof(arr) / sizeof(arr[0]);
int n = sizeof(arr) / sizeof(arr[0]);
cout << findIndex(arr, 0, n - 1);
cout << findIndex(arr, 0, n - 1);
return 0;
return 0;
}
Output:
输出:

4
Explanation :

解释:

In the above code, we defined a function named ‘findIndex’ which finds the first occurrence of the first one in the sorted array. We reduce the search space by changing the values of low and high as per the current value of the middle element. If low exceeds high, we return -1 which indicates that no 1 is present in the array.

在上面的代码中,我们定义了一个名为 'findIndex' 的函数,它在排序数组中查找第一个 1 的首次出现。我们根据中间元素的当前值改变 low 和 high 的值,从而缩小搜索空间。如果 low 超过 high,我们返回 -1,表示数组中没有 1 存在。

98. What do you understand about an entry controlled loop in the context of OOPs programming?

在 OOPs 编程的上下文中,你对入口控制循环了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a0 | 官方: 否 | 付费: 否

答案:

An entry control loop examines the condition at the point of entry and passes control to the body of the loop if the condition or expression becomes true.

入口控制循环在进入点检查条件,如果条件或表达式为真,则将控制传递给循环体。

The name "entry control loop" comes from the fact that this sort of loop regulates loop entry.

“入口控制循环”这个名称来源于这种循环控制循环入口的事实。

for loops and while loops are examples of entry controlled loops.

for 循环和 while 循环是入口控制循环的例子。

99. Differentiate between quick sort and merge sort in the context of sorting algorithms.

在排序算法的上下文中,区分快速排序和归并排序。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a3 | 官方: 否 | 付费: 否

答案:

Following are the differences between quick sort and merge:

以下是快速排序和归并排序之间的区别:
Quick Sort
快速排序
Merge Sort
归并排序
In a quick sort, the array is divided into any ratio. In a quick sort, there is no requirement to divide the array of components into equal sections.
在快速排序中,数组以任意比例划分。在快速排序中,不需要将组成部分的数组划分为相等的部分。
The array is divided into only two halves (i.e. n/2) in the merge sort.
在归并排序中,数组仅被划分为两半(即 n/2)。
The worst-case complexity of quick sort is O(n2)
快速排序的最坏情况复杂度为 O(n2)
In merge sort, the worst and average cases have the same complexity O (n log n).
在归并排序中,最坏情况和平均情况具有相同的复杂度 O (n log n)。
The quick sort, on the other hand, does not function well with large datasets.
另一方面,快速排序在处理大型数据集时表现不佳。
Merge sorting can be used on any form of data set, regardless of its size (either large or small).
归并排序可用于任何形式的数据集,无论其大小(大或小)。
The quick sort is in place since it does not necessitate any extra storage.
快速排序是原地排序,因为它不需要任何额外存储。
Merge sort is not in place because it requires additional memory space to hold the auxiliary arrays.
归并排序不是原地排序,因为它需要额外的内存空间来保存辅助数组。
Quick sort is unstable (two elements with the same value may appear in a different order in the sorted array from that in the unsorted input array) in this situation. However, with a few code tweaks, it may be made stable.
在这种情况下,快速排序是不稳定的(具有相同值的两个元素在排序数组中的出现顺序可能与未排序输入数组中的顺序不同)。然而,通过一些代码调整,它可以变得稳定。
Merge sort is stable because two elements with the same value appear in the sorted output in the same order as they did in the unsorted input array.
归并排序是稳定的,因为具有相同值的两个元素在排序输出中的出现顺序与它们在未排序输入数组中的顺序相同。
Quick sort is preferred for arrays.
快速排序更适合数组。
Merge sort is preferred for linked lists.
归并排序更适合链表。
Quicksort has a good cache locality, making it faster than merge sort (in many cases like in a virtual memory environment).
快速排序具有良好的缓存局部性,使其比归并排序更快(在许多情况下,如在虚拟内存环境中)。
Merge sort has a poor locality of reference.
归并排序的引用局部性较差。

100. What do you understand about a deadlock in the context of operating systems? What are the necessary conditions for a deadlock?

在操作系统的上下文中,你对死锁了解多少?死锁的必要条件是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a6 | 官方: 否 | 付费: 否

答案:

A deadlock occurs when a group of processes is halted because each process is holding a resource and waiting for another process to obtain it.

当一组进程被停止时,就会发生死锁,因为每个进程都持有一个资源并等待另一个进程获取它。

Consider the situation when two trains are approaching each other on the same track and there is only one track: once they are in front of each other, neither train can move. In operating systems, a similar situation happens when two or more processes hold some resources while waiting on resources owned by other processes (s).

考虑这样一种情况:两列火车在同一条轨道上相向而行,且只有一条轨道:一旦它们面对面,两列火车都无法移动。在操作系统中,当两个或多个进程持有某些资源,同时等待其他进程拥有的资源时,就会发生类似的情况。

For example, let us assume that there are two trucks trying to cross a one-way bridge from opposite ends. None of the trucks is ready to move back and neither can any of them cross the bridge. In this situation, a deadlock has been obtained.

例如,让我们假设有两辆卡车试图从相反的两端穿过一座单向桥。没有一辆卡车准备后退,任何一辆都无法过桥。在这种情况下,就产生了死锁。

Following are the necessary conditions for a deadlock : - Mutual Exclusion: One or more resources are not available for sharing. That is, only one process can use the resource at a time.

以下是死锁的必要条件:- 互斥:一个或多个资源不可共享。也就是说,一次只有一个进程可以使用该资源。
  • Hold and Wait: A process is holding at least one resource and waiting for further resources.
  • No Preemption: A resource can only be obtained from a process if it is released by the process. There can be no forced snatching of the resources.
  • Circular Wait: A group of processes are waiting for each other in a circular fashion.

101. What do you understand about arrays? What are some of the real life applications of an array?

你对数组了解多少?数组的一些现实生活应用是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1a9 | 官方: 否 | 付费: 否

答案:

A collection of items stored in contiguous memory spaces is referred to as an array. The objective is to group together goods of the same type. This makes calculating the position of each element easy by simply adding an offset to a base value, such as the memory address of the array's first element.

存储在连续内存空间中的一组项称为数组。目标是将相同类型的物品分组在一起。这使得计算每个元素的位置变得容易,只需将偏移量添加到基值,例如数组第一个元素的内存地址。

Following are the real-life applications of an array: - Arrays can be used to store data in a tabular style as a simple application. For example, if we want to save our contacts on our phones, the software will simply create an array with all of our contacts.

以下是数组的现实生活应用:- 数组可以用于以表格样式存储数据,作为一种简单的应用。例如,如果我们想在手机上保存联系人,软件将简单地创建一个包含我们所有联系人的数组。
  • The arrangement of a game's leaderboard may be done simply by using arrays to record the score and arranging them in descending order to clearly see each player's rank in the game.
  • A straightforward question paper consists of an array of numbered questions, each of which is assigned a set of marks.
  • In image processing, 2D arrays, often called matrices, are used.
  • It's also used in speech recognition, where each spoken signal is represented by an array.

102. Differentiate between variable/ function declaration and definition in the context of any OOPs programming language.

在任何面向对象编程语言的上下文中,区分变量/函数的声明与定义。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ac | 官方: 否 | 付费: 否

答案:

The purpose of a variable declaration is to tell the compiler of the following information: the variable's name, the kind of value it stores, and the initial value if any. Declaration, in other words, provides information about a variable's attributes. The definition of a variable allocates memory space for the variable and specifies where the variable will be stored.

变量声明的目的是向编译器告知以下信息:变量的名称、它存储的值的类型,以及初始值(如果有的话)。换句话说,声明提供了关于变量属性的信息。变量的定义则为变量分配内存空间,并指定变量将被存储的位置。

The following table illustrates the differences between definition and declaration:

下表说明了定义与声明之间的区别:
Definition
定义
Declaration
声明
Only one time can a variable or function be defined.
一个变量或函数只能被定义一次。
There is no limit to how many times a variable or function can be declared.
一个变量或函数可以被声明的次数没有限制。
Memory is allocated during definition.
定义期间会分配内存。
Memory is not allocated during declaration.
声明期间不会分配内存。
Example: void fun() { cout << “Hello World” << “\n”; } The above code defines a void function named “fun” and the compiler allocates the memory for it as soon as it encounters the above code.
示例:void fun() { cout << “Hello World” << “\n”; } 上述代码定义了一个名为“fun”的void函数,编译器一旦遇到上述代码就会为其分配内存。
Example: void fun(); The above code declares a void function named “fun”.
示例:void fun(); 上述代码声明了一个名为“fun”的void函数。

103. Differentiate between struct and union in the context of C programming language.

在C编程语言的上下文中,区分struct和union。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1af | 官方: 否 | 付费: 否

答案:

  • struct: In C, a structure is a user-defined data type that allows you to combine data objects of various types. A record is represented by a structure.

Syntax:

语法:
struct structureName
struct structureName
{
member definition;
member definition;
member definition;
member definition;
...
member definition;
member definition;
};
  • union: In C, a union is a unique data type that allows you to store many data types in the same memory region. A union can have numerous members, but only one of them can have a value at any given time. Unions are a useful approach to reuse the same memory space for numerous purposes.

Syntax:

语法:
union unionName
union unionName
{
member definition;
member definition;
member definition;
member definition;
...
member definition;
member definition;
};
The following table illustrates the differences between struct and union:
下表说明了struct和union之间的区别:
structunion
A structure is defined using the struct keyword.
结构体使用 struct 关键字定义。
Union is defined by the keyword union.
联合体使用 union 关键字定义。
The compiler allocates memory to each variable member when the variables are declared in a structure. The total size of each data member determines the size of a structure.
在结构体中声明变量时,编译器会为每个变量成员分配内存。每个数据成员的总大小决定了结构体的大小。
When a variable is declared in a union, the compiler allocates memory to the variable member with the largest size. A union's size is determined by the size of its largest data member.
在联合体中声明变量时,编译器会为具有最大大小的变量成员分配内存。联合体的大小由其最大数据成员的大小决定。
Changing a variable's value has no effect on other variables present in the struct.
更改变量的值不会影响结构体中存在的其他变量。
Changing the value of one variable member will have an impact on the other variables present in the union.
更改一个变量成员的值会影响联合体中存在的其他变量。
Each variable's member has its own memory area.
每个变量的成员都有自己的内存区域。
Members of a variable share the memory space of the variable with the largest size.
变量的成员共享具有最大大小的变量的内存空间。
Multiple variables in a structure can be initialised at the same time.
结构体中的多个变量可以同时初始化。
Only the first data member of a union can be initialised.
只能初始化联合体的第一个数据成员。
At any point in the program, all variable members store some value.
在程序中的任何时刻,所有变量成员都存储某个值。
At any given point in the program, exactly one data member stores a value.
在程序中的任何给定时刻,恰好有一个数据成员存储值。
It's used to keep track of various data types' values.
它用于跟踪各种数据类型的值。
It's used to save one value at a time from a variety of data types.
它用于一次从多种数据类型中保存一个值。
It provides for the simultaneous access and retrieval of any data member.
它提供了对任何数据成员的同时访问和检索。
It lets you access and retrieves individual data members at a time.
它允许您一次访问和检索单个数据成员。

104. What do you know about the ACID properties of a transaction in the context of a database management system?

在数据库管理系统的上下文中,您对事务的 ACID 属性了解多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b2 | 官方: 否 | 付费: 否

答案:

In a SQL Database, every transaction must follow some specific set of properties. These properties are referred to as ACID properties. They are as follows:

在 SQL 数据库中,每个事务都必须遵循一些特定的属性。这些属性称为 ACID 属性。它们如下所示:
  • A for Atomicity: This means that either the complete transaction occurs at once or it does not occur at all. There is no middle ground, which means that transactions do not take place in stages. Each transaction is treated as a single entity that is either completed or not conducted at all. It entails the following two procedures.

Abort: If a transaction aborts, any database modifications are lost.

中止:如果事务中止,任何数据库修改都将丢失。
Commit: When a transaction commits, the changes it contains become visible.The 'All or nothing rule' is another name for atomicity.For example, consider a bank transaction from one account to another. The transaction must either be completed entirely or must be failed. There cannot be a midway transaction such as money has been debited from one account but has not been credited to the other account. - C for Consistency: This property implies that integrity constraints must be fulfilled before and after the transaction to ensure that the database is consistent. It refers to a database's correctness. For example, if a bank transaction is performed from account A having X money to an account B having Y money, then after the transaction has been performed the total amount of money must remain the same, that is, X + Y.
提交:当事务提交时,它包含的更改变得可见。'全有或全无规则'是原子性的另一个名称。例如,考虑从一账户到另一账户的银行事务。事务必须完全完成或必须失败。不能存在中途事务,例如钱已从一个账户借记但尚未贷记到另一个账户。 - C 代表一致性:此属性意味着在事务之前和之后必须满足完整性约束,以确保数据库是一致的。它指的是数据库的正确性。例如,如果从拥有 X 金额的账户 A 到拥有 Y 金额的账户 B 执行银行事务,那么在事务执行后,总金额必须保持不变,即 X + Y。
  • I for Isolation: This attribute assures that several transactions can take place at the same time without causing database state inconsistencies. Transactions take place in a non-interfering manner. Changes made in one transaction are not visible to other transactions until that transaction's update is written to memory or committed. This feature assures that concurrently executing transactions results in a state that is identical to the one attained if they were executed sequentially in some order.For example, a bank has many ATMs present in a country. All of the ATMs can operate at the same time. They function as if they are the only transaction being performed on the bank’s database thereby, implementing isolation.
  • D for Durability: This attribute ensures that once a transaction has completed execution, the database updates and modifications are saved and written to memory and that they survive even if the system fails. These modifications are now saved in non-volatile memory and are permanent. As a result, the transaction's effects are never lost.For example, a backup database must be maintained so that if in any case, the primary database fails, we can recover the data from the backup database.

105. What is a DataBase Management System? What are its advantages over traditional file systems?

什么是数据库管理系统?与传统的文件系统相比,它有哪些优势?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b5 | 官方: 否 | 付费: 否

答案:

A database management system is a piece of software that manages databases. Examples of database management systems include MySQL, Oracle, and other commercial databases. A database management system (DBMS) provides an interface for doing tasks such as building a database, saving data in it, updating data, and creating a table in the database, among others. It ensures the database's safety and security. It also ensures data consistency when there are multiple users.

数据库管理系统是管理数据库的软件。数据库管理系统的示例包括 MySQL、Oracle 和其他商业数据库。数据库管理系统 (DBMS) 提供了一个界面,用于执行诸如构建数据库、在其中保存数据、更新数据以及在数据库中创建表等任务。它确保数据库的安全性和安全性。当有多个用户时,它还确保数据一致性。

Following are the advantages of a database management system over traditional file systems : - Better Data Management: Database management makes it possible for users to access better-managed data. As a result, end-users will be able to take a quick check at their data and respond quickly to any changes.

以下是数据库管理系统相对于传统文件系统的优势: - 更好的数据管理:数据库管理使用户能够访问管理更好的数据。因此,最终用户将能够快速查看他们的数据并快速响应任何更改。
  • Enhanced Data Security: As the number of users grows, the rate at which data is transferred or shared grows as well, raising the danger of data security. It is frequently used in the corporate sphere, where organisations devote a significant amount of money, time, and effort to assure data security and proper use. A Database Management System (DBMS) helps firms improve data security by providing a better platform for data privacy and security regulations.
  • Reduced Data Inconsistency: In a database management system, data inconsistency is minimised when various versions of the same data appear in different places. For example, data inconsistency occurs when a student's name is saved as "William Shakespeare" on the school's main computer, while the same student's name is saved as "W. Shakespeare" on the teacher's registered system.
  • Faster data access: The database management system (DBMS) aids in the production of speedy responses to database queries, allowing for faster and more accurate data access. End users, for example, will have improved access to data while dealing with massive amounts of sales data, allowing for a speedier sales cycle.

106. What do you understand about processes and threads in the context of an operating system?

在操作系统的上下文中,您对进程和线程了解多少?
  • 知识点: 大型机与遗留系统 / 行为与软技能 (标签: interviewbit, ibm, company-specific)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1b8 | 官方: 否 | 付费: 否

答案:

  • Process: Any program in execution is referred to as a process. Any process is controlled by a process control block. Process priority, process id, process state, CPU, register, and other information are all stored in the Process Control Block (PCB). Child Processes are created when a process spawns another process. It takes longer for a process to end, and it is isolated, which means it doesn't share memory with other processes.
  • Thread: A thread is a section of a process, which means that a process can have several threads, all of which are contained within the process. A thread can be in one of three states: running, ready, or blocked. Threads require less time to terminate than processes, but they do not isolate like processes.

The following table illustrates the differences between them:

下表说明了它们之间的差异:
Process
进程
Thread
线程
The creation of a process takes more time.
创建进程需要更多时间。
The creation of a thread takes less time.
创建线程需要更少时间。
Switching between contexts from one process to another takes longer.
从一个进程到另一个进程的上下文切换需要更长时间。
Switching between contexts from one thread to another takes less time.
从一个线程到另一个线程的上下文切换需要更少时间。
In terms of intercommunication, the process is inefficient.
在相互通信方面,进程是低效的。
In terms of intercommunication, Thread is more efficient.
在相互通信方面,线程更高效。
Different processes use different areas of memory. They do not share memory.
不同的进程使用不同的内存区域。它们不共享内存。
Threads of the same process share memory.
同一进程的线程共享内存。
The Process Control Block, Stack, and Address Space are all unique to each process.
进程控制块、栈和地址空间都是每个进程独有的。
All threads of the same process share the process control block but have different thread control blocks, stack and address space.
同一进程的所有线程共享进程控制块,但具有不同的线程控制块、栈和地址空间。
When one process gets blocked, it does not affect the other running processes.
当一个进程被阻塞时,它不会影响其他正在运行的进程。
When one thread gets blocked, all the other threads of the same process get blocked.
当一个线程被阻塞时,同一进程的所有其他线程都会被阻塞。
The operating system interface is used for process switching.
操作系统接口用于进程切换。
Thread switching does not necessitate invoking an operating system or causing a kernel interrupt.
线程切换不需要调用操作系统或引起内核中断。

107. Differentiate between primary memory and secondary memory in the context of a computer.

在计算机的上下文中,区分主存储器和辅助存储器。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1bb | 官方: 否 | 付费: 否

答案:

  • Primary/Main Memory: The computer memory that is directly accessible by the CPU is referred to as primary memory. It is made up of DRAM (Dynamic Random Access Memory) and provides the processor with an actual working area. It keeps track of the data and instructions that the processor is currently processing. Example - RAM (Random Access Memory)
  • Secondary Memory: Because the processor does not directly interface with the secondary memory, the contents of the secondary memory are first transferred to the primary memory and then accessed by the processor. Example - Hard disk, USB drive, etc.

The following table illustrates the differences between primary memory and secondary memory:

下表说明了主存储器和辅助存储器之间的差异:
Primary Memory
主存储器
Secondary Memory
辅助存储器
Storage in primary memory is temporary.
主存储器中的存储是临时的。
Storage in secondary memory is permanent.
辅助存储器中的存储是永久的。
Processor/CPU has immediate access to primary memory.
处理器/CPU 可以立即访问主存储器。
Processor/CPU does not have immediate access to primary memory.
处理器/CPU 不能立即访问主存储器。
It may be volatile (requires power to maintain the stored information) or non-volatile in nature.
它可能是易失性的(需要电源来维持存储的信息)或非易失性的。
It is always non-volatile (does not require power to maintain the stored information) in nature.
它始终是非易失性的(不需要电源来维持存储的信息)。
Semiconductor memories are the memory devices utilised for primary memory.
半导体存储器是用于主存储器的存储设备。
Magnetic and optical memories are used as secondary memory devices.
磁存储器和光存储器用作辅助存储设备。
Primary memory is more expensive than secondary memory.
主存储器比辅助存储器更昂贵。
When compared to primary memory devices, secondary memory devices are less expensive.
与主存储设备相比,辅助存储设备更便宜。

108. What are the functions of an operating system?

操作系统的功能是什么?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1be | 官方: 否 | 付费: 否

答案:

Following are the functions of an operating system : - Provides user interface: Operating systems provide an interface between computer hardware and the users. It makes it easy for the user to access the hardware in a systematic manner.

以下是操作系统的功能: - 提供用户界面:操作系统提供计算机硬件和用户之间的界面。它使用户能够以系统化的方式轻松访问硬件。
  • Maintains system performance: Helps increase performance by monitoring overall system health. To get a thorough picture of the system's health, keep track of the time between service requests and system responses. This can aid performance by providing critical information for troubleshooting issues.
  • Security: To safeguard user data, the operating system employs password protection and other similar measures. It also protects applications and user data from illegal access.
  • Error-detection: The operating system constantly monitors the system in order to detect errors and prevent a computer system from failing.
  • Memory Management: The primary memory, often known as main memory, is managed by the operating system. The main memory consists of a vast array of bytes or words, each of which is allocated an address. Main memory is rapid storage that the CPU can access directly. A program must first be loaded into the main memory before it can be executed. For memory management, an operating system performs the following tasks:
    It keeps track of primary memory, i.e., which user programmes use specific bytes of memory. Memory addresses that have already been assigned, as well as memory addresses that have yet to be used. The OS determines the order in which processes are permitted memory access and for how long in multiprogramming. It allocates memory to a process when the process asks for it and deallocates memory when the process exits or performs an I/O activity. - Processor Management: In a multiprogramming environment, the operating system determines the sequence in which tasks access the processor and the amount of processing time each process has.

    它跟踪主存储器,即哪些用户程序使用特定的内存字节。已分配的内存地址,以及尚未使用的内存地址。在多道程序设计环境中,操作系统决定进程被允许访问内存的顺序以及访问的时长。当进程请求内存时,它为该进程分配内存,并在进程退出或执行 I/O 活动时释放内存。 - 处理器管理:在多道程序设计环境中,操作系统决定任务访问处理器的顺序以及每个进程的处理时间。
  • Device Management: An operating system (OS) controls device connectivity through drivers. It keeps track of all the devices that are linked to the system. The Input/Output controller is a program that is responsible for all devices. Determines which processes are allowed access to a device and for how long. Allocates devices in a way that is both effective and efficient. When a gadget is no longer needed, it is deallocated.
  • File Management: A file system is divided into directories to make navigation and usage more efficient. Other directories and files may be found in these directories. The operating system keeps track of where data is kept, user access settings, and the state of each file, among other things.

109. Explain function overloading and function overriding in the context of C++ programming language. Differentiate between them.

解释 C++ 编程语言中函数重载和函数覆盖的概念。区分它们之间的差异。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1c1 | 官方: 否 | 付费: 否

答案:

  • Function Overloading:

It allows for multiple definitions of the function by modifying the signature, i.e. the number of parameters, the datatype of the parameters, and the return type.

它通过修改签名(即参数的数量、参数的数据类型和返回类型)来允许对函数进行多个定义。
For example:
例如:

using namespace std;

using namespace std;

// Method 1

// 方法 1
void overloadedMethod(int x)
void overloadedMethod(int x)
{
cout << "In Overloaded Method 1" << endl;
cout << "In Overloaded Method 1" << endl;
}

// Method 2

// 方法 2
void overloadedMethod(float x)
void overloadedMethod(float x)
{
cout << "In Overloaded Method 2" << endl;
cout << "In Overloaded Method 2" << endl;
}

// Method 3

// 方法 3
void overloadedMethod(int x1, float x2)
void overloadedMethod(int x1, float x2)
{
cout << "In Overloaded Method 2" << endl;
cout << "In Overloaded Method 2" << endl;
}

int main()

int main()
{
int x = 5;
int x = 5;
float y = 5.5;
float y = 5.5;
overloadedMethod(x);
overloadedMethod(x);
overloadedMethod(y);
overloadedMethod(y);
overloadedMethod(x, y);
overloadedMethod(x, y);

return 0;

return 0;
}
Output:
输出:

In Overloaded Method 1

在重载方法 1 中
In Overloaded Method 2
在重载方法 2 中
In Overloaded Method 3
在重载方法 3 中
Explanation:
说明:

In the above code, we have three functions with the same name and return type. However, they have different function signatures which differentiates them from each other. When we pass a parameter of int type, method 1 gets executed. When we pass a parameter of float type, method 2 gets executed. When we pass both an int and a float type parameter, method 3 gets executed. - Function Overriding:

在上面的代码中,我们有三个名称和返回类型相同的函数。但是,它们具有不同的函数签名,从而彼此区分开来。当我们传递一个 int 类型的参数时,方法 1 被执行。当我们传递一个 float 类型的参数时,方法 2 被执行。当我们同时传递一个 int 和一个 float 类型的参数时,方法 3 被执行。 - 函数重写:
It is the redefining of a base class function in a derived class with the same signature, that is, the return type and parameters. It's only possible in derived classes.
它是在派生类中重新定义基类中具有相同签名(即返回类型和参数)的函数。这仅在派生类中可行。

class Test

class Test
{
public:
public:
virtual void print(){ cout << "Test Function"; }
virtual void print(){ cout << "Test Function"; }
};

class Sample : public Test

class Sample : public Test
{
public:
public:
void print(){ cout << "In Sample Function";}
void print(){ cout << "In Sample Function";}
};
int main()
int main()
{
Test obj = new Sample();
Test obj = new Sample();
obj.print();
obj.print();
return 0;
return 0;
}
Output:
输出:

In Sample Function

In Sample Function
In the above code, the class Sample extends the class Test and therefore inherits all its properties. We can clearly see that both the classes have a function ‘print’ with the same function signature and return type. Therefore, the above code implements function overriding. Since we have added a virtual keyword in the function of the base class, the function is called according to the type of object being referred to and so the print function of the Sample class gets called.
在上面的代码中,类 Sample 继承了类 Test,因此继承了它的所有属性。我们可以清楚地看到,这两个类都有一个函数 'print',具有相同的函数签名和返回类型。因此,上述代码实现了函数重写。由于我们在基类的函数中添加了 virtual 关键字,函数会根据所引用对象的类型被调用,因此 Sample 类的 print 函数被调用。

The following points illustrate the differences between function overloading and function overriding:

以下几点说明了函数重载和函数重写之间的区别:
  • When one class inherits from another, it causes overriding of functions. Overloading can happen in the same class.
  • Overloaded functions must have a different function signature, which means they must have a different number of parameters or a different type of parameter. Function signatures must be identical when overriding.
  • Overloaded functions are present in the same scope of a class while overridden functions are present in different scopes.

110. Explain the major concepts of Object Oriented Programming in the context of C++ programming language.

在 C++ 编程语言的背景下解释面向对象编程的主要概念。
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1c4 | 官方: 否 | 付费: 否

答案:

There are four major concepts in Object-Oriented Programming. They are as follows:

面向对象编程有四个主要概念。它们如下:
  • Encapsulation: Encapsulation is described as the binding of data and the functions that alter it in Object-Oriented Programming. Encapsulation makes a class's variables or data concealed from other classes and that they can only be accessible through member functions of the class in which it is stated.Let us consider the following example: In a company, there are different divisions such as accounts, finance, sales, and so on. The finance department’s duty is to keep track of all financial data and the transactions performed on them. Similarly, the sales department’s duty is to keep track of all sales-related activities. Let us assume that an official from the finance department requires the sales data for a specific month. In this scenario, he cannot access the sales section's data directly. An official from the sales department must be contacted because only he can access the data. Here, the process of asking the sales officials for the data depicts encapsulation. The sales department's data and the people who can influence it are bundled together under the category "sales section."
  • Abstraction: Abstraction refers to revealing only the most important information while concealing the details. Data abstraction refers to exposing only the most important aspects of the data to the outside world while concealing the implementation specifics.Consider the case of a man driving a vehicle. The man only knows that pressing the accelerators will increase the vehicle's speed and that applying the brakes will stop it, but he has no idea how the speed is increased by pressing the accelerators, nor does he understand the car's inner mechanism or how the accelerator, brakes, and other controls are implemented in the car. This is the definition of abstraction.
  • Inheritance: Inheritance refers to a class's capacity to derive features and traits from another class. One of the most significant characteristics of Object-Oriented Programming is inheritance. A class that inherits properties from another class is referred to as a subclass or a derived class. A class whose properties and member functions are inherited by other classes are referred to as superclass or base class. Inheritance supports the concept of "reusability".Consider a class Vehicle that contains all the essential functions which a vehicle must possess. This includes accelerating speed, applying brakes, changing gear and so on.Now let us assume the classes Car, Bus, Truck and so on. All of these classes can be considered as a subclass of the class Vehicle since all of them must essentially possess all the properties of the class Vehicle.
  • Polymorphism: Polymorphism refers to the fact that something exists in multiple forms. Polymorphism, in simple terms, is the ability of a message to be displayed in multiple formats. For example, at the same time, a person might have a variety of characteristics. At the same time, he is a father, a spouse, and a worker. As a result, the same person behaves differently in different settings. Polymorphism is the term for this.There are mainly two types of polymorphism in C++. They are as follows:

Compile Time Polymorphism: Function overloading and operator overloading is used to achieve this form of polymorphism.

编译时多态:函数重载和运算符重载用于实现这种形式的多态。
Runtime Polymorphism: Function Overriding is used to generate this form of polymorphism.
运行时多态:函数重写用于生成这种形式的多态。

IBM Interview Preparation

111. Why are you a fit for this role?

为什么你适合这个职位?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1e7 | 官方: 否 | 付费: 否

答案:

In such types of questions, mention your strong points and the skills you possess which makes you a good fit for the role. A sample answer to the question could be as follows:

在这类问题中,提及你的强项和你所具备的技能,这些使你成为该职位的合适人选。该问题的一个示例答案可以如下:

“For various reasons, I am certain that I am a suitable fit for this role, but most notably because of my commitment to going above and beyond in my work. To succeed in this role, I am committed to learning any new abilities on my own. My abilities and skills are a perfect match for the prerequisites for this post. My communication and leadership abilities, in particular, make me a strong contender for the position.”

“出于各种原因,我确信自己是这个职位的合适人选,但最显著的原因是我在工作中追求卓越的承诺。为了在这个职位上取得成功,我致力于自学任何新技能。我的能力和技能完全符合这个岗位的先决条件。尤其是我的沟通和领导能力,使我成为这个职位的有力竞争者。”

112. Is it hard to get an internship at IBM?

在IBM获得实习机会难吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ea | 官方: 否 | 付费: 否

答案:

IBM assesses a candidate thoroughly in both technical and interpersonal domains before making any hiring decisions. Therefore, getting an internship at IBM should not be considered as a piece of cake. However, with the right preparation and the right attitude, one can easily crack an internship at IBM. The only thing required is the right path and guidance.

IBM在做出任何招聘决定之前,都会对候选人在技术和人际交往两个方面进行全面评估。因此,在IBM获得实习机会不应被视为轻而易举的事。然而,有了正确的准备和正确的态度,一个人可以轻松攻克IBM的实习。唯一需要的就是正确的路径和指导。

113. Does IBM hire interns?

IBM招聘实习生吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1ed | 官方: 否 | 付费: 否

答案:

Yes, IBM does hire interns.

是的,IBM确实招聘实习生。

114. What is the salary for freshers at IBM?

IBM应届生的薪资是多少?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f0 | 官方: 否 | 付费: 否

答案:

The average salary for freshers at IBM ranges from Rs. 2.2 lakhs per year to Rs. 7.3 lakhs per year.

IBM应届生的平均薪资范围为每年22万卢比到每年73万卢比。

115. Why do you want to work for IBM?

你为什么想为IBM工作?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f3 | 官方: 否 | 付费: 否

答案:

In such types of questions, mention the things which motivate you to work for the company. Try to highlight the values and the motto which the company believes in as part of your motivation to join the company.

在这类问题中,提及激励你为公司工作的事项。试着强调公司所信奉的价值观和宗旨,作为你加入公司的动机的一部分。

The following could be a sample answer:

以下可以作为一个示例回答:

“I'd like to work with IBM because IBM has a strong set of principles and a clear commitment to not only your staff but also to your customers and clients. This is an organisation where I will be able to grow, thrive, and develop over time, and I will have the opportunity to work with an incredibly brilliant group of people who are all dedicated to the IBM brand's long-term success. I see this as a once-in-a-lifetime opportunity to put my abilities and traits to good use.”

“我想为IBM工作,因为IBM有一套强大的原则,并且不仅对员工,还对客户和顾客有着明确的承诺。这是一个我能随时间成长、茁壮发展和进步的组织,我将有机会与一群极其出色的人共事,他们都致力于IBM品牌的长期成功。我认为这是一个千载难逢的机会,让我的能力和特质得到充分发挥。”

116. Is IBM interview easy?

IBM的面试容易吗?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf1f9 | 官方: 否 | 付费: 否

答案:

The interviews at IBM focus on the candidate’s understanding of the basic fundamentals. With the right preparation, IBM interviews are definitely easy to crack.

IBM的面试侧重于候选人对基础知识的理解。有了正确的准备,IBM的面试绝对容易攻克。

117. How long is the IBM hiring process?

IBM的招聘流程有多长?
  • 知识点: 大型机与遗留系统 (标签: interviewbit, ibm, company-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: general
  • 公司: IBM
  • id: 69b37b5558d557c902baf209 | 官方: 否 | 付费: 否

答案:

At International Business Machines, the employment procedure can take anywhere from two weeks to ten months . Because of the large number of applicants, the screening procedure takes a bit longer before the best candidates are chosen.

在International Business Machines,招聘流程可能需要两周到十个月不等。由于申请人数众多,筛选过程会稍长一些,之后才会选出最佳候选人。

Coding Problems

0/4

Easy Problems

简单问题

Time Complexity

时间复杂度

Graph Data Structure & Algorithms

图数据结构与算法

Arrays

数组

Strings

字符串

Pangram Check

全字母句检查

Very Easy

非常简单

28.56 Mins

28.56分钟

Solve

解答

Connected Components

连通分量

Easy

简单

32.11 Mins

32.11 分钟

Solve

解答

Diagonal Flip

对角线翻转

Very Easy

非常简单

21.15 Mins

21.15分钟

Solve

解答

Valid Password

有效密码

Very Easy

非常简单

21.45 Mins

21.45 分钟

Solve

解答

0/2

Intermediate Problems

中级问题

Dynamic Programming

动态规划

Word Break

单词拆分

Medium

中等

68.35 Mins

68.35 分钟

Solve

解答

Word Break II

单词拆分 II

Medium

中等

69.20 Mins

69.20 分钟

Solve

解答

118. What is the time parameter in JCL? Explain what does TIME=1440 mean?

JCL 中的时间参数是什么?解释 TIME=1440 是什么意思?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e37 | 官方: 否 | 付费: 否

答案:

JCL TIME is an optional Keyword parameter that specifies how long a job may use the processor. In simple words, TIME specifies the max CPU usage time that can be used for the job's execution. It is possible to code the TIME parameter at the Job and Step levels as well. Once the specified execution time is reached, the system will stop the JOB execution automatically. Thus, the TIME parameter will inform OS of the maximum CPU utilization time, and once the specified time has been consumed by the job, OS will cancel the job automatically.

JCL TIME 是一个可选的关键字参数,用于指定作业可以使用处理器的时长。简而言之,TIME 指定了作业执行时可使用的最大 CPU 使用时间。还可以在作业级别和步骤级别编码 TIME 参数。一旦达到指定的执行时间,系统将自动停止作业执行。因此,TIME 参数会告知操作系统最大的 CPU 利用时间,一旦作业消耗了指定时间,操作系统将自动取消该作业。

Additional options for TIME Parameter - TIME=1440

TIME 参数的其他选项 - TIME=1440
It indicates that the job or step has no time limit and can be executed indefinitely. - TIME=MAXIMUM
它表示作业或步骤没有时间限制,可以无限期执行。 - TIME=MAXIMUM
This means the job or step can use the most CPU time possible.
这意味着作业或步骤可以使用尽可能多的 CPU 时间。

119. Explain different types of Job control statements or JCL statements.

解释不同类型的作业控制语句或 JCL 语句。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e3a | 官方: 否 | 付费: 否

答案:

For each job that you submit, you need to specify where the input should be found, how it should be processed, and what should be done with the output. The information is conveyed to MVS (Multiple Virtual Storage) through a set of statements called job control statements in JCL. MVS can glean a great deal of information from JCL's extensive set of job control statements. A very small set of these control statements can, however, be used to run most jobs. In time, you may discover that you only need to know the details of a few of the control statements as you become familiar with the jobs you typically run.

对于你提交的每个作业,你需要指定输入应在哪里找到、应如何处理以及输出应如何处理。这些信息通过 JCL 中的一组称为作业控制语句的语句传递给 MVS(多重虚拟存储)。MVS 可以从 JCL 扩展的作业控制语句集中获取大量信息。然而,只需使用这些控制语句中的一小部分即可运行大多数作业。随着时间推移,你可能会发现,随着对通常运行的作业越来越熟悉,只需了解少数控制语句的细节即可。

Types of Job Control Statements

作业控制语句的类型

Job control statements can be classified into the following three types: - JOB Statement: It is the first of three control statements in JCL, which tells the mainframe OS (Operating System) about the job identity. Besides Job name and accounting data, there are other parameters in the JOB statement such as class, msgclass, and msglevel. These parameters facilitate the OS in allocating the appropriate scheduler. Also, it is useful for monitoring CPU utilization and sending notifications to the user.

作业控制语句可以分为以下三种类型: - JOB 语句:它是 JCL 中三个控制语句中的第一个,用于告知大型机操作系统(OS)作业身份。除了作业名称和记账数据外,JOB 语句中还有其他参数,如 class、msgclass 和 msglevel。这些参数有助于操作系统分配适当的调度程序。同时,它也有助于监控 CPU 利用率并向用户发送通知。
Syntax:
语法:

//Job-name JOB Positional-param, Keyword-param

//Job-name JOB Positional-param, Keyword-param
Here, - Job-name specifies a name for the job and appears after "//". It can have a length of 1-8 alphanumeric characters.
这里,- 作业名指定作业的名称,并出现在“//”之后。其长度可为1-8个字母数字字符。
  • The keyword 'JOB' identifies it as a JOB statement.
  • Positional-param means positional parameters and keyword-param means keyword parameter.
    Example:

    示例:

//JOB011 JOB (456),'INTERVIEWBIT',

//JOB011 JOB (456),'INTERVIEWBIT',
//  CLASS=A
// CLASS=A
  • EXEC Statement: It stands for EXECUTION. The EXEC statement specifies a program/job-step, as well as utilities and procedures to be executed. There can be 255 steps in a JCL, which means it can have 255 'EXEC' statements.

Syntax:

语法:
//Step-name EXEC Positional-param, Keyword-param
//步骤名 EXEC 位置参数, 关键字参数
Here, - Step-name specifies a name for the job step and appears just after “//”.
这里,- 步骤名指定作业步骤的名称,并紧跟在“//”之后出现。
  • The keyword 'EXEC' identifies it as an EXECUTION statement.
  • Positional-param means positional parameters and keyword-param means keyword parameter.
    Example:

    示例:

//STEP01 EXEC PGM=INTERVIEWBIT

//STEP01 EXEC PGM=INTERVIEWBIT
  • DD Statement: DD stands for Data Definition and helps in specifying the data sets used by a program or procedure. For each job step, the required input and output resources must be described in a DD statement. DD statements are required for every data set used or created in a job step. Up to 3273 DD statements are allowed in a step.

Syntax:

语法:
//DD-name DD Parameters
//DD名 DD 参数
Here, - DD-name specifies a name for DD-statement and appears just after “//”.
这里,- DD名指定DD语句的名称,并紧跟在“//”之后出现。
  • The keyword 'DD' identifies it as a DD statement.
  • Parameters represent different types of parameters for DD statements.
    Example:

    示例:

//STEPLIB DD  DSN=hlq.xxxxxxxx.CDBALOAD,DISP=SHR

//STEPLIB DD DSN=hlq.xxxxxxxx.CDBALOAD,DISP=SHR

120. State the difference between positional parameter and keyword parameter in JCL.

说明JCL中位置参数和关键字参数的区别。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e3d | 官方: 否 | 付费: 否

答案:

  • Positional Parameters: Positional parameters are those that follow a fixed position in terms of the order in a statement JCL. Their order in the JCL statement is always fixed therefore they should be specified in the specified order. Changing the position of the positional parameters will result in an error in the JCL. Examples: ACCT (Accounting Information), PGM (Programmer Name), etc.
  • Keyword Parameters: There is no need for a fixed position for these parameters. It doesn't matter in what order you code the keyword parameters; you won't get any errors. Examples: TIME, REGION, MSGLEVEL, CLASS, etc.

121. What are different parameters for DD (Data Definition) statement?

DD(数据定义)语句有哪些不同的参数?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e40 | 官方: 否 | 付费: 否

答案:

Some of the parameters for the DD statement are listed below. Based on your needs, you can select one or more parameters separated by commas.

下面列出了DD语句的一些参数。根据您的需求,您可以选择一个或多个参数,并用逗号分隔。
  • DSN Parameter: It is used to specify the name of a newly created or existing dataset. There can be a total of 44 characters in the DSN value. The sub-names can be 1 to 8 characters in length, separated by periods.

Syntax:

语法:
DSN=Physical Dataset Name
DSN=物理数据集名称
Here, - The keyword DSN specifies DSN parameter.
这里,- 关键字DSN指定DSN参数。
  • Physical dataset name refers to the name of the newly created or existing dataset.
  • DISP Parameter: "DISP" stands for Disposition, a keyword parameter used in JCL to describe a data set's status to OS. Essentially, it indicates how the OS should handle the dataset after JOB/STEP termination. It contains three sub-parameters: status, normal and abnormal termination activities of the JOB.
    Syntax:

    语法:

DISP=({status},{normal Disposition},{abnormal Disposition})

DISP=({状态},{正常处置},{异常处置})
Here, - The keyword DISP specifies the Disposition parameter.
这里,- 关键字DISP指定Disposition参数。
  • Status can be NEW (specifies that the dataset is new), OLD (specifies that the dataset exists when the step begins.), MOD (extends the dataset if the dataset already exists or creates a new one if it is not existing.), or SHR (specifies that the dataset can be shared (read access) with other jobs).
  • The normal disposition specifies what is to be done with a dataset after a normal termination. It takes one of the values CATLG, UNCATLG, PASS, KEEP, or DELETE.
  • The abnoram disposition specifies what is to be done with a dataset after a normal termination. It takes one of the values CATLG, UNCATLG, KEEP, DELETE.
  • DCB Parameter: DCB (Data control block) parameter provides information about the physical characteristics of a dataset. For newly created datasets, this parameter is required.
    Syntax:

    语法:

DCB=

DCB=<参数列表>
Here, - The keyword DCB specifies the data control block parameter.
这里,- 关键字DCB指定数据控制块参数。
  • List of parameters can be RECFM (specifies record format of the dataset), LRECL (defines the length of logical records), BLKSIZE (defines the size of a block of record), DSORG (specifies the organization of the data set as physical sequential (PS), partitioned (PO), or direct (DA)).
  • SPACE Parameter: The SPACE parameter indicates how much space is required to store a dataset on a Direct Access Storage Disk.
    Syntax:

    语法:

SPACE=(Unit of Space,(Primary,Secondary,Directory),RLSE,CONTIG,ROUND)

SPACE=(空间单位,(主分配,次分配,目录),RLSE,CONTIG,ROUND)
Here, - The keyword DCB specifies the data control block parameter.
这里,- 关键字DCB指定数据控制块参数。
  • The unit of space is specified in Tracks (TRK), Cylinders (CYL), block length (BLKLGTH), record length (RECLGTH).
  • Primary specifies the amount of primary space required in terms of the space unit (tracks/cylinders/number of data blocks)
  • Secondary specifies the secondary quantity of units if the primary is exceeded but allocated only when the dataset expands.
  • The directory specifies the number of directory blocks to be allocated.
  • RLSE specifies releasing the unused space requested.
  • CONTIG specifies to allocate contiguous primary space.
  • ROUND specifies allocation by block length rounded to integral cylinders.
  • SYSOUT Parameter: We have discussed so far the parameters of DD statements that correspond to data stored in datasets. According to the class specified, SYSOUT directs the data to the output device.
    Syntax:

    语法:

SYSOUT=class

SYSOUT=class

122. Explain some of the commonly used parameters in the EXEC statement.

解释EXEC语句中一些常用的参数。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e43 | 官方: 否 | 付费: 否

答案:

EXEC stands for EXECUTION. The EXEC statement specifies a program/job step, as well as utilities and procedures to be executed.

EXEC代表执行。EXEC语句指定一个程序/作业步骤,以及要执行的实用程序和过程。

Syntax:

语法:

//Step-name EXEC Positional-param, Keyword-param

//步骤名 EXEC 位置参数, 关键字参数
Some of the commonly used positional and keyword parameters in EXEC statement include: - PGM: It specifies the name of the program that will be executed in the job step.
EXEC语句中一些常用的位置参数和关键字参数包括:- PGM:它指定将在作业步骤中执行的程序名称。
  • PROC: It specifies the name of the procedure that will be executed in the job step.
  • ACCT: It specifies the accounting details of the job step.
  • ADDRSPC: For job steps, it specifies whether real or virtual storage is needed for execution.
  • COND: It specifies conditions for executing subsequent job steps if the previous job step fails abnormally.
  • PARM: It provides parameterized data to the job steps.
  • REGION: It specifies how much space or region size should be allocated for a specific job/job step.
  • TIME: It describes the time limit of a job or job step.
  • Data Science
  • All Events
  • My Events

123. State difference between JOBLIB and the STEPLIB statements.

说明JOBLIB和STEPLIB语句之间的区别。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e46 | 官方: 否 | 付费: 否

答案:

The mainframe OS has to search for and locate the program you specify in a JCL statement in order to run it. In order to locate programs, a private library must be searched before the system program library. If you wish to run a program residing in a private program library, you must either specify the JOBLIB DD (Data definition) statement or the STEPLIB DD (Data Definition) statement to enable OS to locate the program successfully. Both JOBLIB and STEPLIB are DD (Data definition) statements. Although JOBLIB DD and STEPLIB DD specify a private library as the location of a specified program, each will behave differently for OS search.

大型机操作系统必须搜索并定位您在JCL语句中指定的程序才能运行它。为了定位程序,必须先搜索私有库,然后再搜索系统程序库。如果您希望运行驻留在私有程序库中的程序,则必须指定JOBLIB DD(数据定义)语句或STEPLIB DD(数据定义)语句,以使操作系统成功定位程序。JOBLIB和STEPLIB都是DD(数据定义)语句。尽管JOBLIB DD和STEPLIB DD指定一个私有库作为指定程序的位置,但它们在操作系统搜索时的行为会有所不同。
  • JOBLIB Statement: Every step of the JOB is searched in the private libraries according to JOBLIB DD. The location of the program to be executed in JCL is referenced by it. This statement follows the JOB statement, but before the EXEC statement. It is only applicable to procedures and programs running in-stream.

Syntax:

语法:
//JOBLIB DD DSN=dsnname
//JOBLIB DD DSN=dsnname
Here, - The keyword JOBLIB specifies the JOBLIB statement.
这里,- 关键字JOBLIB指定JOBLIB语句。
  • DD specifies the Data definition statement.
  • DSN specifies the location of the program/job to be executed.
  • STEPLIB statement: The only single step of the JOB is searched in the private libraries according to STEPLIB. The location of the program to be executed within a Job Step is referenced by it. This statement follows the EXEC statement, but before the DD statement of the job step.
    Syntax :

    语法:

//STEPLIB DD DSN=dsnname

//STEPLIB DD DSN=dsnname
Here, - The keyword STEPLIB specifies the STEPLIB statement.
这里,- 关键字STEPLIB指定STEPLIB语句。
  • DD specifies the Data definition statement.
  • DSN specifies the location of the step to be executed.

124. Explain what you mean by Generation data group (GDG).

请解释你所说的Generation data group(GDG)的含义。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e49 | 官方: 否 | 付费: 否

答案:

Generation Data Group (GDG) is an important concept in JCL. GDG consists of groups of related data sets arranged chronologically. Each of these related sets shares a unique name. A generation number and a version number are added to the end of the name of each data set within a group to make it unique.

Generation Data Group(GDG)是JCL中的一个重要概念。GDG由按时间顺序排列的相关数据集组组成。这些相关数据集中的每一个都共享一个唯一的名称。组内每个数据集名称的末尾会附加一个世代号和版本号,以使其唯一。

Syntax:

语法:

ABC.PQR.XYZ.GnnnnVmm

ABC.PQR.XYZ.GnnnnVmm
Here, the GDG base is ABC.PRQ.XYZ.
此处,GDG基名为ABC.PQR.XYZ。

G represents the Generation number (Value range 0000 – 9999), and V represents the Version number (Value range 00 – 99).

G表示世代号(取值范围0000-9999),V表示版本号(取值范围00-99)。

Example:

示例:

MYLIB.URMI.SAMPLE.G0001V00

MYLIB.URMI.SAMPLE.G0001V00
MYLIB.URMI.SAMPLE.G0002V00, and so on.
MYLIB.URMI.SAMPLE.G0002V00,以此类推。
Here, the GDG base is MYLIB.URMI.SAMPLE.
此处,GDG基名为MYLIB.URMI.SAMPLE。

125. What are symbolic parameters and why is it required?

什么是符号参数,为什么需要它?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e4c | 官方: 否 | 付费: 否

答案:

In general, any parameter that varies with every execution of a program should be considered a symbolic parameter. By using symbolic parameters, the procedure becomes more flexible. The procedure will not have to be altered each and every time a small and recurring change is made at a particular place.

通常,任何随程序每次执行而变化的参数都应被视为符号参数。通过使用符号参数,过程变得更加灵活。无需在特定位置进行小而频繁的更改时,每次都修改过程。

In symbolic parameters, an ampersand (&) precedes the string of 1 to 7 alphameric characters. It is mandatory to put an alphabetic character after &. JCL statements do not permit symbolic parameters to appear in the name or operation fields; they may only appear in the operand field. On a PROC or EXEC statement, if more than one symbolic parameter is assigned, only the first is used.

在符号参数中,与号(&)位于1到7个字母数字字符组成的字符串之前。在&之后必须放置一个字母字符。JCL语句不允许符号参数出现在名称或操作字段中;它们只能出现在操作数字段中。在PROC或EXEC语句中,如果分配了多个符号参数,只使用第一个。

126. What is a temporary dataset in JCL? How to create a temporary dataset?

JCL中的临时数据集是什么?如何创建临时数据集?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e4f | 官方: 否 | 付费: 否

答案:

Temporary datasets are datasets (file holding one or more records) that are only needed for the duration of the job and are deleted when the job is completed. They need storage only for the job duration and once the job is completed, they are deleted. These datasets typically are represented as DSN=&&name or simply without specifying a DSN. By using them, we can forward the output of one step to another step in the same job.

临时数据集是仅在作业运行期间需要的数据集(保存一条或多条记录的文件),作业完成时会被删除。它们只需要在作业期间进行存储,一旦作业完成,就会被删除。这些数据集通常表示为DSN=&&name,或者简单地不指定DSN。通过使用它们,我们可以将一步的输出传递给同一作业中的另一步。

127. What are the benefits of using JCL?

使用JCL有哪些好处?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e52 | 官方: 否 | 付费: 否

答案:

JCL offers the following advantages: - You can delete and create lots of data sets, VSAM (Virtual Storage Access Method) Clusters, and GDGs (Generation Data Groups) using JCL.

JCL提供以下优点:- 您可以使用JCL删除和创建大量数据集、VSAM(虚拟存储访问方法)集群和GDG(世代数据组)。
  • Comparing files with different PDS (Partitioned Data Set) members can be done with it.
  • Using it, you can merge and sort various data files.
  • Moreover, it is capable of executing and compiling batch-based programs (scheduled programs that are assigned through JCL to run on a computer without further user interaction) too.
  • JCL is easy to modify and therefore it is easy for beginners to learn.
  • In addition, it provides a number of utilities such as IEDCOPY, IDCAMS, etc., which help in executing tasks in an easier and more convenient manner.

128. Explain Msglevel parameter and its significance.

解释Msglevel参数及其重要性。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e55 | 官方: 否 | 付费: 否

答案:

With the Msglevel parameter, you can control or set the listing of the Job output for each specific job. It controls the way allocation messages, and termination messages will appear in job output (SYSOUT). Msglevel can be used to inform JCL about the messages we wish to print.

通过 Msglevel 参数,您可以控制或设置每个特定作业的作业输出列表。它控制分配消息和终止消息在作业输出(SYSOUT)中的显示方式。Msglevel 可用于告知 JCL 我们希望打印的消息。

Syntax:

语法:

MSGLEVEL=(statements)

MSGLEVEL=(statements)
Here, - Statements can be numbered 0, 1, or 2. (0 to print Job-related statements, 1 to print all JCL statements along with procedures, and 2 to print only input JCL statements)
这里,- Statements 可以编号为 0、1 或 2。(0 表示打印与作业相关的语句,1 表示打印所有 JCL 语句以及过程,2 表示仅打印输入的 JCL 语句)
  • Messages can be numbered 0 or 1. (0 to not show any message except return code i.e., allocation and termination, and 1 to show all messages, i.e., whether it is an allocation or termination, all details will be visible in the spool).

129. How can we convert a FB (Fixed block) file to VB (Variable block) file using a sort program?

如何使用排序程序将 FB(固定块)文件转换为 VB(可变块)文件?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e58 | 官方: 否 | 付费: 否

答案:

By using the FTOV option in SORT, you can convert a FB file to a VB file. Input records of fixed length are converted to output records of variable length using this parameter. VB files should have 4 extra bytes for RDW (Record Descriptor Word). Accordingly, the length of the record in the VB file is the RDW (4 bytes) + the actual length of the record.

通过在 SORT 中使用 FTOV 选项,您可以将 FB 文件转换为 VB 文件。使用此参数,固定长度的输入记录会转换为可变长度的输出记录。VB 文件应有额外的 4 个字节用于 RDW(记录描述字)。因此,VB 文件中记录的长度为 RDW(4 字节)+ 记录的实际长度。

Example:

示例:

SORT parameters:

SORT 参数:
SORT FIELDS=COPY
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT1,FTOV
OUTFIL FNAMES=SORTOUT1,FTOV
Here, SORTOUT1 is the VB output file.
这里,SORTOUT1 是 VB 输出文件。

If you input an 80-byte FB file, then the output will be an 84-byte VB file (4 bytes for RDW).

如果您输入一个 80 字节的 FB 文件,则输出将是一个 84 字节的 VB 文件(4 字节用于 RDW)。

Successful Tech Career for FREE!

免费开启成功的科技职业生涯!

Successful Tech Career!

成功的技术职业生涯!

Interview Process

面试流程

CTC & Designation

CTC与职位级别

Projects on the Job

工作项目

Referral System

推荐系统

Try It Out

试试看

2 Lakh+ Roadmaps Created

已生成20万+职业规划

130. Name different JCL statements that are not permitted in the procedures.

请列出过程中不允许使用的不同 JCL 语句。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e5b | 官方: 否 | 付费: 否

答案:

The following JCL statements are not permitted in the procedure: - JOB, Delimiter(/*), or Null statements

以下 JCL 语句在过程中不允许使用:- JOB、Delimiter(/*) 或 Null 语句
  • JOBLIB or JOBCAT DD statements
  • DD * or DATA statements
  • Any JES2 or JES3 control statements

131. What are the hierarchy levels in JCL?

JCL 中的层次级别有哪些?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e5e | 官方: 否 | 付费: 否

答案:

Every statement of JCL consists of the hierarchy levels: - Identifier field

JCL 的每条语句都由层次级别组成:- 标识字段
  • Name field
  • Operation field
  • Parameter field (POSITIONAL, KEYWORD)
  • Comment field (if any)

Example:

示例:

//STEP1 EXEC PGM=MYPROGRAM,TIME=1440

//STEP1 EXEC PGM=MYPROGRAM,TIME=1440
//* JCL Statement Structure
//* JCL 语句结构
Here, - // is the identifier of the JCL statement.
这里,- // 是JCL语句的标识符。
  • STEP1 is the name assigned to the job step.
  • EXEC is a keyword used to indicate that it is an EXEC statement.
  • PGM is a positional parameter and specifies the name of the program to be executed
  • TIME is the keyword parameter that specifies the maximum amount of processor time the step can use.
  • //* is the identifier of the comment field and ‘JCL statement structure’ is the comment.

132. What is the meaning of DISP=OLD and DISP=SHR?

DISP=OLD 和 DISP=SHR 的含义是什么?
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: behavioral | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e61 | 官方: 否 | 付费: 否

答案:

DISP=OLD -> This refers to a dataset that has already been created.

DISP=OLD -> 指一个已经创建的数据集。

DISP=SHR -> It means that more than one user may share data. However, it is a read-only file.

DISP=SHR -> 意味着多个用户可以共享数据。然而,它是一个只读文件。

133. Where are 88 levels utilized in COBOL?

在 COBOL 中,88 级别在哪里使用?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f6b | 官方: 否 | 付费: 否

答案:

They are most commonly used declarations for implying restrictive factors which let to take decisions under specific program conditions. They are also used for improving program readability. They are also used for giving names to conditions which is why they are also known as “Condition Names”.

它们是最常用的声明,用于暗示限制因素,这些因素允许在特定程序条件下做出决策。它们也用于提高程序的可读性。它们还用于给条件命名,这就是为什么它们也被称为“条件名”。

134. Define DRDA.

定义 DRDA。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f73 | 官方: 否 | 付费: 否

答案:

DRDA represents Distributed Relational Database Architecture that behaves as a connection protocol meant for processing of local database. This is mainly used by vendors such as IBM. The architecture consists of rules that aid in the communication of applications and databases.

DRDA 代表分布式关系数据库架构,它作为一种连接协议,用于处理本地数据库。这主要由 IBM 等供应商使用。该架构包含有助于应用程序和数据库通信的规则。

135. What do you understand by self-referencing constraints?

你如何理解自引用约束?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f77 | 官方: 否 | 付费: 否

答案:

Self-referencing constraints are used for restricting changes that can be possibly made to a primary key using a foreign key. For achieving this, the foreign keys need to define the DELETE-CASCADE rule which states that in case the relationship for DELETE rule is defined as CASCADE, if one row is changed or deleted, then other rows in the table are recursively deleted.

自引用约束用于限制可能通过外键对主键进行的更改。为了实现这一点,外键需要定义 DELETE-CASCADE 规则,该规则规定,如果 DELETE 规则的关系被定义为 CASCADE,那么当一行被更改或删除时,表中的其他行会被递归删除。

136. What is a spool?

什么是 spool?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f80 | 官方: 否 | 付费: 否

答案:

Spool stands for Simultaneous Peripheral Operations On-Line which is used as buffering mechanism where data would be stored temporarily, processed and executed later.

Spool 代表同时外围操作在线,它用作缓冲机制,数据会暂时存储,稍后处理和执行。
  • Data Science
  • All Events
  • My Events

137. Differentiate between SEARCH and SEARCH ALL.

区分 SEARCH 和 SEARCH ALL。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f83 | 官方: 否 | 付费: 否

答案:

SEARCH and SEARCH ALL is used for finding if a record is present in a table or not.

SEARCH 和 SEARCH ALL 用于查找记录是否存在于表中。
SEARCHSEARCH ALL
Uses linear search for finding record(s) in the table. This is also called a sequential search.
使用线性搜索在表中查找记录。这也称为顺序搜索。
Uses Binary Search for finding record(s) in the table.
使用二分搜索在表中查找记录。
Here, the table does not require data to be available in sorted order.
此处,表不需要数据按排序顺序可用。
Here, the data in the table needs to be present in sorted order (either ascending or descending).
此处,表中的数据需要以排序顺序存在(升序或降序)。
The syntax for SEARCH is: SEARCH TABLE-NAME [VARYING {identifier1/index1}] [AT END Statement] {WHEN ConditionPasses {statement/NEXT SENTENCE/CONTINUE} … } END-SEARCH.
SEARCH 的语法是: SEARCH TABLE-NAME [VARYING {identifier1/index1}] [AT END Statement] {WHEN ConditionPasses {statement/NEXT SENTENCE/CONTINUE} … } END-SEARCH。
The syntax for SEARCH ALL is: SEARCH ALL TABLE-NAME [AT END Statement] {WHEN ConditionPasses {statement/NEXT SENTENCE/CONTINUE} … } END-SEARCH.
SEARCH ALL 的语法是:SEARCH ALL TABLE-NAME [AT END Statement] {WHEN ConditionPasses {statement/NEXT SENTENCE/CONTINUE} … } END-SEARCH。

138. Define COPYBOOK in COBOL.

在 COBOL 中定义 COPYBOOK。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f88 | 官方: 否 | 付费: 否

答案:

COPYBOOK is used for storing the record format whose design can be used by another program too. One COPYBOOK can be used for multiple documents or programs by using REPLACING choice in case the formats are the same.

COPYBOOK用于存储记录格式,其设计也可供其他程序使用。若格式相同,一个COPYBOOK可通过REPLACING选项用于多个文档或程序。

139. What is index cardinality in DB2?

什么是DB2中的索引基数?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f8b | 官方: 否 | 付费: 否

答案:

Index cardinality represents the number of discrete values or entries in a table column. DB2 has a utility called RUNSTATS which is used for examining column entry redundancy for finding whether an index scan is needed to search the data.

索引基数表示表列中离散值或条目的数量。DB2有一个名为RUNSTATS的工具,用于检查列条目冗余性,以判断是否需要索引扫描来搜索数据。

140. What is the importance of DBCTL?

DBCTL的重要性是什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f8e | 官方: 否 | 付费: 否

答案:

DBCTL stands for Database Control and is an address space and is used for accessing IMS (Information Management System) files for CICS (Customer Information Control System) transactions. It is used to access IMS files for CICS Transactions and it is address space. For more information, you can refer here .

DBCTL代表数据库控制,是一个地址空间,用于访问CICS事务的IMS(信息管理系统)文件。它用于访问CICS事务的IMS文件,并且是地址空间。如需更多信息,可在此处参考。

141. Define UPDATE cursor.

定义UPDATE游标。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f91 | 官方: 否 | 付费: 否

答案:

UPDATE cursor is a pointer that permits us to modify or delete the current recently fetched row. UPDATE Keyword lets the information server know that the instruction would modify or delete any row it fetches from the database.

UPDATE游标是一种指针,允许我们修改或删除当前最近获取的行。UPDATE关键字告知信息服务器,指令将修改或删除其从数据库获取的任何行。

142. What are Mainframe computers?

什么是大型机计算机?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f95 | 官方: 否 | 付费: 否

答案:

Mainframe computers are a combination of different processors and RAM (memory). They work as a CPU for multiple workstations and terminals associated with it. They are used for performing huge data operations of the range of petabytes which would allow processing requests for thousands of users. The term ‘Mainframe’ represents a frame to hold main memory and multiple processors. These computers are used for processing requests in real-time in e-commerce, banking, education. government and various other applications. The following diagram represents the view of the Mainframe system.

大型机计算机是不同处理器和RAM(内存)的组合。它们作为多个关联工作站和终端的CPU工作。它们用于执行高达PB级别的海量数据操作,可处理数千用户的请求。"Mainframe"一词表示容纳主内存和多个处理器的框架。这些计算机用于电子商务、银行、教育、政府等各类应用中的实时请求处理。下图展示了大型机系统的视图。

143. Define JCL.

定义JCL。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f98 | 官方: 否 | 付费: 否

答案:

JCL expands to Job Control Language and is a scripting language that is used for providing required specifications for processing a job. It consists of a set of control statements and acts as an interface between the IBM Mainframe Operating System and COBOL programs. JCL statements also do the task of notifying the OS for finding required input data and provide instructions on what operations need to be performed on that input and what needs to be done with the result.

JCL扩展为作业控制语言,是一种脚本语言,用于提供处理作业所需的规格说明。它由一组控制语句组成,并充当IBM大型机操作系统与COBOL程序之间的接口。JCL语句还负责通知操作系统查找所需输入数据,并指示对该输入需要执行哪些操作以及如何处理结果。

Successful Tech Career for FREE!

免费开启成功的科技职业生涯!

Successful Tech Career!

成功的技术职业生涯!

Interview Process

面试流程

CTC & Designation

CTC与职位级别

Projects on the Job

工作项目

Referral System

推荐系统

Try It Out

试试看

2 Lakh+ Roadmaps Created

已生成20万+职业规划

144. What are the types of JCL statements available for running a job?

运行作业可用的JCL语句类型有哪些?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3f9b | 官方: 否 | 付费: 否

答案:

There are majorly 3 types of JCL statements: - The first type consists of statements meant for identifying units of work that are to be performed by the Operating System.

JCL语句主要有3种类型:- 第一种类型包括用于标识操作系统要执行的工作单元的语句。
  • The second type of statement is the EXEC statement which depends on the number of steps involved in running a job.
  • The third type of statements are called DD (Data Definition) statements that are meant for identifying input and output data sets.

145. What is COMP SYNC?

什么是COMP SYNC?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fa2 | 官方: 否 | 付费: 否

答案:

SYNC is a Keyword in COBOL used for aligning the storage area (data) to a word boundary that represents any address that is multiple of 4. This is done to ensure computations are efficient when data is read from word boundary by the Mainframe server.

SYNC是COBOL中的一个关键字,用于将存储区(数据)对齐到字边界,该边界表示任何4的倍数地址。这样做是为了确保当大型机服务器从字边界读取数据时,计算更高效。

146. How are static and dynamic linking achieved?

静态和动态链接是如何实现的?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fa5 | 官方: 否 | 付费: 否

答案:

  • Static linking requires a calling program to call the subroutine links.
  • In dynamic linking, the calling program and the subroutine links can exist as different modules.
  • Both types of linking can be done by choosing either NODYNAM or DYNAM link edit options.

147. How are global and external variables different from each other?

全局变量和外部变量彼此有何不同?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fa8 | 官方: 否 | 付费: 否

答案:

Global variables are those variables that are available only to batch programs whereas external variables are those variables that are accessible by any batch programs in the same system library.

全局变量是仅对批处理程序可用的变量,而外部变量是同一系统库中任何批处理程序都可访问的变量。

148. What are the different types of conditional statements present in COBOL?

COBOL中存在哪些不同类型的条件语句?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fab | 官方: 否 | 付费: 否

答案:

Conditional statements are used for changing the flow of execution based on conditions specified. The conditions always must evaluate as true or false. Following are the different types of conditional statements: - IF Condition

条件语句用于根据指定的条件改变执行流程。条件必须始终评估为真或假。以下是不同类型的条件语句:- IF条件
  • Relation Condition
  • Class Condition
  • Sign Condition
  • Negated Condition
  • Condition-Name Condition
  • Combined Condition.

149. What is VSAM?

什么是VSAM?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9538 | 官方: 否 | 付费: 否

答案:

VSAM (Virtual Storage Access Method) is both a dataset type and an access method for managing various types of datasets. When used as an access method, VSAM offers greater functionality with greater performance and flexibility than other disk access methods. In VSAM, records are maintained in a unique format that is not understandable by other methods. VSAM organizes data as files on Mainframe computers. This is one of the most common high-performance file access methods used in different versions of operating systems such as MVS, z/OS, and OS/390. With VSAM, enterprises can organize records in a file in physical order (the order they were entered) or logical order using a key (for example, the employee ID number) or based on their relative record numbers on DASD (Direct Access Storage Device). Record lengths can be fixed or variable in VSAM.

VSAM(虚拟存储访问方法)既是一种数据集类型,也是一种用于管理各种数据集类型的访问方法。当用作访问方法时,VSAM比其他磁盘访问方法提供更强的功能、更高的性能和灵活性。在VSAM中,记录以其他方法无法理解的独特格式维护。VSAM在大型机上将数据组织为文件。这是在MVS、z/OS和OS/390等不同操作系统版本中使用的最常见的高性能文件访问方法之一。借助VSAM,企业可以按物理顺序(条目输入的顺序)、使用键(例如,员工ID号)的逻辑顺序或基于DASD(直接访问存储设备)上的相对记录号来组织文件中的记录。VSAM中的记录长度可以是固定或可变的。

150. What is the procedure for converting a flat file to VSAM file?

将平面文件转换为VSAM文件的步骤是什么?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc953b | 官方: 否 | 付费: 否

答案:

In order to convert flat files into VSAM, follow the steps below: - Step1: Decide what is going to be your primary key. Alternatively, you can use the entire record as your primary key.

为了将平面文件转换为VSAM,请遵循以下步骤:- 步骤1:确定你的主键将是什么。或者,你可以使用整个记录作为主键。
  • Step2: Sort the file by the primary key, or the entire record if no primary key is specified. Drop duplicates using a SORT statement.
  • Step3: Next, you must run a JCL command (IDCAMS - Define Cluster) with step-2 results/output (sorting mechanisms) as input.
  • Step4: Finally, to load the flat file into VSAM, use the IDCAMS REPRO command.

151. Can an empty VSAM file be used as input to a Cobol program?

空的VSAM文件可以作为输入用于COBOL程序吗?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: coding
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9540 | 官方: 否 | 付费: 否

答案:

A VSAM file that contains no records or an empty VSAM file cannot be opened for the purpose of being used as an input to the COBOL program. Users will no longer be able to access them. Rather, an empty file may be opened for output purposes. COBOL writes a dummy record into the file and deletes it once the user opens it.

不包含记录或为空的VSAM文件不能开放以用作COBOL程序的输入。用户将无法再访问它们。相反,空文件可以打开用于输出目的。COBOL会向文件中写入一条虚拟记录,并在用户打开后将其删除。

152. What is shareopts?

什么是shareopts?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9545 | 官方: 否 | 付费: 否

答案:

VSAM Share Options determine how users can access VSAM datasets. By using these options, different users/jobs can be granted different levels of access to a single VSAM dataset. As part of the DEFINE statement, the SHAREOPTS parameter is written as SHAREOPTS (a,b). Here, a represents the cross-region share option, which indicates how two or more users/jobs on the same MVS system can share a file, and b represents the cross-system share option, which indicates how two or more users/jobs on different MVS systems can share a file. In most cases, this value is SHAREOPTS(2 3).

VSAM共享选项确定用户如何访问VSAM数据集。通过使用这些选项,不同的用户/作业可以被授予对单个VSAM数据集的不同访问级别。作为DEFINE语句的一部分,SHAREOPTS参数写为SHAREOPTS(a,b)。这里,a表示跨区域共享选项,指示同一MVS系统上两个或更多用户/作业如何共享文件,而b表示跨系统共享选项,指示不同MVS系统上两个或更多用户/作业如何共享文件。在大多数情况下,此值为SHAREOPTS(2 3)。

If the cross-region value is 2, multiple users can simultaneously process the file provided that only one of them is an updater. The value 3 for the cross-system indicates the file can be processed by any number of jobs/users (VSAM does not ensure integrity).

如果跨区域值为2,多个用户可以同时处理该文件,前提是其中只有一个是更新者。跨系统值3表示该文件可以由任意数量的作业/用户处理(VSAM不保证完整性)。

153. When should you select a VSAM file over a normal Sequential file?

何时应选择VSAM文件而不是普通的顺序文件?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9548 | 官方: 否 | 付费: 否

答案:

There are a number of scenarios in which a VSAM file would be preferred over a Sequential file. Here are a few: - When performing multiple operations on a file based on a specific key value.

在许多场景下,VSAM文件会优于顺序文件。以下是几个例子:- 当基于特定键值对文件执行多个操作时。
  • When performing multiple operations on a file, such as updating a specific record or removing files.
  • Whenever you need a file whose contents will need to be modified (update, delete, insert records) frequently.
  • Where multiple operations are required like different ways of accessing records either sequentially, with a key, or dynamically.

154. State difference between VSAM and Non-VSAM Files.

说明VSAM与非VSAM文件之间的区别。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc954b | 官方: 否 | 付费: 否

答案:

VSAM (Virtual Storage Access Method) and Non-VSAM files differ in the following ways:

VSAM(虚拟存储访问方法)文件和非VSAM文件在以下方面存在差异:
VSAM Files
VSAM文件
Non-VSAM Files
非VSAM文件
The utility is required to create, edit, or delete VSAM files.
需要实用程序来创建、编辑或删除VSAM文件。
The ISPF facility can be used to create, edit, or delete non-VSAM files.
可以使用ISPF工具来创建、编辑或删除非VSAM文件。
Supports data stored on a disk and cannot handle data stored on other devices like tapes.
支持存储在磁盘上的数据,不能处理存储在磁带等其他设备上的数据。
Both disks and tapes can be used to store files.
磁盘和磁带均可用于存储文件。
A VSAM file can be an KSDS, ESDS, LDS, or RRD.
VSAM文件可以是KSDS、ESDS、LDS或RRD。
Non-VSAM files can be BSAM files, flat files, QSAM files, sequential files, etc.
非VSAM文件可以是BSAM文件、平面文件、QSAM文件、顺序文件等。
A well-organized index facilitates fast data retrieval.
组织良好的索引有助于快速数据检索。
Data retrieval is slow due to the unorganized index.
由于索引未组织,数据检索速度较慢。
Data retrieval can be sequential, linear, dynamic, or random.
数据检索可以是顺序、线性、动态或随机的。
Only sequential data retrieval is supported.
仅支持顺序数据检索。
The index and alternate index are supported.
支持索引和替代索引。
There is no index support.
不支持索引。
It is possible to share datasets across regions and systems.
可以在区域和系统之间共享数据集。
Datasets are locally stored.
数据集存储在本地。

155. Can you tell me how often you refresh your VSAM file and how you did it?

你能告诉我你多久刷新一次VSAM文件以及你是如何刷新的吗?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc954e | 官方: 否 | 付费: 否

答案:

You can refresh the VSAM file once a day, every week, or every month, however, you prefer. Refreshing is the same as deleting/defining the VSAM file. - Step 1: Delete existing/current VSAM file

你可以根据偏好每天、每周或每月刷新一次VSAM文件。刷新等同于删除/定义VSAM文件。- 步骤1:删除现有/当前的VSAM文件
IF LASTCC =8 ; SET MAXCC=0 - Step 2: Create a new VSAM File
如果LASTCC =8;设置MAXCC=0 - 步骤2:创建新的VSAM文件
DEFINE VSAM-FILE_NAME (COND=(0,LT,STEP1)
定义VSAM-文件名(条件=(0,LT,步骤1)

Whenever you try to delete a file that doesn't exist, you get a return code of 8. The command VERIFY can be used in TSO Prompt to verify that the file exists.

每当你尝试删除不存在的文件时,你会收到返回代码8。命令VERIFY可用于TSO提示中,以验证文件是否存在。

156. Explain Freespace.

解释空闲空间。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9551 | 官方: 否 | 付费: 否

答案:

"Freespace" is an important parameter in "Define cluster." In this parameter, we specify the percentage of freespace (available storage) that will be reserved for the CI (control intervals) and CA (control areas) of the data component. The default value is 0 per cent.

“空闲空间”是“定义集群”中的一个重要参数。在此参数中,我们指定将为数据组件的CI(控制间隔)和CA(控制区域)保留的空闲空间(可用存储)百分比。默认值为0%。

Syntax:

语法:

FREESPACE (CI-percent, CA-percent)

空闲空间(CI百分比,CA百分比)

157. How are records stored in ESDS files?

记录在ESDS文件中是如何存储的?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9554 | 官方: 否 | 付费: 否

答案:

ESDS files store records in the order they were added to the dataset. The records are referenced by their physical address, also known as RBA (Relative Byte Address). Assuming we have 60 bytes per record in an ESDS dataset, then RBA of the 1st record would be 0, RBA of the 2nd record would be 60, RBA of the 3rd record would be 120, and so on. RBA allows for sequential access to records, known as addressed access. The data is stored in the order in which it was entered. New records are added at the end. Records cannot be deleted from the ESDS dataset, but they may be marked as inactive. ESDS dataset records can be of variable or fixed length.

ESDS文件按记录添加到数据集的顺序存储记录。记录通过其物理地址引用,也称为RBA(相对字节地址)。假设ESDS数据集中每条记录为60字节,则第一条记录的RBA为0,第二条记录的RBA为60,第三条记录的RBA为120,以此类推。RBA允许对记录进行顺序访问,称为寻址访问。数据按输入顺序存储。新记录添加到末尾。ESDS数据集中的记录不能删除,但可以标记为不活动。ESDS数据集记录可以是可变长度或固定长度。

158. State difference between QSAM files and ESDS files.

说明QSAM文件和ESDS文件之间的区别。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9557 | 官方: 否 | 付费: 否

答案:

Both QSAM and ESDS files store records in sequential order, i.e., according to the entry order. However, they differ in several ways:

QSAM和ESDS文件都按顺序存储记录,即按输入顺序。然而,它们在多方面存在差异:
QSAM Files
QSAM文件
ESDS Files
ESDS文件
Creating these files on tape is possible.
可以在磁带上创建这些文件。
ESDS files cannot be created on tape.
ESDS文件不能在磁带上创建。
QSAM files cannot have ALTINDEX (Alternate Index).
QSAM文件不能有ALTINDEX(替代索引)。
ESDS files can have ALTINDEX (Alternate Index).
ESDS文件可以有ALTINDEX(替代索引)。

159. What are a few of the VSAM File status codes?

VSAM文件状态代码有哪些?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc955a | 官方: 否 | 付费: 否

答案:

Listed below are the common file status codes: - 00: The operation was successful.

以下是常见的文件状态代码:- 00:操作成功。
  • 04: Fixed length record was invalid.
  • 20: The key for KSDS or RRDS is invalid.
  • 22: Duplicate primary key found.
  • 23: Error locating the record or file.
  • 30: Permanent I/O fault.
  • 38: Attempting to open a locked file.
  • 91: Invalid password or authorization.
  • 93: Resources are unavailable.
  • 95: Invalid or incomplete file information.
  • 98: File Locked- Failed to open the file.
  • 99: Record Locked - Failed to access record, etc.

160. Can you explain the file status in VSAM?

你能解释一下VSAM中的文件状态吗?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc955d | 官方: 否 | 付费: 否

答案:

As you work with VSAM datasets, you may encounter abends during the process. You can find the status of a VSAM file by its VSAM file status code. VSAM files need to have at least one data record loaded into them before they can be opened for input or updating.

在处理VSAM数据集时,你可能会在过程中遇到异常终止。你可以通过VSAM文件状态代码来查找VSAM文件的状态。VSAM文件在可以打开进行输入或更新之前,需要至少有一条数据记录加载到其中。

161. What are the various types of VSAM files?

VSAM文件有哪些类型?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9560 | 官方: 否 | 付费: 否

答案:

VSAM data sets can be classified into the following types: - RRDS (Relative-record data set): It contains records ordered by relative record number and is accessible via this number. In RRDS datasets, records are stored in slots of a fixed length.

VSAM数据集可以分为以下类型:- RRDS(相对记录数据集):它包含按相对记录号排序的记录,并可通过此编号访问。在RRDS数据集中,记录存储在固定长度的槽中。
  • ESDS (Entry-sequenced data set): It contains records in the order of entry or in sequential order and is accessible only via relative byte addresses. ESDSs are similar to sequential data sets. Records in ESDS datasets can have variable or fixed lengths.
  • KSDS (Key-sequenced data set): It contains records ordered by key field and is accessible via key-value or relative byte address. Records in KSDS dataset can be of fixed length or variable length.
  • LDS (Linear data set): It is composed of an unstructured data set whose Control Interval (CI) size is multiple of 4K.

162. What is VSAM Dataset?

什么是VSAM数据集?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9563 | 官方: 否 | 付费: 否

答案:

In contrast to non-VSAM data sets, VSAM data sets are formatted differently. The VSAM data sets consist of collections of records that are grouped into CI (control intervals). VSAM stores its records within the control interval, which is a fixed portion of storage space. The maximum length of a VSAM record is 1 cylinder. In VSAM, records are arranged according to the index key, the relative record number or the relative byte address.

与非VSAM数据集相比,VSAM数据集的格式有所不同。VSAM数据集由记录集合组成,这些记录分组到CI(控制区间)中。VSAM将其记录存储在控制区间内,控制区间是存储空间的固定部分。VSAM记录的最大长度为1个柱面。在VSAM中,记录根据索引键、相对记录号或相对字节地址进行排列。

163. What types of objects are contained in VSAM files?

VSAM文件中包含哪些类型的对象?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9567 | 官方: 否 | 付费: 否

答案:

Each file in VSAM has two objects, each of which defines its storage system. - File object: It represents a single file. File methods such as Read, Delete, Rewrite, Write, Unlock, and StartBr can be utilized to perform these actions.

VSAM中的每个文件都有两个对象,每个对象定义其存储系统。- 文件对象:它代表一个单一文件。可以使用文件方法(如Read、Delete、Rewrite、Write、Unlock和StartBr)来执行这些操作。
  • FileBrowse object: This object represents browse operations done on a file. It involves Enable, ReadNext, ResetBr, and ReadPrv methods, and these are performed using IDCAMS or through TSO prompts.

164. Explain IDCAMS.

解释IDCAMS。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: easy | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc956a | 官方: 否 | 付费: 否

答案:

IDCAMS is an acronym for Integrated Data Cluster Access Method Services. VSAM datasets can be easily manipulated with IDCAMS Utility. It can be utilized for creating, deleting, and modifying VSAM datasets.

IDCAMS是Integrated Data Cluster Access Method Services(集成数据集群访问方法服务)的缩写。使用IDCAMS实用程序可以轻松操作VSAM数据集。它可用于创建、删除和修改VSAM数据集。

165. Explain how you will check the syntax of JCL without running it.

解释如何在不运行JCL的情况下检查其语法。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0e96 | 官方: 否 | 付费: 否

答案:

JCL syntax can be checked without running it by putting TYPERUN=SCAN on a job card or using JSCAN. The TYPRUN command is used to request special job processing, such as checking or scanning a job for syntax errors. SCAN checks the syntax errors without actually executing the job. Otherwise, JSCAN can also check a JCL's syntax without running it.

可以通过在作业卡上放置TYPERUN=SCAN或使用JSCAN来检查JCL语法而不运行它。TYPRUN命令用于请求特殊作业处理,如检查或扫描作业以查找语法错误。SCAN在不实际执行作业的情况下检查语法错误。否则,JSCAN也可以在不运行的情况下检查JCL的语法。

166. Does JCL support Automatic start? If yes, then explain how.

JCL是否支持自动启动?如果支持,请解释如何实现。
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: behavioral | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0e9a | 官方: 否 | 付费: 否

答案:

It is possible to restart JCL automatically through a predefined keyword parameter, such as RD (Restart definition) keyword. However, this usually results in irregular program termination. RD ("restart definition") triggers the start of the job at the checkpoint automatically. At various points of the job, checkpoints act as markers for the execution of the job. RD begins by looking for the last successful checkpoint and starts from there.

可以通过预定义的关键字参数(如RD(重启定义)关键字)自动重启JCL。然而,这通常会导致不正常的程序终止。RD("重启定义")触发作业在检查点自动启动。在作业的各个点,检查点作为作业执行的标记。RD首先查找最后一个成功的检查点,并从那里开始。

167. How do you explain the term job time-out and what can you do to overcome it?

你如何解释术语“作业超时”,以及你能采取什么措施来克服它?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0e9d | 官方: 否 | 付费: 否

答案:

When a program takes longer than the specified time limit for the particular selected class, a job timeout occurs. It is usually referred to as an "S322 abend." In this situation, the program does not complete due to circling errors.

当程序运行时间超过所选特定类别规定的时间限制时,就会发生作业超时。这通常被称为“S322异常终止”。在这种情况下,由于循环错误,程序无法完成。

The TIME parameter can be coded as TIME = 1440 if the information being handled in the program is really huge and needs more time to complete the job.

如果程序中处理的信息量非常大,需要更多时间才能完成作业,可以将TIME参数编码为TIME = 1440。

168. What does DISP=(NEW,CATLG,KEEP) mean?

DISP=(NEW,CATLG,KEEP) 是什么意思?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0ea0 | 官方: 否 | 付费: 否

答案:

DISP NEW creates a new dataset and allocates new memory. DISP CATLG is capable of cataloging the data set when the step is complete. DISP DELETE deletes the dataset if the step abends/fails.

DISP NEW 创建新的数据集并分配新内存。DISP CATLG 能够在步骤完成时对数据集进行编目。DISP DELETE 在步骤异常终止或失败时删除数据集。

169. What does DISP=(NEW,CATLG,KEEP) for a DSN mean?

对于DSN,DISP=(NEW,CATLG,KEEP) 是什么意思?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0ea3 | 官方: 否 | 付费: 否

答案:

DISP NEW creates a new dataset and allocates new memory. DISP CATLG is capable of cataloging the data set when the step is complete. A cataloged dataset can be referenced by name without the user having to specify where it is located. DISP KEEP retains the dataset. If the step abends, the catalog is not retained. The three operations are reliable and ensure the data set is handled correctly every time.

DISP NEW 创建新的数据集并分配新内存。DISP CATLG 能够在步骤完成时对数据集进行编目。编目后的数据集可以按名称引用,用户无需指定其所在位置。DISP KEEP 保留数据集。如果步骤异常终止,则不保留编目。这三种操作可靠且确保每次都能正确处理数据集。

170. If you have seven jobs to do, but you want to hold one at the same time, how can I accomplish this?

如果有七个作业要做,但想同时暂挂其中一个,该如何实现?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0ea6 | 官方: 否 | 付费: 否

答案:

Holding a job among the available ones is just a matter of following a set of predefined rules. As per JCL's predefined job rules, each job has a keyword. If TYPRUN is specified on the job statement, a job can be held for later execution. The TYPRUN holds a job with its variable name set to HOLD.

在可用作业中暂挂一个作业,只需遵循一组预定义规则即可。根据JCL的预定义作业规则,每个作业都有一个关键字。如果在作业语句上指定了TYPRUN,则可以暂挂作业以供稍后执行。TYPRUN 通过将其变量名设置为HOLD来暂挂作业。

Syntax:

语法:

TYPRUN=HOLD

TYPRUN=HOLD
Example: If you want to hold the job you want
示例:如果您想暂挂所需的作业

//JTP JOB (P007),'Aayush' TYPRUN=HOLD

//JTP JOB (P007),'Aayush' TYPRUN=HOLD

171. What is the best way to check if a file is empty in JCL?

在JCL中检查文件是否为空的Best方式是什么?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7958d557c902bb0eaa | 官方: 否 | 付费: 否

答案:

JCL allows you to identify one empty file, but you need to make sure that it is an input for IDCAMS. IDCAMS (Integrated Data Cluster Access Method Services) is a utility used for creating, modifying and deleting VSAM (Virtual Storage Access Method) datasets. When the file is input into IDCAMS, an error is thrown (return code 4 i.e., RC=4) if it's empty.

JCL允许您识别一个空文件,但您需要确保它是IDCAMS的输入。IDCAMS(集成数据集群访问方法服务)是一个用于创建、修改和删除VSAM(虚拟存储访问方法)数据集的实用程序。当文件输入到IDCAMS时,如果为空,则会抛出错误(返回代码4,即RC=4)。

Conclusion

结论
Getting your feet wet with the JCL Interview Questions is necessary if you are looking for a job related to JCL. In preparation for your interview, our team has compiled a list of relevant JCL interview questions and answers. These JCL Interview Questions are intended to help you become acquainted with the type of questions that might be asked during an interview. This will come in handy for future projects and interviews.
如果您正在寻找与JCL相关的工作,熟悉这些JCL面试问题是非常必要的。为准备面试,我们的团队整理了一份相关的JCL面试问题和答案列表。这些JCL面试问题旨在帮助您熟悉面试中可能会被问到的题型。这对未来的项目和面试都会很有用。

As an additional piece of advice, review past assignments you have done on the topic so that you are confident in your ability to speak about them. The interviewer expects you to answer basic questions if you are fresher, so you'll need to strengthen your basic concepts. Try to stay confident throughout the interview.

作为额外建议,请复习您过去在该主题上完成的作业,以便自信地谈论它们。如果您是新手,面试官会期望您回答基本问题,因此您需要巩固基础知识。在面试过程中尽量保持自信。

172. In case you have 1000 rows in the DB2 table, how will you update the column value of the first 100 records?

如果DB2表中有1000行,你将如何更新前100条记录的列值?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fde | 官方: 否 | 付费: 否

答案:

In case our DB2 table has an identity column, then we can use the indexnum as follows:

如果我们的DB2表有标识列,那么我们可以按如下方式使用索引号:

Update Table SET COLUMN_NAME=XXX where indexnum < 101

更新表 设置 列名=XXX 其中索引号<101

173. How will you define the sort file in JCL which runs the COBOL program?

你如何在运行COBOL程序的JCL中定义排序文件?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fe1 | 官方: 否 | 付费: 否

答案:

We can use SORTWK01, SORTWK02, and so on in the step. There needs to be a minimum of 3 datasets, but in general, the number of sort datasets is proportionate to the volume of a dataset that needs to be sorted.

在步骤中,我们可以使用 SORTWK01、SORTWK02 等数据集。至少需要 3 个数据集,但通常来说,排序数据集的数量与需要排序的数据集体积成正比。

174. Is it possible to redefine X(100) field with X(200)? If yes, how?

是否可以将 X(100) 字段重新定义为 X(200)?如果可以,怎么做?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fe4 | 官方: 否 | 付费: 否

答案:

Yes, it is possible by making use of REDEFINES . We need to keep in mind that redefining just ensures fields start from the same location.

是的,可以通过使用 REDEFINES 来实现。我们需要记住,重新定义仅确保字段从相同位置开始。

01 WS-TOP PIC X(100)

01 WS-TOP PIC X(100)
01 WS-TOP-DOUBLE REDEFINES WS-TOP PIC X(200)
01 WS-TOP-DOUBLE REDEFINES WS-TOP PIC X(200)

175. How will you copy data from one dataset to another dataset by using the SORT card?

您如何使用 SORT 卡片将数据从一个数据集复制到另一个数据集?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fe7 | 官方: 否 | 付费: 否

答案:

We can mention SYSIN and SYSOUT dataset names in the SORT step. Additionally, we need to mention SORT FIELDS = COPY in the sort card to copy data from one dataset to another.

我们可以在 SORT 步骤中提及 SYSIN 和 SYSOUT 数据集名称。此外,我们需要在排序卡片中提及 SORT FIELDS = COPY,以将数据从一个数据集复制到另一个数据集。

176. How will you inform other users about job completion?

您如何告知其他用户作业完成情况?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fea | 官方: 否 | 付费: 否

答案:

We can make use of NOTIFY statement which notifies the user about job completion along with the return code.

我们可以使用 NOTIFY 语句,它会连同返回码一起通知用户作业完成情况。

NOTIFY = userid to whom status needs to be notified

NOTIFY = 需要通知状态的用户标识
It has to be noted that the job log of the spool would contain information under the job submitter’s id.
需要注意的是,spool 中的作业日志将包含在作业提交者标识下的信息。

177. How will you achieve auto restart when the job abends?

当作业异常终止时,您如何实现自动重启?
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: behavioral | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3ff0 | 官方: 否 | 付费: 否

答案:

We can make use of the RD parameter in JOB/EXEC statement by specifying for what abend codes RESTART needs to be performed in the SCHEDxx member of parmlib library of the IBM system.

我们可以在 JOB/EXEC 语句中使用 RD 参数,通过指定 IBM 系统的 parmlib 库的 SCHEDxx 成员中需要执行 RESTART 的异常终止码来实现。

178. How will you check if a file is empty in JCL?

在 JCL 中,您如何检查文件是否为空?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: medium | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3ffa | 官方: 否 | 付费: 否

答案:

In case the file is empty and is used as input in IDCAMS, then the job completes with return code 4. By verifying this return code, we can identify that the file is empty.

如果文件为空并用作 IDCAMS 的输入,则作业以返回码 4 完成。通过验证此返回码,我们可以识别文件为空。

179. If we perform CHGPF, is there a chance that LEVEL CHECK ERROR will occur?

如果我们执行CHGPF,是否有可能发生LEVEL CHECK ERROR?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99547 | 官方: 否 | 付费: 否

答案:

The value that we have given the LVLCHK (Record format level check) attribute will determine whether or not this is the case. If its value is YES, then the record format level identifier will be checked every time the file is opened, and an error will be created if there is a mismatch between the two. If its value is NOT YES, then the record format level identifier will not be checked. In the event that its value is *NO, the record format level identifier does not go through validation; as a consequence, there is no error.

我们为LVLCHK(记录格式级别检查)属性赋予的值将决定是否如此。如果其值为YES,则每次打开文件时都会检查记录格式级别标识符,如果两者不匹配则会生成错误。如果其值不是YES,则不会检查记录格式级别标识符。如果其值为*NO,则记录格式级别标识符不经过验证;因此,不会产生错误。

180. In what ways exactly is the utilization of RGZPFM beneficial?

使用RGZPFM的益处具体体现在哪些方面?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9954a | 官方: 否 | 付费: 否

答案:

The RGZPFM technique is often utilized by our team if there is a need to recycle previously deleted data in a file for usage in subsequent insert processes. When adding information to a file, it is done so in a specific order that has been set beforehand. If we delete some entries in the middle of other entries, the open spaces that are created as a result won't be used to make way for new records because there won't be enough room. Because of this, the amount of space used up by records that have been deleted keeps growing, and we won't be able to use these records until we use the RGZPFM command to reorganize the storage space that is currently accessible. As soon as we delete the records, the file will be reorganized, and this will cause the record numbers of the remaining records to shift relative to one another. Let's imagine that the bulk of the programs use a particular file since the value of its key is the most common one. If we want to alter the access path of this file from sequential to key, or if we want to change the key value from one to another, we can utilize GZPFM. This will allow us to do either of those things.

如果在后续插入过程中需要回收文件中先前删除的数据以供使用,我们的团队通常会采用RGZPFM技术。向文件添加信息时,会按照预先设定的特定顺序进行。如果在其他条目中间删除了一些条目,由此产生的空白空间不会用于容纳新记录,因为空间不足。因此,被删除记录所占用的空间持续增长,并且在我们使用RGZPFM命令重组当前可用的存储空间之前,无法使用这些记录。一旦我们删除记录,文件将被重组,这将导致剩余记录的记录号相对彼此发生偏移。假设大部分程序使用某个特定文件,因为其键值是常见的值。如果我们想将该文件的访问路径从顺序改为键控,或者想将键值从一个更改为另一个,我们可以利用RGZPFM。这将使我们能够实现其中任何一种更改。

181. What is DYNSLT?

什么是DYNSLT?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9954d | 官方: 否 | 付费: 否

答案:

  • The use of this file-level keyword specifies that the file's selection and omission checks (provided with select/omit specifications) will be performed at runtime. In contrast to the select/omit that is normally associated with access paths, the dynamic variety is indicated by this keyword.
  • You can't save information in anything other than a physical file. All that's in a logical file are references to other locations in the file or to subsets of data that need to be processed in a certain order.
  • To prevent data loss when a record is added, modified, or deleted from a physical file, the system places a lock on the file and then checks and updates any associated logical files. While the time spent doing this is negligible in and of itself, it can add up if a large number of edits need to be made to a file at once.
  • The aforementioned steps are not required during record updates when using the Select/Omit feature of your DDS in conjunction with DYNSLT.
  • This is helpful if your criteria for selecting records encompasses nearly all of those in the file. Now, instead of performing all the necessary upkeep before processing, DYNSLT will read all the entries in the file and choose which ones to process at the time of processing.

182. In AS400, how useful is JDFTVAL?

在AS400中,JDFTVAL有多大用处?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99550 | 官方: 否 | 付费: 否

答案:

If you use this term at the file level, the system will supply default values for all of the fields in the event that a join to a secondary file does not return any entries. If this keyword is not supplied, a record in the primary file will be skipped over in the secondary file if there is no equivalent record in that primary file record.

如果在文件级别使用此术语,当与次要文件的连接未返回任何条目时,系统将为主要文件的所有字段提供默认值。如果未提供此关键字,在主要文件中找不到对应记录的次要文件中的记录将被跳过。

183. What are the Key Differences Between the CRTDUPOBJ and COPYF File Formats?

CRTDUPOBJ和COPYF文件格式之间的主要区别是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99553 | 官方: 否 | 付费: 否

答案:

When using CRTDUPOBJ to generate a duplicate file, if the original file was logical, the new file will be logical as well. There will be no differences whatsoever, not even in the identifier for the record format. Comparatively, if we use COPYF to duplicate a logical file, the result will be a physical file, not a logical one.

使用CRTDUPOBJ生成重复文件时,如果原文件是逻辑文件,则新文件也将是逻辑文件。不会存在任何差异,甚至记录格式标识符也不会不同。相比之下,如果我们使用COPYF复制逻辑文件,结果将是物理文件,而不是逻辑文件。

184. In AS400, what exactly is an access path?

在AS400中,什么是访问路径?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99556 | 官方: 否 | 付费: 否

答案:

The 'access path' is a description of the sequence in which the records are to be read. Access pathways can be stored on the system in either a temporary or permanent manner (as a physical or logical file, for example). It's possible for the OPNQRYF command to generate a temporary access path, put it to use just once, and then throw it away afterwards.

“访问路径”描述了记录被读取的顺序。访问路径可以以临时或永久方式存储在系统上(例如,作为物理或逻辑文件)。OPNQRYF命令可以生成临时访问路径,仅使用一次,然后将其丢弃。

185. In AS400, what is a program status data structure (PSDS)? Provide an illustration of PSDS.

在AS400中,什么是程序状态数据结构(PSDS)?请提供一个PSDS的示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b99559 | 官方: 否 | 付费: 否

答案:

It is possible to set up a programme status data structure (PSDS) that will make exception and error information easily accessible to the programme to guarantee that the correct action will be performed in the event that an unhandled exception occurs. Some instances of probable exceptions include a date, time, or timestamp value that is invalid; division by zero; and an array index that is outside of its allowed range. Because it has to be defined in the module's main source file, there is only ever one PSDS associated with each module.

可以建立一个程序状态数据结构(PSDS),使异常和错误信息易于程序访问,以确保在发生未处理异常时执行正确的操作。一些可能的异常实例包括无效的日期、时间或时间戳值;除以零;以及超出允许范围的数组索引。由于它必须在模块的主源文件中定义,因此每个模块只关联一个PSDS。

186. What is keeping a journal? What does an example of journaling look like?

什么是日志记录?日志记录的一个示例是什么样的?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9955c | 官方: 否 | 付费: 否

答案:

Keeping a record of one's activities and events is the most general definition of the practice of journaling. When discussing the iSeries, "journaling" refers to the process of recording the activities carried out by various items. The practice of documenting activities made in connection to actual files in an iSeries journal is considered standard operating procedure. Keeping a record of the times a file has been opened, closed, or had new data added to or altered within it is what is meant by the term "journaling" a file.

记录个人活动和事件是日志记录实践最普遍的定义。在讨论iSeries时,“日志记录”指的是记录各种项目所执行活动的过程。在iSeries日志中记录与实际文件相关的活动被视为标准操作程序。记录文件被打开、关闭、添加新数据或内部数据被修改的次数,就是“日志记录”文件的含义。

187. What are the terms ASSUME, OVERLAY, and KEEP in as400? Give an example of how to employ the prepositions assume, overlay, and keep.

在AS400中,ASSUME、OVERLAY和KEEP这些术语是什么意思?给出一个如何使用assume、overlay和keep这些介词(关键字)的示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9955f | 官方: 否 | 付费: 否

答案:

By letting the OS/400 code know that it should display this record automatically whenever the file is opened, we are able to instruct it to do so on its own. If we want to, we are able to carry out this activity. When you use this word, you will be able to retrieve information that was displayed on the screen while another programme was operating in the background. If this phrase is not present in the file, then the screen of the old file will be empty when we switch to the new file.

通过让OS/400代码知道每当文件打开时就自动显示该记录,我们能够指示它自行执行此操作。如果我们愿意,可以执行此活动。使用此关键字时,您将能够检索在另一个程序后台运行时屏幕上显示的信息。如果文件中没有此短语,那么当我们切换到新文件时,旧文件的屏幕将是空的。

By making use of the term overlay in conjunction with the keyword ASSUME, we will be able to circumvent this issue. You are able to add fields on top of this record by utilizing the OVERLAY keyword, and doing so will not remove the entire view from your database. It is displayed on the screen that the ASSUME flag has been set on a screen format that the computer is expected to replicate and that format. Documents with windowed user interfaces are the typical beneficiaries of this format's application. It substitutes a fictitious format for the genuine one that does not have a window for the real one that is being used for placement.

通过将术语overlay与关键字ASSUME结合使用,我们将能够规避此问题。您可以利用OVERLAY关键字在此记录上添加字段,这样做不会从数据库中移除整个视图。屏幕上显示ASSUME标志已设置在计算机预期复制的屏幕格式上,并且该格式被显示。带有窗口化用户界面的文档通常是此格式应用的典型受益者。它用一个虚拟格式替换了没有窗口的真实格式,用于放置实际内容。

We need to stop it from being deleted if we don't want the display to be lost when the display file is closed. When switching back to the previous display file, there won't be any unpleasant flickering like there was before. For example, the screen flickers if we press F4 on the primary screen to bring up a window and then click back to the main screen to return to the primary screen. Because we want to stop this from happening, we employ the term "KEEP."

如果我们不想在显示文件关闭时丢失显示内容,就需要阻止它被删除。切换回之前的显示文件时,将不会有之前那种令人不快的闪烁。例如,如果我们在主屏幕上按F4弹出窗口,然后点击返回主屏幕回到主屏幕,屏幕会闪烁。因为我们想阻止这种情况发生,所以我们使用术语“KEEP”。

188. Explain the terms SFLDROP, SFLFOLD, and SFLMODE that are used in display files? Please give an example of this.

解释显示文件中使用的术语SFLDROP、SFLFOLD和SFLMODE?请给出一个示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99562 | 官方: 否 | 付费: 否

答案:

  • SFLDROP: This keyword, when used at the record level, allows the subfile to be displayed with its records truncated so that they may all fit on a single line. This occurs when the keyword is applied at the record level. We assign a CA (command attention) or CF (command function) key, depending on the type of manipulation we want to perform on the abbreviated and folded behavior of the subfile. The display will switch from its typical truncated state to its folded mode whenever the user presses the function key on the keyboard. The user has the ability to switch between the truncated and folded forms at any time by simply hitting the CF or CA key. Both SFLMODE and SFLFOLD are considered to be related keywords.
  • SFLFOLD: When this keyword is used at the record level, the subfile will be shown in a folded manner as a default setting. We assign a CA (command attention) or CF (command function) key, depending on the type of manipulation we want to perform on the abbreviated and folded behavior of the subfile. However, the user has the ability to convert to the truncated mode by pressing the function key. The folded mode is the default setting. Simply pressing either the CF or CA key (depending on which form you want to use) allows the user to switch between the folded and truncated versions. It is part of a popular search query that also includes the terms SFLMODE and SFLDROP.
  • SFLMODE: If you use this keyword at the record level, you will be able to tell the system whether the subfile should be folded or truncated when it is presented. This keyword has a parameter that is a hidden variable, and changing the value of that variable gives us the ability to change the way the subfile behaves. The user is able to switch between the truncated and folded forms by simply pressing the CF or CA key on their keyboard. The abbreviated form will be displayed in the default mode of presentation. It's one of the components of a common search query, along with SFLDROP and SFLFOLD.

189. What does the abbreviation SFLNXTCHG mean when it's used in the display file? In order to better understand SFLNXTCHG, could you please provide an example?

在显示文件中,缩写SFLNXTCHG是什么意思?为了更好地理解SFLNXTCHG,您能提供一个示例吗?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99565 | 官方: 否 | 付费: 否

答案:

This keyword is quite useful when applied to a subfile that can be edited in some way. After locating the entries in the subfile that require validation with the help of REACDC, we will next utilize READC once more to process the data obtained from those records after ensuring that they are accurate.

此关键字应用于可以以某种方式编辑的子文件时非常有用。在借助REACDC找到子文件中需要验证的记录后,我们将再次使用READC处理这些记录获取的数据,前提是确认它们是准确的。

Unfortunately, there is just a small chance of success when using READC multiple times on the same data. Because the MDT (modified data tag) is triggered by the first READC operation that is issued on the record, the second READC action that is issued on the same record will fail. If a processing option is selected that alters specific records, READC will show you which records are affected. Because the MDT flag is going to be disabled, the records won't be considered updated for the second time because of this.

不幸的是,对相同数据多次使用READC成功的可能性很小。因为MDT(修改数据标签)是由对记录发出的第一次READC操作触发的,所以对同一记录发出的第二次READC操作将失败。如果选择的处理选项会更改特定记录,READC会显示哪些记录受影响。由于MDT标志将被禁用,记录不会因此被视为第二次更新。

Utilizing the SFLNXTCHG keyword will allow us to have the record read twice, which is necessary before it can be processed. A change will also be regarded to have occurred if a subfile record is field excited, typed into, the erroneous processing option is selected, or an incorrect input or update is made.

利用SFLNXTCHG关键字,我们可以让记录被读取两次,这是在处理之前必要的。如果子文件记录被字段触发、输入了内容、选择了错误的处理选项,或进行了不正确的输入或更新,更改也会被视为已发生。

190. A problem with the connection to a device is referred to as a session or device error in an AS400 system. Specify an instance of a session or device problem that occurred.

与设备的连接问题在AS400系统中被称为会话或设备错误。指定一个发生的会话或设备问题的实例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99568 | 官方: 否 | 付费: 否

答案:

The SFLRCDNBR or SFLSIZ field in the sub-file does not include a record number that is valid. Examine the part of the programme at which it makes reference to the display subfile so that you can figure out what the value of RRN is (EXFMT). The value will be disregarded if the SFLDSP indication *ON is configured to display 0 or if the conditional display of the subfile is currently being carried out, whichever comes first. It is expected that the same error message would be displayed while making an attempt to display a subfile that is blank. There is a disparity between the location that is displayed for the field in the DDS display file and the actual location of the field. There is a lack of organization in the display file DDS's keywords. You are attempting to write more records than the Display file can hold, which is now set at 9999, but you can save no more than that. Take, for instance, the scenario in which you wished to load each and every subfile.

子文件中的SFLRCDNBR或SFLSIZ字段不包含有效的记录号。检查程序中引用显示子文件的部分(EXFMT),以确定RRN的值。如果SFLDSP指示*ON设置为显示0,或者子文件的条件显示正在执行中,该值将被忽略,以先发生者为准。在尝试显示空子文件时,预计会显示相同的错误消息。显示文件DDS中显示的字段位置与实际字段位置之间存在差异。显示文件DDS的关键字缺乏组织性。您试图写入的记录数超过了显示文件当前设置为9999的容量,但您不能保存超过此数量。例如,您希望加载每个子文件的场景。

191. Where does AS400's *NODEBUGIO get you if it doesn't work?

在AS400中,如果*NODEBUGIO不起作用,它会带您到哪里?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9956b | 官方: 否 | 付费: 否

答案:

You may notice that the debugger pauses multiple times for each I/O statement when you move through a programme while using an interactive source debugger. This is because I/O statements can have multiple parameters. This is due to the fact that a new breakpoint is inserted for each field that is read back from the input/output buffer. This is an irritation, but it is not a major problem at all. If you include the *NODEBUGIO directive in your code, each I/O statement will fail exactly once and never again after that.

当您使用交互式源代码调试器逐步执行程序时,您可能会注意到每个I/O语句调试器会暂停多次。这是因为I/O语句可能有多个参数。这是因为为从输入/输出缓冲区读回的每个字段都插入了一个新的断点。这很烦人,但完全不是大问题。如果您在代码中包含*NODEBUGIO指令,每个I/O语句将恰好失败一次,之后不会再失败。

192. What is the function of the IGNORE keyword while working with RPGLE?

在RPGLE中使用IGNORE关键字的功能是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b9956e | 官方: 否 | 付费: 否

答案:

You are able to disregard the record format that is externally indicated for a file by using the IGNORE keyword. Rec Format is a non-mandatory argument that specifies the full name of the record format that should be ignored by the outside world. You have the option of specifying one or more record types, delimited by commas (:).

通过使用IGNORE关键字,您可以忽略文件外部指定的记录格式。记录格式是一个非强制参数,用于指定应被外部世界忽略的记录格式的完整名称。您可以选择指定一个或多个记录类型,用逗号(:)分隔。

193. Please provide an explanation of the chain opcode in RPGLite.

请提供RPGLE中CHAIN操作码的解释。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99571 | 官方: 否 | 付费: 否

答案:

The READE operation will be carried out by the CHAIN command if it is unable to locate a match. CHAIN is your best bet if you have a large procedural file and are seeking a specific record (such as a record of a customer). In order to randomly access the contents of a file, we use the file operation as demonstrated by the CHAIN example. We are unable to go on from this record because none of the other records meets the conditions for the Chain operation. Therefore, if the file contains more than the given number of records that fit the same criteria, we will not be able to read any additional data using the Chain action since we will have reached our maximum capacity.

如果CHAIN命令无法找到匹配项,它将执行READE操作。如果您有一个大型过程文件并正在寻找特定记录(如客户记录),CHAIN是您的最佳选择。为了随机访问文件内容,我们使用CHAIN示例所示的文件操作。由于其他记录都不满足CHAIN操作的条件,我们无法从此记录继续前进。因此,如果文件中包含超过给定数量的符合相同条件的记录,我们将无法使用CHAIN操作读取任何其他数据,因为我们已经达到了最大容量。

The CHAIN action will lock the record that corresponds to a file whenever that file is opened in update mode. In order to avoid lock, we make use of operator extender 'N.' As part of the search input, you are required to submit either the key, the key list, or the related record number. If the record that corresponds to the search argument cannot be located, the HI level indicator will be triggered; in all other cases, it will remain deactivated. The %FOUND built-in function works in a manner that is analogous to this, giving the value '0' if there is no record found and '1' otherwise. If a CHAIN exception occurs, which is indicated by a file status code that is higher than 1000, either the operation code extender 'E' or an error indicator at the LO level needs to be used to resolve the problem. In the event that the result field does contain a specification of this kind, the operation's output will be written to the data structure that has been provided.

只要文件以更新模式打开,CHAIN操作就会锁定与文件对应的记录。为了避免锁定,我们使用操作扩展符'N'。作为搜索输入的一部分,您必须提交键、键列表或相关记录号。如果找不到与搜索参数对应的记录,HI级别指示器将被触发;在所有其他情况下,它将保持停用。%FOUND内置函数的工作方式与此类似,如果没有找到记录则给出值'0',否则给出'1'。如果发生CHAIN异常(由高于1000的文件状态代码指示),则必须使用操作码扩展符'E'或LO级别的错误指示器来解决问题。如果结果字段确实包含此类规范,则操作的输出将写入所提供的数据结构中。

194. Help me understand the rpgle EXCEPT opcode by breaking it down.

帮我分解理解RPGLE的EXCEPT操作码。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99574 | 官方: 否 | 付费: 否

答案:

The EXCEPT opcode is used whenever an exception record needs to be written. Exceptional records are denoted by the record type "E" at the O-spec level. In the course of the c-spec review, each of the fields that have been labelled as exceptional and that have been defined inside the exception records will be examined. It will be done in sequential order if there are several occurrences of the same record name. EXCEPT allows for the printing of reports as well as the partial updating of physically stored data.

当需要写入异常记录时,使用EXCEPT操作码。异常记录在O规范级别由记录类型"E"表示。在C规范审查过程中,将检查在异常记录内定义的每个被标记为异常的字段。如果同一记录名称出现多次,将按顺序进行。EXCEPT允许打印报告以及对物理存储数据进行部分更新。

195. What operations are carried out by the READ opcode in rpgle?

在RPGLE中,READ操作码执行哪些操作?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99577 | 官方: 否 | 付费: 否

答案:

The read operation reads all of the records that are contained within an entire procedure file. After reading the record that is now located at the pointer's location, the pointer is then moved to the next item in the sequence.

读取操作读取整个过程文件中包含的所有记录。在读取指针当前位置的记录后,指针然后移动到序列中的下一个项目。

When you perform a READ operation on a file that is open and set to update mode, the file receives a record lock. In order to avoid lock, we make use of operator extender 'N.' When dealing with READ exceptions, you have the option of using either the operation code extension 'E' or an error indicator at the LO level (file status codes greater than 1000). In the event that the result field does contain a specification of this kind, the operation's output will be written to the data structure that has been provided. In the case that there is an error or a circumstance that indicates that the file has reached its end, the reference to the file must be relocated to the first accessible record that is satisfactory. It is possible to reposition the pointer by utilizing the CHAIN, SETLL, or SETGT procedures. If the EOF condition is not satisfied, the Equal Indicator will not light up; instead, it will remain dark. Alternatively, the %EOF indicator may be utilized in place of this one ().

当您对以更新模式打开的文件执行READ操作时,文件会收到记录锁。为了避免锁定,我们使用操作扩展符'N'。处理READ异常时,您可以选择使用操作码扩展'E'或LO级别的错误指示器(文件状态代码大于1000)。如果结果字段确实包含此类规范,则操作的输出将写入所提供的数据结构中。如果存在错误或指示文件已达到末尾的情况,则必须将文件引用重定位到令人满意的第一个可访问记录。可以使用CHAIN、SETLL或SETGT过程重新定位指针。如果EOF条件未满足,则等于指示器不亮起;相反,它将保持暗色。或者,也可以使用%EOF指示器替代此功能()。

196. Please provide an example of how the READC opcode is utilized in rpgle.

请提供RPGLE中如何使用READC操作码的示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9957a | 官方: 否 | 付费: 否

答案:

When you use our software and press the READC button, it will retrieve any records that have been modified or added from the subfile and update the fields in the main file that are connected to the entries that were retrieved. Even if we enter a value by mistake or use the key that exits the field, the record will be altered. This is true even if no modifications were really done. As a result of the fact that this is the case, READC will also be capable of determining when something similar to this is occurring.

当您使用我们的软件并按下READC按钮时,它将从子文件中检索已修改或添加的任何记录,并更新与检索条目相关的主文件中的字段。即使我们错误输入了值或使用了退出字段的键,记录也会被修改。即使没有真正进行任何修改,这也是如此。由于情况是这样,READC也将能够确定何时发生类似情况。

If we make the error of entering option 3 in a field that enables user input (2 stands for edit, 4 stands for delete, and 5 stands for display), the record is modified, and READC will read this updated record. However, if we attempt to return to the record after the error has been corrected, we won't be able to do so. If we have a screen that displays records from a subfile and one of the fields in that screen allows the user to enter data, then we can delete records from the subfile. If we want to obtain the same record once more, we must first ensure that the subfile contains the most recent information and then activate the SFLNXTCHG signal. If the screen for the subfile can be modified, then any record included within the subfile can also be modified. By using READC on the subfile and including a DOW NOT%EOF in the appropriate place, we can determine which entries have been modified (). This will cause the software to read each record from the subfile that has been updated one at a time and process it.

如果我们错误地在允许用户输入的字段中输入了选项3(2表示编辑,4表示删除,5表示显示),记录会被修改,READC将读取此更新的记录。但是,如果我们在错误纠正后尝试返回记录,我们将无法做到这一点。如果我们有一个显示子文件记录的屏幕,并且该屏幕中的某个字段允许用户输入数据,那么我们可以从子文件中删除记录。如果我们想再次获得相同的记录,我们必须首先确保子文件包含最新信息,然后激活SFLNXTCHG信号。如果子文件的屏幕可以修改,则子文件内包含的任何记录也可以修改。通过在子文件上使用READC并在适当位置包含DOW NOT%EOF,我们可以确定哪些条目已被修改()。这将导致软件一次读取子文件中每个已更新的记录并处理它。

197. Please provide an example of how the READE opcode should be used in rpgle.

请提供RPGLE中应如何使用READE操作码的示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9957f | 官方: 否 | 付费: 否

答案:

Following the discovery of a record that satisfies factor-1, READE will move the cursor to the following record in the set that fulfils the same requirements. If the same matching criteria aren't found, it will be moved to the end of the file. The factor-1 location is where the search argument, which could be a key, relative record number, field value, named constant, or metaphorical constant, is inserted.

在发现满足因子-1的记录后,READE将光标移动到集合中满足相同条件的下一条记录。如果找不到相同的匹配标准,它将移动到文件末尾。因子-1位置是搜索参数(可以是键、相对记录号、字段值、命名常量或隐喻常量)插入的位置。

Using SETLL and READE, it is possible to find several records all at once. Whereas CHAIN is most helpful for discovering a particular record, for example, it is feasible to retrieve several client orders for a single customer (like a customer record). Through the use of the READE command, we can read all of the records that include a match for the search input in factor -1. If there are no entries in the database that fit the search criteria, the cursor will be moved to the very end of the file. When managing READE problems, you have the option of using either the operation code extension "E" or an error indicator at the LO level (file status codes higher than 1000). In the event that the result field does contain a specification of this kind, the operation's output will be written to the data structure that has been provided. If the EOF condition is not satisfied, the Equal Indicator will not light up; instead, it will remain dark. If we do want, we also have the option of using %EOF as an alternative signal ().

使用SETLL和READE,可以一次找到多条记录。而CHAIN最有助于发现特定记录,例如,可以检索单个客户的多个客户订单(如客户记录)。通过使用READE命令,我们可以读取包含与因子-1中搜索输入匹配的所有记录。如果数据库中没有符合搜索条件的条目,光标将移动到文件的最末尾。处理READE问题时,您可以选择使用操作码扩展"E"或LO级别的错误指示器(文件状态代码高于1000)。如果结果字段确实包含此类规范,则操作的输出将写入所提供的数据结构中。如果EOF条件未满足,则等于指示器不亮起;相反,它将保持暗色。如果我们确实需要,我们也有选项使用%EOF作为替代信号()。

198. Please provide an example of how the READP opcode should be used in rpgle.

请提供一个在 RPGLE 中如何使用 READP 操作码的示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99584 | 官方: 否 | 付费: 否

答案:

During the process of reading a record, READP will move the pointer back to where it was before reading the record, after which it will move back to where it was before reading the record once more. EOF *ON will become active once it has been determined that no further records can be located. Dealing with READP exceptions can be done with either the operation code extension "E" or an error indicator at the LO level. Both of these options are available (file status codes higher than 1000). If the result field does contain a specification of this kind, the operation's output will be written to the data structure that has been provided. Altering the position of the Equal Indicator.

在读取记录的过程中,READP 会将指针移回读取记录前的位置,之后它会再次移回读取记录前的位置。一旦确定无法再找到更多记录,EOF *ON 将变为活动状态。处理 READP 异常可以使用操作码扩展“E”或在 LO 级别使用错误指示器。这两个选项都可用(文件状态代码高于 1000)。如果结果字段确实包含此类规范,则操作的输出将写入所提供的数据结构中。更改等于指示器的位置。

199. It would be helpful if you could walk us through the READPE opcode in rpgle and explain why we need to use it.

如果您能为我们讲解 RPGLE 中的 READPE 操作码并解释为什么需要用到它,那将非常有帮助。
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: behavioral | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99587 | 官方: 否 | 付费: 否

答案:

READPE will move the record pointer back one record, read that record, and then move it back one more record while continuing to read the same record for factor 1. This process will be repeated until all records have been read.

READPE 会将记录指针向后移动一条记录,读取该记录,然后在继续读取因子 1 的相同记录时再次向后移动一条记录。此过程将重复进行,直到所有记录都被读取完毕。

The factor-1 location is where the search argument, which could be a key, relative record number, field value, named constant, or metaphorical constant, is inserted. READPE is the best option to go with whenever it's possible to find more than one record. Reverse order searches for things like client orders can disclose multiple entries for a single consumer, whereas CHAIN is great for discovering a specific record (like a customer record). We can obtain all of the files that have a search parameter in factor-1 by using READPE. This search parameter must match the filenames that are found in the matched records. If there are no entries that correspond to the search criteria, the pointer will be moved to the beginning of the file. Dealing with READPE exceptions can be done with either the operation code extender 'E' or an error indicator at the LO level. Both of these options are available (file status codes higher than 1000). In the event that the result field does contain a specification of this kind, the operation's output will be written to the data structure that has been provided. If the EOF condition is not satisfied, the Equal Indicator will not light up; instead, it will remain dark. If we do want, we also have the option of using %EOF as an alternative signal ().

因子 1 的位置是插入搜索参数的地方,该参数可以是键、相对记录号、字段值、命名常量或隐喻常量。只要有可能找到多条记录,READPE 就是最佳选择。反向顺序搜索(如客户订单)可能会为单个消费者显示多个条目,而 CHAIN 非常适合查找特定记录(如客户记录)。我们可以通过使用 READPE 获取所有在因子 1 中具有搜索参数的文件。此搜索参数必须与匹配记录中找到的文件名相匹配。如果没有任何条目对应于搜索条件,指针将移动到文件开头。处理 READPE 异常可以使用操作码扩展符“E”或在 LO 级别使用错误指示器。这两个选项都可用(文件状态代码高于 1000)。如果结果字段确实包含此类规范,则操作的输出将写入所提供的数据结构中。如果 EOF 条件未满足,等于指示器将不会点亮;相反,它将保持熄灭。如果我们确实希望,我们也可以选择使用 %EOF 作为替代信号。

200. Please provide an example of the SETGT operation and explain how it functions.

请提供 SETGT 操作的示例并解释其功能。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b9958a | 官方: 否 | 付费: 否

答案:

With the help of this opcode, the file pointer is moved to the right by one record, to a record that contains a key or RRN value that is greater by one than the value it is currently pointing to. After we have successfully set the file pointer, we are free to carry out any file operation that we desire, such as READ, READP, READPE, or READE. In addition to the literal notations LOVAL, HIVAL, START, and END, we also have the option of using RRN VALUE, KEY VALUE, and KEY LIST in factor-1. If SETGT is successful, it will set EOF() to *OFF; if it is not successful, it will not affect EOF() in any way ().

借助此操作码,文件指针向右移动一条记录,移动到包含大于当前指向值的键或 RRN 值的记录。成功设置文件指针后,我们可以自由执行任何所需的文件操作,例如 READ、READP、READPE 或 READE。除了字面符号 LOVAL、HIVAL、START 和 END 之外,我们还可以在因子 1 中使用 RRN 值、键值和键列表。如果 SETGT 成功,它将把 EOF() 设置为 *OFF;如果不成功,它不会以任何方式影响 EOF()。

201. It would be helpful if you could provide an example of the SETLL operation.

如果您能提供 SETLL 操作的示例,那将非常有帮助。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b9958d | 官方: 否 | 付费: 否

答案:

When used with a search argument of factor-1, SETLL will position the file pointer at the first occurrence of the record when the value in the key field/RRN is greater than or equal to the search argument. File operations such as READ, READP,READPE, and READE are possible once the file pointer has been set. The file is moved to the end of the file if the SETLL operation fails (no records found condition). We can use the symbolic constants LOVAL, HIVAL, START, END, or the more concrete RRN VALUE, KEY VALUE, or KEY LIST in factor-1. To ascertain if the found record has a key field/RRN value that is larger than or equal to the key field, we use the %FOUND variable. The HI indicator will be "on" in this situation. Using %EQUAL, we check to see if the value of the key field or RRN in the found record matches the value of the search input in factor 1. Only the RRN number is required for a sequential file. Therefore, the EQ indicator will be on in this scenario. An error indicator at the LO level or the operation code extension 'E' can be used to deal with SETLL exceptions (file status codes higher than 1000). In the event of a 100% match, the Equal Indicator will light up. That's a suitable replacement for %equal, actually (). HI level indication will be activated if a greater value match is obtained. Substitute this in for %found (). For files that aren't encrypted with a key, LOVAL will return an error. If SETLL succeeds, it turns EOF() OFF if it is ON; otherwise, it does not affect EOF() ().

当与因子 1 的搜索参数一起使用时,SETLL 会将文件指针定位到键字段/RRN 中的值大于或等于搜索参数的记录首次出现的位置。一旦文件指针被设置,就可以执行诸如 READ、READP、READPE 和 READE 之类的文件操作。如果 SETLL 操作失败(未找到记录的条件),文件将移动到文件末尾。我们可以使用符号常量 LOVAL、HIVAL、START、END,或者更具体的 RRN 值、键值或因子 1 中的键列表。为确定找到的记录是否具有大于或等于键字段的键字段/RRN 值,我们使用 %FOUND 变量。在这种情况下,HI 指示器将处于“开启”状态。使用 %EQUAL,我们检查找到的记录中键字段或 RRN 的值是否与因子 1 中的搜索输入值匹配。对于顺序文件,只需要 RRN 号。因此,在此场景中,EQ 指示器将处于开启状态。LO 级别的错误指示器或操作码扩展符“E”可用于处理 SETLL 异常(文件状态代码高于 1000)。在 100% 匹配的情况下,等于指示器将点亮。这实际上是 %equal 的合适替代方案。如果获得更大的值匹配,将激活 HI 级别指示。将其替换为 %found。对于未使用键加密的文件,LOVAL 将返回错误。如果 SETLL 成功,并且 EOF() 处于 ON 状态,它会将其关闭;否则,它不会影响 EOF()。

202. Explain the rpgle TEST opcode and its function with an example

解释 RPGLE 中的 TEST 操作码及其功能,并给出示例。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b3793f58d557c902b99590 | 官方: 否 | 付费: 否

答案:

A test opcode is used whenever there is a need to determine whether or not a particular date, time, or timestamp has been accurately recorded. If the date is not valid, the low-level signal will be turned on; if it is valid, the indicator will not be turned on. In order to conduct the tests, operator extenders will be utilized. For example, test (d), test (t), and test (z) will be utilized for the date, the time, and the time stamp, respectively. Date of the test excluding the extended factor by default (z).

当需要确定特定日期、时间或时间戳是否被准确记录时,会使用测试操作码。如果日期无效,低级信号将被开启;如果有效,指示器将不会开启。为了进行测试,将使用操作符扩展符。例如,test (d)、test (t) 和 test (z) 将分别用于日期、时间和时间戳。默认情况下,测试日期不带扩展因子(z)。

203. Explain the use of the MOVE opcode by providing an example.

通过提供示例来解释 MOVE 操作码的用法。
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99593 | 官方: 否 | 付费: 否

答案:

The text contained within the second input is copied over into the output field by the MOVE command. The action will begin with the character that is located in the far rightmost position of Factor 2. When sending data that pertains to dates, times, or timestamps, the first factor must be left blank unless both the source and the destination are character or numeric fields. In the event that factor 2 is longer than the result field, the leftmost letters or digits of that factor will not be sent. Any result field that is longer than factor 2 will have the leftmost letters or digits of that field remain unchanged unless padding is provided for the field. If factor 2 is smaller than the length of the result field, a P can be supplied in the operation extender position to allow the result field to be padded on the left after the move. This is only possible if the length of the result field is less than factor 2. In the instance of a result field that has a variable length, the MOVE operation will not have any impact on the length of the field. If either the source or the target is a character field, an optional separator specification can be made using the syntax indicated in factor 1 if the source or the target. Only separators that are valid for the format are shown here.

MOVE 命令会将第二个输入中的文本复制到输出字段中。操作将从因子 2 最右侧位置的字符开始。当发送涉及日期、时间或时间戳的数据时,除非源和目标都是字符或数字字段,否则第一个因子必须留空。如果因子 2 比结果字段长,则该因子的最左侧字母或数字将不会被发送。任何比因子 2 长的结果字段,除非为该字段提供填充,否则其最左侧字母或数字将保持不变。如果因子 2 比结果字段的长度短,则可以在操作扩展符位置提供 P,以允许结果字段在移动后向左填充。这仅在结果字段的长度小于因子 2 时才可能。对于可变长度的结果字段,MOVE 操作不会影响字段的长度。如果源或目标都是字符字段,则可以使用因子 1 中指示的语法进行可选的分隔符规范。这里只显示了对格式有效的分隔符。

204. What is EXTPROC in as400?

AS400 中的 EXTPROC 是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99596 | 官方: 否 | 付费: 否

答案:

If the prototype of the procedure is being defined, then the EXTPROC keyword should be used to specify the procedure's external name. You have the option of utilizing either a character constant or a function pointer for the name.

如果正在定义过程的原型,则应使用 EXTPROC 关键字来指定该过程的外部名称。您可以选择使用字符常量或函数指针作为名称。

205. What is extpgm in as400?

AS400 中的 EXTPGM 是什么?
  • 知识点: 大型机与遗留系统 (主题: as400, ibm;标签: interviewbit, as400, topic-specific, ibm)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b3793f58d557c902b99599 | 官方: 否 | 付费: 否

答案:

When the EXTPGM keyword is included in the prototype, it indicates that a dynamic call to a program is being made. In order to parameterize programs, first define their prototypes, and then pass in the names of the program's external variables. It is up to you to decide whether the name will be a string of fixed length or a string of variable length.

当原型中包含EXTPGM关键字时,表示正在进行对程序的动态调用。为了参数化程序,首先定义它们的原型,然后传入程序外部变量的名称。由您决定该名称是固定长度字符串还是可变长度字符串。

Conclusion

结论
The Logical PARtitioning-LPAR feature that was introduced in version 4.0 of OS/400 makes it possible to run several operating systems on a single IBM System, with each OS running in its own dedicated partition. This functionality was initially introduced in OS/400 version 4.0.
OS/400 4.0版本中引入的逻辑分区-LPAR功能使得在单个IBM系统上运行多个操作系统成为可能,每个操作系统在其专用分区中运行。此功能最初在OS/400 4.0版本中引入。

Some of the AS400 applications, which are also known as IBM iSeries, are fairly large and call for a client-server midrange architecture, a system that is secure and stable, and virtually no maintenance.

一些AS400应用程序(也称为IBM iSeries)相当庞大,需要客户端-服务器中型架构,这是一种安全稳定且几乎无需维护的系统。

Questions around the management of supply chains, legal activity on databases, and other similar topics are also frequently asked at AS400 interviews.

关于供应链管理、数据库上的法律活动以及其他类似主题的问题在AS400面试中也经常被问到。

It's possible that the interviewer will additionally enquire about your background working with RPGLE, AS400 RPG, and AS400 testing. I hope everything works out for you!

面试者可能还会询问您在RPGLE、AS400 RPG和AS400测试方面的背景。希望一切顺利!

Important Interview Resources

重要的面试资源
  • Technical Interview Questions
  • Coding Interview Questions
  • Interview Preparation Articles

206. Can you implement a pseudo-conversational program in CICS? Also, Describe some practical examples of how the techniques are used in real-world scenarios.

你能在CICS中实现一个伪会话程序吗?另外,描述一些该技术在实际场景中如何使用的实例。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c40 | 官方: 否 | 付费: 否

答案:

Here is the implementation of a pseudo-conversational program in CICS in the COBOL Programming language.

以下是用COBOL编程语言在CICS中实现的一个伪会话程序。

IDENTIFICATION DIVISION.

标识部。
PROGRAM-ID. PSEUDOCONV.
程序ID。PSEUDOCONV。
ENVIRONMENT DIVISION.
环境部。
INPUT-OUTPUT SECTION.
输入-输出节。
FILE-CONTROL.
文件控制。
SELECT MYFILE ASSIGN TO SYSOUT.
选择MYFILE分配给SYSOUT。

DATA DIVISION.

数据部。
FILE SECTION.
文件节。
FD MYFILE.
FD MYFILE。
01 MYREC PIC X(80).
01 MYREC PIC X(80)。

WORKING-STORAGE SECTION.

工作存储节。
01 WS-FIELD PIC X(80).
01 WS-FIELD PIC X(80)。
01 WS-FIRST-TIME VALUE 'Y'.
01 WS-FIRST-TIME 值 'Y'.
01 WS-CONV-IND PIC X(1) VALUE 'N'.
01 WS-CONV-IND PIC X(1) 值 'N'.

PROCEDURE DIVISION.

PROCEDURE DIVISION.
MAIN-PROCEDURE.
MAIN-PROCEDURE.
PERFORM UNTIL WS-CONV-IND = 'X'
PERFORM UNTIL WS-CONV-IND = 'X'
IF WS-FIRST-TIME = 'Y'
IF WS-FIRST-TIME = 'Y'
DISPLAY 'Enter input:'
DISPLAY 'Enter input:'
ACCEPT WS-FIELD
ACCEPT WS-FIELD
MOVE 'N' TO WS-FIRST-TIME
MOVE 'N' TO WS-FIRST-TIME
ELSE
ELSE
EXEC CICS SEND TEXT='Enter input:' RESPONSE=(WS-FIELD)
EXEC CICS SEND TEXT='Enter input:' RESPONSE=(WS-FIELD)
EXEC CICS RECEIVE MAPSET('MYMAP') MAP('MYMAP') RESPONSE=(WS-FIELD)
EXEC CICS RECEIVE MAPSET('MYMAP') MAP('MYMAP') RESPONSE=(WS-FIELD)
END-IF
END-IF
EXEC CICS WRITE FILE('MYFILE') FROM(MYREC)
EXEC CICS WRITE FILE('MYFILE') FROM(MYREC)
EXEC CICS SEND MAP('MYMAP') MAPSET('MYMAP')
EXEC CICS SEND MAP('MYMAP') MAPSET('MYMAP')
EVALUATE TRUE
EVALUATE TRUE
WHEN WS-FIELD = 'END' SET WS-CONV-IND TO 'X'
当 WS-FIELD = 'END' 时,将 WS-CONV-IND 设置为 'X'
END-EVALUATE
END-EVALUATE
END-PERFORM.
结束执行。
EXEC CICS RETURN.
执行 CICS RETURN。
In this example, the program uses a loop to repeatedly prompt the user for input until they enter 'END' . The program starts by accepting input from the user and writing it into a file. If this is the first iteration of the loop, the program simply accepts input using the ‘ACCEPT’ statement. However, if it is not the first iteration, the program uses ‘EXEC CICS SEND’ and ‘EXEC CICS RECEIVE’ commands to send and receive input using a CICS map.
在此示例中,程序使用循环反复提示用户输入,直到用户输入 'END' 为止。程序首先接受用户输入并将其写入文件。如果是循环的第一次迭代,程序仅使用 ‘ACCEPT’ 语句接受输入。然而,如果不是第一次迭代,程序则使用 ‘EXEC CICS SEND’ 和 ‘EXEC CICS RECEIVE’ 命令通过 CICS 映射发送和接收输入。

The ‘EVALUATE’ statement is used to check the user's input. If the user enters 'END' , the program sets the ‘WS-CONV-IND’ field to 'X' , which causes the loop to exit.

使用 ‘EVALUATE’ 语句检查用户的输入。如果用户输入 'END' ,程序将 ‘WS-CONV-IND’ 字段设置为 'X' ,这将导致循环退出。

Pseudo-conversational programming is used in real-world scenarios. Like - - Online Banking: The user may need to perform multiple transactions like - balance inquiry, fund transfer, and bill payment. So, using pseudo-conversational programming, the system can ask the user to enter each transaction and then return to the main menu after the completion of the transaction. This approach makes sure that the user doesn’t lose any entered data in case of any errors or the case when the system may fail.

伪会话编程在实际场景中被广泛使用。例如——网上银行:用户可能需要进行多项交易,如余额查询、资金转账和账单支付。因此,利用伪会话编程,系统可以要求用户输入每项交易,并在交易完成后返回主菜单。这种方法确保在发生任何错误或系统可能故障的情况下,用户不会丢失任何已输入的数据。
  • Airline Reservation System: Suppose the user needs to perform multiple tasks like - searching for flights, selecting a seat, booking a ticket, etc. So, pseudo-conversational programming helps here by asking the user for each task and then returning to the main menu after completing each of the tasks. This makes sure that the user doesn’t need to start again if they face any errors in the process.
    In both of the above scenarios, pseudo-conventional programming helps the user in a smooth experience when performing multiple tasks.

    在上述两种场景中,伪会话编程都帮助用户在执行多项任务时获得流畅的体验。

Conclusion

结论
CICS is a powerful system used for processing transactions on mainframe computers. During a job interview, you might be asked questions about your experience with CICS, how it works, and how you develop and maintain applications using CICS. Some of the topics that could be discussed during the interview include the CICS commands, how to handle files, designing programs, and ways to improve performance.
CICS 是一个功能强大的系统,用于在大型机上处理事务。在求职面试中,你可能会被问到有关你的 CICS 经验、其工作原理以及如何使用 CICS 开发和维护应用程序的问题。面试中可能讨论的一些主题包括 CICS 命令、如何处理文件、设计程序以及提高性能的方法。

To prepare for a CICS interview, it's important to review the concepts and best practices related to CICS development. It's also important to know the programming languages and tools used in the job you're applying for. By showing your expertise and ability to think critically about CICS development challenges, you can increase your chances of getting a job in this field.

为准备 CICS 面试,回顾与 CICS 开发相关的概念和最佳实践非常重要。了解你申请职位中使用的编程语言和工具也很关键。通过展示你的专业知识以及对 CICS 开发挑战进行批判性思考的能力,你可以增加在该领域获得工作的机会。

207. What is the difference between a program-controlled task and a system-controlled task in CICS? Explain in Detail.

在 CICS 中,程序控制任务和系统控制任务有什么区别?请详细解释。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c43 | 官方: 否 | 付费: 否

答案:

Feature
特性
Program-Controlled Task
程序控制任务
System-Controlled Task
系统控制任务
Who initiates task execution?
谁启动任务执行?
The application program initiates execution.
应用程序启动执行。
CICS initiates execution.
CICS 启动执行。
How is the task created?
如何创建任务?
Using the START command in the application program.
使用应用程序中的 START 命令。
Using the CICS task control facilities, such as transaction initiation or event processing.
使用 CICS 任务控制设施,如事务启动或事件处理。
When is the task terminated?
任务何时终止?
When the program calls the EXEC CICS RETURN command.
当程序调用 EXEC CICS RETURN 命令时。
When CICS determines that the task has been completed.
当 CICS 确定任务已完成时。
Who controls task execution?
谁控制任务执行?
The application program controls task execution.
应用程序控制任务执行。
CICS controls task execution.
CICS 控制任务执行。
Can it be dispatched by CICS?
是否可以由 CICS 分派?
No, the application program is responsible for dispatching the task.
否,应用程序负责分派任务。
Yes, CICS can dispatch the task.
是,CICS 可以分派任务。
Can it access system resources directly?
是否可以直接访问系统资源?
Yes, the application program can access system resources directly.
是,应用程序可以直接访问系统资源。
No, the system-controlled task must request access to system resources through CICS facilities.
否,系统控制任务必须通过 CICS 设施请求访问系统资源。
Examples
示例
Batch programs that run under CICS.
在 CICS 下运行的批处理程序。
CICS transactions are initiated by users or by events.
由用户或事件启动的 CICS 事务。

208. List out some points through which you can optimize the CICS performance.

列出一些可以优化 CICS 性能的要点。
  • 知识点: 大型机与遗留系统 / 行为与软技能 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: behavioral | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c46 | 官方: 否 | 付费: 否

答案:

  • We can write efficient code using appropriate algorithms and data structures to optimize performance.
  • We can use caching and buffering techniques to minimize the number of I/O operations.
  • Excessive use of dynamic memory allocation can lead to performance problems. So we can allocate memory only when necessary and deallocate it as soon as it's no longer needed.
  • We can use appropriate locking strategies and minimize the number of calls to the database.
  • We can adjust system parameters to optimize performance. This includes tuning CICS transaction and region parameters.
  • We can use CICS connection pooling to reduce the overhead of establishing a new connection for each transaction.
  • We can use CICS thread pooling to improve throughput by reusing threads for subsequent requests.
  • We can minimize the use of system resources, such as CPU and storage, to improve performance.
  • We can use caching techniques to reduce database access and improve response time.
  • We can use asynchronous calls instead of synchronous calls where possible to improve response time.
  • We can optimize the network settings to improve performance.
  • We can use CICS monitoring tools to identify bottlenecks and areas for improvement.

209. How Dynamic Memory Allocation is Handled in the CICS Program?

在 CICS 程序中如何处理动态内存分配?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c49 | 官方: 否 | 付费: 否

答案:

Dynamic memory allocation in CICS programs is typically handled using the CICS dynamic storage allocation services. These services provide a way for programs to dynamically allocate and deallocate memory at runtime.

CICS 程序中的动态内存分配通常使用 CICS 动态存储分配服务来处理。这些服务为程序提供了一种在运行时动态分配和释放内存的方法。

There are several CICS dynamic storage allocation services available, Some of them are - - GETMAIN: This service is used to allocate a block of memory of a specified size. The allocated block can then be used by the program for temporary storage.

有几种可用的 CICS 动态存储分配服务,其中一些包括——GETMAIN:此服务用于分配指定大小的内存块。程序随后可以将分配的内存块用于临时存储。
  • FREEMAIN: This service is used to deallocate a block of memory that was previously allocated using GETMAIN. This releases the memory back into the system for reuse.
  • PUT and GET: These services are used to allocate and deallocate storage for the duration of a task. PUT is used to allocate storage, while GET is used to deallocate storage.
  • EXEC CICS HANDLE CONDITION: This service is used to handle storage violations that may occur during dynamic storage allocation. If a storage violation occurs, the program can use this service to handle the error and take appropriate action.
    Programs can use these services to allocate memory for variables, tables, and other data structures needed at runtime. The allocated memory can be used for the duration of the program's execution and is automatically deallocated when the program terminates.

    程序可以使用这些服务为变量、表以及运行时所需的其他数据结构分配内存。分配的内存在程序执行期间可供使用,并且在程序终止时自动释放。

210. How do you ensure data integrity in a CICS program?

你如何在CICS程序中确保数据完整性?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c4c | 官方: 否 | 付费: 否

答案:

Ensuring data integrity is an important aspect of any application, and CICS provides various mechanisms to maintain the integrity of data in a transactional environment. Here are some ways through which we can ensure data integrity in a CICS program: - Use CICS Syncpoints: A Syncpoint is a checkpoint in the transaction where CICS ensures that all updates made to the resources are either committed or rolled back. By using Syncpoints, we can ensure that updates are committed only if all updates are successful, and rolled back if any update fails. This ensures that data is consistent and reliable.

确保数据完整性是任何应用程序的重要方面,而CICS提供了各种机制来在事务环境中维护数据的完整性。以下是在CICS程序中确保数据完整性的一些方法: - 使用CICS同步点:同步点是事务中的一个检查点,CICS在此确保对资源所做的所有更新要么提交,要么回滚。通过使用同步点,我们可以确保只有在所有更新成功时才提交更新,如果任何更新失败则回滚。这确保了数据的一致性和可靠性。
  • Use CICS Restart: CICS Restart is a facility that enables a program to recover from failures. By using CICS Restart, we can ensure that updates made to resources are not lost in the event of a failure, such as a system crash or network outage.
  • Use CICS journaling: CICS journaling is a facility that records changes made to resources, such as files or databases. By using journaling, we can ensure that changes made to resources can be replayed in the event of a failure, thereby ensuring that data is consistent and reliable.
  • Use CICS program-controlled logging: Program-controlled logging is a technique where the program explicitly logs changes made to resources. By using program-controlled logging, we can ensure that changes made to resources are logged in a controlled manner, thereby ensuring data integrity.
  • Use CICS Resource Control Table (RCT): The RCT is a facility that enables you to define rules for accessing resources. By using the RCT, we can ensure that only authorized programs can access resources, thereby ensuring data integrity.
    These are just a few examples of how we can ensure data integrity in a CICS program. By using a combination of these techniques, we can create a robust and reliable application that ensures data integrity.

    这些只是在CICS程序中确保数据完整性的几个例子。通过结合使用这些技术,我们可以创建一个稳健可靠的应用程序,以确保数据完整性。

211. What is EIB? Explain in detail. Also, list the information this contains.

什么是EIB?请详细解释。同时,列出它包含的信息。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c4f | 官方: 否 | 付费: 否

答案:

EIB stands for Execution Interface Block, and it is a data structure used by CICS to communicate information between a CICS task and the CICS system. The EIB is available to all CICS programs and contains information about the current task, the transaction, and the environment in which the task is running.

EIB代表执行接口块,它是CICS用于在CICS任务和CICS系统之间传递信息的一种数据结构。EIB对所有CICS程序可用,并包含有关当前任务、事务以及任务运行环境的信息。

CICS programs can access the EIB using the EXEC CICS GET EIB command to retrieve information about the current task and environment. The EIB can also be updated using the EXEC CICS SET EIB command to set values for certain EIB fields.

CICS程序可以使用EXEC CICS GET EIB命令来访问EIB,以检索有关当前任务和环境的信息。EIB还可以使用EXEC CICS SET EIB命令来更新,以设置某些EIB字段的值。

The EIB contains the following information: - Task information: This includes the task number, the task type (batch or online), and the transaction code that initiated the task.

EIB包含以下信息: - 任务信息:这包括任务编号、任务类型(批处理或联机)以及发起任务的事务代码。
  • Security information: This includes the user ID and the security level of the task.
  • Date and time information: This includes the current date and time.
  • Terminal information: This includes the terminal ID and the device type of the terminal.
  • Program information: This includes the program name and the program type.
  • Language environment information: This includes the language environment ID and the associated data.

212. What is the difference between a VSAM KSDS and a VSAM RRDS file? List in detail.

VSAM KSDS和VSAM RRDS文件之间有什么区别?请详细列出。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c52 | 官方: 否 | 付费: 否

答案:

VSAM KSDSVSAM RRDS
Full formKey Sequenced Data Set.
Relative Record Data Set.
Access MethodKeyed access method.
Relative byte address access method.
Record RetrievalRecords are retrieved based on the key value.
Records are retrieved based on the relative byte address.
Record InsertionRecords can be inserted in ascending or descending order based on the key value.
Records can be inserted at any available slot in the dataset.
Record DeletionRecords can be deleted using the key value.
Records can be deleted based on the relative byte address.
Record updateRecords can be updated using the key value.
Records can be updated using the relative byte address.
Data OrganizationData is organized based on the key value and stored in ascending or descending order.
Data is organized circularly with fixed-length slots.
IndexThe KSDS file has an index component that contains the key values and their corresponding physical addresses.
The RRDS file has a free space map that contains information about the available slots.
EfficiencyKSDS files are efficient for the retrieval of individual records using the key value.
RRDS files are efficient for the sequential processing of records or retrieval of a range of records.
PerformanceKSDS files provide faster access to individual records, especially when the dataset is large.
RRDS files provide better performance for the sequential processing of records or retrieval of a range of records, especially when the dataset is large.
UsageKSDS files are commonly used for online transaction processing systems.
RRDS files are commonly used for batch processing and report generation.

213. Explain some of the most commonly used CICS Commands.

解释一些最常用的CICS命令。
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c55 | 官方: 否 | 付费: 否

答案:

  • EXEC CICS LINK - This command is used to invoke a program from within another program in the same CICS region.
  • EXEC CICS XCTL - This command is used to transfer control from one program to another within the same task.
  • EXEC CICS RETURN - This command is used to return control from a program to the program that has been called.
  • EXEC CICS SEND - This command is used to send data to another program or terminal.
  • EXEC CICS RECEIVE - This command is used to receive data from another program or terminal.
  • EXEC CICS READ - This command is used to read data from a file.
  • EXEC CICS WRITE - This command is used to write data to a file.
  • EXEC CICS START - This command is used to start a task that will run concurrently with the current task.
  • EXEC CICS SYNCPOINT - This command is used to synchronize changes made to a database during a transaction.
  • EXEC CICS ENDMULTI - This command is used to end a loop that was started with the EXEC CICS DO command.
  • EXEC CICS ASKTIME - This command is used to obtain the current date and time from the CICS system clock.
  • EXEC CICS ASSIGN - This command is used to assign a value to a field or variable.
  • EXEC CICS SET - This command is used to set the value of a system control block or resource.
  • EXEC CICS INQUIRE - This command is used to obtain information about a resource or system control block.
  • EXEC CICS GETMAIN - This command is used to allocate main storage (i.e. memory) for use by a program.
  • EXEC CICS FREEMAIN - This command is used to release the main storage that was allocated using the GETMAIN command.
  • EXEC CICS XCTLTRAN - This command is used to transfer control from one task to another within the same CICS region.
  • EXEC CICS LINKPGM - This command is used to invoke a program that resides in a different CICS region.
  • EXEC CICS RETURNTRANS - This command is used to terminate a transaction and return control to the terminal or application that initiated it.
  • EXEC CICS SEND MAP - This command is used to send a screen or map to a terminal.

214. How does CICS differ from other transaction processing systems?

CICS与其他事务处理系统有何不同?
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c58 | 官方: 否 | 付费: 否

答案:

Most transaction Processing System offers the same, But here are some ways in which CICS differs from other transaction processing systems: - Application flexibility: It provides a high degree of application flexibility and has support for multiple programming languages, like - COBOL, PL/I, C, C++, and Assembler. This flexibility makes it easy for developers to write and maintain complex applications that require a variety of programming languages.

大多数事务处理系统提供了相同的功能,但以下是CICS与其他事务处理系统不同的一些方面: - 应用程序灵活性:它提供了高度的应用程序灵活性,并支持多种编程语言,如COBOL、PL/I、C、C++和汇编器。这种灵活性使开发人员能够轻松编写和维护需要多种编程语言的复杂应用程序。
  • Scalability: It is designed to handle large and complex transaction processing environments and can scale to meet the demands of large organizations. It can support thousands of transactions per second and can handle millions of users.
  • Reliability: It is a highly reliable transaction processing system that offers features such as automatic restart, recovery, and backup. It can recover from system failures and errors quickly and efficiently.
  • Security: It provides a wide range of security features, like - user authentication, authorization, and encryption. It can also protect against unauthorized access and attacks from external sources.
  • Integration: It provides a wide range of integration capabilities, including support for various messaging systems, databases, and middleware technologies. This integration allows CICS to interact with other systems and applications seamlessly.

    Tips and Tricks

215. CICS Interview Preparation

CICS面试准备
  • 知识点: 大型机与遗留系统 (主题: cics, mainframe;标签: interviewbit, cics, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a1258d557c902ba2c5b | 官方: 否 | 付费: 否

答案:

Some tips and tricks to answer questions during your CICS Interview - - Know the basics of CICS: Make sure you have a solid understanding of the fundamentals of CICS, including its architecture, programming languages, and tools used in CICS development. Familiarize yourself with the various CICS commands and their usage.

在CICS面试中回答问题的一些技巧和提示 - 了解CICS的基础知识:确保你对CICS的基本原理有扎实的理解,包括其架构、编程语言和CICS开发中使用的工具。熟悉各种CICS命令及其用法。
  • Be prepared to give specific examples from your experience: Be ready to provide concrete examples of how you have used CICS in your experience. This could include specific programming tasks you have completed, challenges you faced and how you overcame them, and the impact of your work on the organization.
  • Practice problem-solving skills: CICS development often involves problem-solving, so it's important to demonstrate your ability to approach and solve complex problems. Be ready to discuss your thought process and methodology when approaching a problem.
  • Demonstrate your communication skills: Communication is critical in CICS development, so be prepared to discuss how you have communicated with team members, stakeholders, and customers. This could include discussing how you have documented your work, how you have provided updates on progress, and how you have collaborated with others on projects.
  • Be honest about your abilities and show a willingness to learn: It's important, to be honest about your strengths and weaknesses in CICS development. Don't be afraid to admit when you don't know something, but be prepared to show a willingness to learn and grow in your role.
    By following these tips, you can increase your chances of doing well in a CICS interview and landing a job in this field.

    通过遵循这些提示,你可以增加在CICS面试中表现出色的机会,并在这个领域找到工作。

216. How will you achieve record level locking in DB2 versions where record level locking is not allowed?

在不允许记录级别锁定的DB2版本中,你将如何实现记录级别锁定?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66cc | 官方: 否 | 付费: 否

答案:

We can achieve the record level locking in DB2 versions where the record level locking is not allowed by having the length of the record greater than that of a page itself.

我们可以通过使记录长度大于页面本身长度,在DB2版本中实现记录级锁定,即使这些版本不允许记录级锁定。

Now that we have so much knowledge from the questions that we have studied, let us now move to practice some of the MCQs that will help test your knowledge too.

既然我们从研究的问题中获得了这么多知识,现在让我们转向练习一些多项选择题,这些题也将测试您的知识。

Useful Interview Resources

有用的面试资源
  • Interview Questions on MainFrame
  • Interview Questions on COBOL
  • Interview Questions on SQL
  • Interview Questions on DBMS
  • Interview Questions on Oracle
  • Interview Questions on Database Testing
  • Char vs Varchar

217. What is DSNDB07? What does it do?

什么是DSNDB07?它有什么作用?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66cf | 官方: 否 | 付费: 否

答案:

DSNDB07 is a database where the DB2 performs its sorting operations. It includes the sort work-area of DB2 and external storage.

DSNDB07是DB2执行排序操作的数据库。它包括DB2的排序工作区和外部存储。

218. Is there any specific reason why SELECT is not preferred in embedded SQL programs?

在嵌入式SQL程序中,为什么SELECT不被首选,有什么具体原因吗?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66d2 | 官方: 否 | 付费: 否

答案:

The SELECT statement is not preferred in embedded SQL programs for 3 reasons: - If there is a change in the structure of the table by addition or deletion of a field, the program gets modified and using the SELECT statement might retrieve those columns that the user may not even use.

SELECT语句在嵌入式SQL程序中不被首选,原因有3个:- 如果通过添加或删除字段改变了表的结构,程序会被修改,而使用SELECT语句可能会检索用户甚至不使用的那些列。
  • The use of SELECT in the embedded SQL programs can lead t the input-output overhead and,
  • The chances of an index-only scan are eliminated by the use of SELECT in embedded SQL programs.

219. What is the RUN STATS that was mentioned in the previous answer?

之前答案中提到的RUN STATS是什么?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66d5 | 官方: 否 | 付费: 否

答案:

RUN STATS is a DB2 utility used to collect statistics about the data value in TABLES. It is used by the optimizer to decide the access path. RUN STATS also collects statistics that are used for space management. These statistics are stored in the DB2 catalog tables.

RUN STATS是DB2的一个实用程序,用于收集有关表中数据值的统计信息。它被优化器用来决定访问路径。RUN STATS还收集用于空间管理的统计信息。这些统计信息存储在DB2目录表中。

Usually, the RUN STATS is run after the following: - After a load.

通常,RUN STATS在以下情况之后运行:- 加载之后。
  • After a mass update.
  • After any major deletions, insertions, or
  • After REORG the table.

220. Let us say that I have a program it uses dynamic SQL. It has been working fine till now, however, lately, I have found that the performance has been affected and deteriorated. Can you guess what can be the reason behind this?

假设我有一个使用动态SQL的程序。它一直运行良好,但最近我发现性能受到影响并恶化。您能猜到这背后可能的原因吗?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66d8 | 官方: 否 | 付费: 否

答案:

There can be 2 possibilities: - RUN STATS is not done and it seems that the program is using an incorrect/wrong index due to incorrect/wrong stats.

可能有2种可能性:- 未执行RUN STATS,并且程序似乎由于不正确的统计信息而使用了不正确的索引。
  • It might also be the case that the RUN STATS has been done but the optimizer has chosen a wrong access path based on the latest statistics.

221. What are SPUFI and QMF? What is the difference between them?

什么是SPUFI和QMF?它们之间有什么区别?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66db | 官方: 否 | 付费: 否

答案:

  • SPUFI: SPUFI is an execution engine for SQL where the SQL commands are executed. Several SQL queries can be executed at once and the result of the queries can be stored in PS or PDS members. Also, the SQL is known to us even after the execution of the query.
  • QMF: It is a reporting environment and supports the formatting of reports. More than one query cannot be executed and the result of the query cannot be persisted. Also, the SQL code of the query cannot be known.

222. In a COBOL-DB2 program, where are all the SQL statements coded?

在COBOL-DB2程序中,所有SQL语句都是在何处编码的?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66de | 官方: 否 | 付费: 否

答案:

In a COBOL-DB2 program, all the statements are coded in Area B .

在COBOL-DB2程序中,所有语句都编码在B区。

223. What are ACQUIRE and RELEASE in BIND?

在BIND中,ACQUIRE和RELEASE是什么?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66e1 | 官方: 否 | 付费: 否

答案:

A certain point in a program when DB2 acquires or releases the locks against the tables and/or tablespaces. These include the intent locks as well.

程序中某个特定点,DB2获取或释放对表和/或表空间的锁。这些也包括意图锁。

224. Let us say that we have a Student Database in which we have the details of the students like their names, address, attendance percentage, etc. Now we run an SQL Query that says: SELECT AVG ATTENDANCE FROM STUDENTS.

假设我们有一个学生数据库,其中包含学生的详细信息,如姓名、地址、出勤率等。现在我们运行一个 SQL 查询:SELECT AVG ATTENDANCE FROM STUDENTS。
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66e4 | 官方: 否 | 付费: 否

答案:

Can you tell me any issues that may be here?

你能告诉我这里可能有什么问题吗?

Yes, there might be an issue. For instance, if there is such a case where we have set that the attendance of any student cannot be null and at the same time we have some students in the table whose attendance we don’t know, the AVG function will calculate these students as well. Hence, we will get an answer but, it might not be correct.

是的,可能有问题。例如,如果我们设置了任何学生的出勤率不能为空,但表中有些学生的出勤率未知,AVG 函数也会将这些学生计算在内。因此,我们会得到一个结果,但它可能不正确。

225. Is it possible for you to alter the table (adding a column to it) while some other person is accessing the table and even updating some values in it?

当其他人在访问表并甚至更新其中的某些值时,你是否有可能修改该表(向其中添加一列)?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66e7 | 官方: 否 | 付费: 否

答案:

To be short and crisp, the answer is yes, we can alter the table at the same time when some other transaction is taking place but this does not exactly happen as it sounds to be.

简要地说,答案是肯定的,我们可以在其他事务正在进行时修改表,但这并不像听起来那样简单。

The DB2 table will not change its structure in any form till a transaction or multiple transactions are taking place. The table-altering commands will be stored by the database engine and will not be executed till all the transactions are complete. After one user has modified the values in the table, then the column will be added.

在一个或多个事务正在进行期间,DB2 表不会以任何形式改变其结构。表修改命令会被数据库引擎存储,直到所有事务完成才会执行。在一个用户修改了表中的值之后,才会添加该列。

226. What is the maximum length of SQLCA?

SQLCA 的最大长度是多少?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66ea | 官方: 否 | 付费: 否

答案:

The maximum length of SQLCA is 136 .

SQLCA 的最大长度是 136。

227. Do you know any programming language where more than one SQLCA is used?

你知道有没有编程语言使用多个 SQLCA?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66ed | 官方: 否 | 付费: 否

答案:

Yes, FORTRAN applications require more than one SQLCA.

是的,FORTRAN 应用程序需要多个 SQLCA。

228. How many SQLCA must be provided to an application that contains SQL statements (executable)?

包含可执行 SQL 语句的应用程序必须提供多少个 SQLCA?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66f0 | 官方: 否 | 付费: 否

答案:

Only one SQLCA is needed for an application that contains executable SQL statements. However, SQLCA is not applicable to Java applications.

包含可执行 SQL 语句的应用程序只需要一个 SQLCA。然而,SQLCA 不适用于 Java 应用程序。

229. What is SQLCA?

什么是 SQLCA?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66f3 | 官方: 否 | 付费: 否

答案:

The full form of SQLCA is the SQL communication area or Structured Query Language Communication Area. It is a structure of variables that is updated after every execution of an SQL statement.

SQLCA 的全称是 SQL 通信区或结构化查询语言通信区。它是一个变量结构,在每次执行 SQL 语句后更新。

230. Can more than one cursor be opened in a program?

一个程序中可以打开多个游标吗?
  • 知识点: 大型机与遗留系统 / 数据库 (主题: db2, database;标签: interviewbit, db2, topic-specific, database)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37a6b58d557c902ba66f6 | 官方: 否 | 付费: 否

答案:

Yes, more than one cursor can be opened in the same program.

是的,同一个程序中可以打开多个游标。

231. What are different ways in which data can be passed to a COBOL program from JCL?

从 JCL 向 COBOL 程序传递数据的不同方式有哪些?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e64 | 官方: 否 | 付费: 否

答案:

The following methods can be used to pass data from JCL to COBOL: - SYSIN DD statement: Data can either be provided directly in SYSIN or as a file. If we want to read that in COBOL, we use the ACCEPT keystroke.

以下方法可用于将数据从JCL传递到COBOL:- SYSIN DD语句:数据可以直接在SYSIN中提供,也可以作为文件提供。如果我们要在COBOL中读取该数据,我们使用ACCEPT按键。
  • PARM parameter: On the JCL EXEC statement, we use PARM='Parameter value' to pass input from JCL to the program. In COBOL, this can be done in the Linkage section.

232. What do you mean by “Cond=even” and “Cond=only”?

你说的“Cond=even”和“Cond=only”是什么意思?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e67 | 官方: 否 | 付费: 否

答案:

CODE-EVEN: By coding COND=EVEN, the current job step is executed regardless of whether the previous steps have terminated abnormally. In the case of other RC conditions (return code conditions) being coded alongside COND=EVEN, the job step will execute if none of the RC conditions is true.

CODE-EVEN:通过编码COND=EVEN,无论之前的步骤是否异常终止,当前作业步骤都会执行。如果其他RC条件(返回码条件)与COND=EVEN一起编码,那么当没有任何RC条件为真时,作业步骤将执行。

CODE-ONLY: By coding COND=ONLY, the current job step will only be executed when one of the previous steps terminates abnormally. In the case of other RC conditions being coded alongside COND=ONLY, the job step will execute when none of the RC conditions is true and any previous job steps are abnormally failed.

CODE-ONLY:通过编码COND=ONLY,当前作业步骤只有在之前的某个步骤异常终止时才会执行。如果其他RC条件与COND=ONLY一起编码,那么当没有任何RC条件为真且之前的任何作业步骤异常失败时,作业步骤将执行。

233. Explain utilities in JCL.

解释JCL中的实用程序。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e6a | 官方: 否 | 付费: 否

答案:

JCL utilities are pre-written programs that are widely used by system programmers and application developers to meet day-to-day requirements, organize and maintain data. Reorganizing, modifying, or comparing data at the record or data set level is done with them. Here are a few of them, along with their functionality: - IDCAMS: Although IDCAMS provides other functions, it is primarily used for defining and managing VSAM data sets and integrated catalog facilities catalogs.

JCL实用程序是预编写的程序,系统程序员和应用程序开发人员广泛使用它们来满足日常需求、组织和管理数据。它们用于在记录或数据集级别重新组织、修改或比较数据。以下是其中几个及其功能:- IDCAMS:虽然IDCAMS提供其他功能,但它主要用于定义和管理VSAM数据集以及集成目录设施目录。
  • IEBCOPY: This program copies one or more members of an existing dataset onto a new or existing PDS dataset. It also compresses PDS, loads PDS to TAPE, and unloads from TAPE onto DISK.
  • IEBGENER: Often used for copying or printing sequential data sets, it is also a tool for copying TAPE files to DISK and vice versa.
  • IEBUPDTE: This utility can create new members within a partitioned data set, or update records within an existing member. This is mostly used to create or maintain assembler macro libraries and JCL procedure libraries.
  • IEHMOVE: It is typically used to move datasets between volumes.

234. Explain the usage of coding class parameters in JCL.

解释JCL中编码类参数的用法。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e6d | 官方: 否 | 付费: 否

答案:

In JCL, the CLASS is a keyword parameter that is used to classify the jobs that run in a particular OS installation. CLASS informs the operating system about the nature of the job that is being submitted. It prevents contention between jobs that use the same resource. A parameter like this aids in balancing the load of all the jobs running in an environment. It can also be used to prioritize the execution of jobs.

在JCL中,CLASS是一个关键字参数,用于对在特定操作系统安装中运行的作业进行分类。CLASS告知操作系统所提交作业的性质。它防止使用同一资源的作业之间发生争用。这样的参数有助于平衡环境中运行的所有作业的负载。它也可以用于确定作业执行的优先级。

Syntax:

语法:

CLASS= JOB-CLASS

CLASS=作业类
Below are the possible values for the JOB-CLASS: - Any character from A to Z
以下是JOB-CLASS的可能值:- 从A到Z的任何字符
  • Any number from 0 to 9
    Example:

    示例:

//JCL1234 JOB ‘max021’,’Ashish’CLASS=A

//JCL1234 JOB ‘max021’,’Ashish’CLASS=A

235. What do you mean by PROC? State difference between an instream and a catalogued Proc.

你说的PROC是什么意思?说明流内过程与目录化过程之间的区别。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e70 | 官方: 否 | 付费: 否

答案:

PROC represents Procedure. A JCL Procedure is a collection of statements within a JCL that perform a particular function. The JCL Procedures work the same way as language compilers and linkage editors across multiple JCL's. The EXEC statement may be used directly to code the procedure instead of the PROC keyword.

PROC代表过程。JCL过程是JCL中执行特定功能的一组语句。JCL过程的工作方式与语言编译器链接编辑器跨多个JCL时相同。EXEC语句可以直接用于编码过程,而不需要PROC关键字。

Syntax:

语法:

//Step-name EXEC PROC=Procedurename

//Step-name EXEC PROC=过程名
Or
或者
//Step-name EXEC Procedurename
//Step-name EXEC 过程名
Here, - Step-name specifies the assigned name to step.
这里,- Step-name指定分配给步骤的名称。
  • EXEC specifies the type of JCL statement.
  • PROC specifies Procedure name.
    Example 1:

    示例1:

//STEP05  EXEC PROC=MTHPROC

//STEP05 EXEC PROC=MTHPROC
Or
或者
//STEP05  EXEC MTHPROC
//STEP05 EXEC MTHPROC
Use of PROC - It eliminates repetitive coding.
使用PROC - 它消除了重复编码。
  • Code errors are eliminated.
  • Eliminates redundancy.
    Types of procedures - In-Stream Procedures: In-stream procedures are those written within the same JCL. Ideally, it should begin with a PROC statement and end with a PEND statement.

    过程类型 - 流内过程:流内过程是写在同一个JCL中的过程。理想情况下,它应以PROC语句开始,并以PEND语句结束。
  • Cataloged Procedures: A cataloged procedure is one that is separated from the JCL and coded in a different data store.

236. Can you code instream data in PROC.

你能在PROC中编码流内数据吗。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e73 | 官方: 否 | 付费: 否

答案:

No, it is not possible to use instream data inside a PROC. This is a rule. It is usually better to code a few dummy statements inside the PROC and override the DD statements from the JCL before executing it.

不,不可能在PROC内部使用流内数据。这是一条规则。通常更好的做法是在PROC内部编码一些虚拟语句,并在执行前从JCL中覆盖DD语句。

237. What do you mean by abends in JCL? Write different JCL abend codes.

JCL中的异常终止是什么意思?写出不同的JCL异常终止代码。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e77 | 官方: 否 | 付费: 否

答案:

Using the SUBMIT command, the operating system will be informed about the work to be done in JCL. An abend occurs when a program terminates abnormally during a step. Some of the JCL Abend codes are listed below: - S0C4: Storage violation error due to a subscript that is out of range.

使用SUBMIT命令,操作系统将被告知在JCL中要完成的工作。当程序在某个步骤中异常终止时,就会发生异常终止。下面列出了一些JCL异常终止代码: - S0C4:由于下标超出范围而导致的存储冲突错误。
  • S0C5: This is caused by an invalid address specification, i.e., the address points to a control word, instruction, or data that cannot be cached.
  • S0C7: Bad data causes this error, known as a Data Exception. Whenever we're converting an alphanumeric field to a numeric computational field, we encounter this problem.
  • S222: This error occurs when the operator cancels a job because the program requests an unavailable resource.
  • S237: This error occurs when the end of the volume is reached.
  • S322: This error occurs when CPU time allocated to a job, job step, or procedure has exceeded the limit, i.e., Timeout error.
  • S522: This error occurs if the waiting state exceeds the installation-defined time limit.
  • SB37: This error occurs when there is insufficient disk space (End of volume with no further volume specified).
  • SD37: This error occurs when there is insufficient disk space (the secondary allocation has not been specified).
  • SE37: This error occurs when there is insufficient disk space (max. 16 extents are currently allocated).

238. Explain NOTCAT 2- GS.

解释NOTCAT 2-GS。
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e7e | 官方: 否 | 付费: 否

答案:

Basically, NOTCAT 2-GS is an MVS (Multiple Virtual Storage) message indicating the existence of duplicate catalog data. This would happen, for instance, if we already had a dataset with DSN = 'xxxx.yyyy' and wanted to create a new one with disp new, catlg. In this case, we can correct the situation by deleting the first data set and cataloguing the new data set on the volume where it resides.

基本上,NOTCAT 2-GS是MVS(多重虚拟存储)消息,表示存在重复的目录数据。例如,如果我们已经有一个DSN = 'xxxx.yyyy'的数据集,并想创建一个新的数据集,使用disp new, catlg,就会出现这种情况。在这种情况下,我们可以通过删除第一个数据集并在其所在的卷上编目新数据集来纠正此状况。

239. What is the usage of the Include statement in JCL?

JCL中INCLUDE语句的用途是什么?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e82 | 官方: 否 | 付费: 否

答案:

INCLUDE statements can be used to identify and include a set of JCL statements coded within a member of a PDS (Partitioned data set) into a JCL stream. For example, some of the common files used in many JCLs can be coded as DD statements within an INCLUDE member and used within the JCL.

INCLUDE语句可用于识别并将在PDS(分区数据集)成员中编码的一组JCL语句包含到JCL流中。例如,许多JCL中常用的一些公共文件可以被编码为INCLUDE成员中的DD语句,并在JCL中使用。

Syntax:

语法:

//name INCLUDE MEMBER=member-name

//name INCLUDE MEMBER=member-name
An INCLUDE statement cannot contain a dummy DD statement, a data card specification, or JOB, PROC statements. Within an INCLUDE member, an INCLUDE statement may be coded, and nesting may go up to 15 levels.
INCLUDE语句不能包含虚拟DD语句、数据卡规范或JOB、PROC语句。在INCLUDE成员中,可以编码INCLUDE语句,嵌套级别最多可达15层。

240. What happens when COND is coded in JOB statement and EXEC statement?

当COND编码在JOB语句和EXEC语句中时会发生什么?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e86 | 官方: 否 | 付费: 否

答案:

In JCL, a COND parameter can be incorporated into the JOB statement or EXEC statement. This parameter can be used to skip steps based on return codes from previous steps. Here, we are testing the return code from the previous job steps. In the event that the test is deemed to be true, the current job step execution is bypassed. Bypassing a job step is not an abnormal termination, but simply an omission. - COND is coded in JOB statement: Every step of the job is tested when COND is coded into a JOB statement. At any given job step, if the condition is true, it is bypassed along with the subsequent steps.

在JCL中,COND参数可以合并到JOB语句或EXEC语句中。此参数可用于根据先前步骤的返回代码跳过步骤。在这里,我们测试先前作业步骤的返回代码。如果测试被视为真,则当前作业步骤的执行将被跳过。跳过作业步骤不是异常终止,而仅仅是一种省略。- COND编码在JOB语句中:当COND编码在JOB语句中时,作业的每个步骤都会被测试。在任何给定的作业步骤中,如果条件为真,则该步骤及其后续步骤将被跳过。
  • COND is coded in EXEC statement: In case COND is coded in the EXEC statement of a job step and finds to be true, only that job step will be skipped, and execution will continue from the next job step.
    Example:

    示例:

//MATEKSD JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID, COND=(0,NE)

//MATEKSD JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID, COND=(0,NE)
//STEP01 EXEC PGM=CONDPGM1
//STEP01 EXEC PGM=CONDPGM1
//STEP02 EXEC PGM=CONDPGM2,COND=(0,EQ)
//STEP02 EXEC PGM=CONDPGM2,COND=(0,EQ)
//STEP03 EXEC PGM=CONDPGM3,COND=(4,EQ)
//STEP03 EXEC PGM=CONDPGM3,COND=(4,EQ)
Explanation of COND=(0 NE)
COND=(0 NE) 的说明

As you can see, the COND parameter is set to (0,NE) at the JOB level. In particular, it will check if the return code 0 does not equal the return code of any of the steps in JCL? If this is true, then the job should be terminated. As a result, if any of the steps (such as STEP01, STEP02, or STEP03) returns a non-zero return code, this condition will be true and the job will be terminated.

如您所见,COND参数在作业级别设置为(0,NE)。具体来说,它将检查返回代码0是否不等于JCL中任何步骤的返回代码?如果为真,则作业应终止。因此,如果任何步骤(如STEP01、STEP02或STEP03)返回非零返回代码,此条件将为真,作业将被终止。

241. Explain DISP=(NEW,PASS,DELETE)?

解释 DISP=(NEW,PASS,DELETE)?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e89 | 官方: 否 | 付费: 否

答案:

We use DISP=(NEW, PASS, DELETE) to create temporary data sets. DISP NEW allocates space and creates a new data set. Once the current step has been successfully completed, DISP PASS passes the data set to the next step. Once the step abends, DISP DELETE removes the available data set so that only non-abended data sets remain.

我们使用DISP=(NEW, PASS, DELETE)来创建临时数据集。DISP NEW分配空间并创建新数据集。当前步骤成功完成后,DISP PASS将数据集传递给下一步骤。一旦步骤异常终止,DISP DELETE会删除可用数据集,因此只保留未异常终止的数据集。

242. What is the significance of using the "//" symbol in JCL?

在JCL中使用“//”符号有什么意义?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e8d | 官方: 否 | 付费: 否

答案:

It is an important symbol used in JCL statements since every JCL statement must begin with it. JCL statements must satisfy this rule in order to execute properly. Otherwise, the JCL statement will fail. During JCL execution, the system checks for the symbol (//) at the beginning of each statement. This prevents runtime exceptions.

这是JCL语句中一个重要的符号,因为每条JCL语句都必须以它开头。JCL语句必须满足此规则才能正确执行。否则,JCL语句将失败。在JCL执行期间,系统会检查每条语句开头的符号(//)。这可防止运行时异常。

Example:

示例:

//STEP010 EXEC PGM=MYCOBOL,PARAM=CUST1000

//STEP010 EXEC PGM=MYCOBOL,PARAM=CUST1000
Here, - // is the identifier of the JCL statement.
这里,- // 是JCL语句的标识符。
  • STEP010 is the name assigned to the job step.
  • PGM specifies program name.
  • PARAM passes input data to the program.

243. What do you mean by Condition checking in JCL?

JCL中的条件检查是什么意思?
  • 知识点: 大型机与遗留系统 (主题: jcl, mainframe;标签: interviewbit, jcl, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37b7858d557c902bb0e91 | 官方: 否 | 付费: 否

答案:

Yes, condition checking is possible in JCL, both at the job level and at the step level. Obviously, this is done using the COND keyword along with a return code and operand that are defined in JCL. The concept of conditional checking is similar to the concept of (if else) in many programming languages (such as C, C++, Java, etc.).

是的,条件检查在JCL中是可行的,既可以在作业级别,也可以在步骤级别。显然,这是通过使用COND关键字以及JCL中定义的返回代码和操作数来完成的。条件检查的概念类似于许多编程语言(如C、C++、Java等)中(if else)的概念。

Syntax:

语法:

COND=(RC,OP)

COND=(RC,OP)
COND=(RC,OP,STEPNAME)
COND=(RC,OP,STEPNAME)
COND=EVEN
COND=EVEN
COND=ONLY
COND=ONLY
Here, RC stands for Return code, OP for Operator, and STEPNAME for Step name.
这里,RC代表返回码,OP代表操作符,STEPNAME代表步骤名称。

RC can be assigned any value from 0 to 4095, but in most cases, it will be assigned a value from 0 to 16 as follows:

RC可以被赋值为从0到4095之间的任意值,但在大多数情况下,会被赋值为从0到16之间的值,具体如下:

0 (Successful execution of a program i.e., Normal execution).

0(程序成功执行,即正常执行)。

4 (Successful execution of a program with some warning).

4(程序成功执行但带有某些警告)。

8 (Error)

8(错误)

12 (Severe Error)

12(严重错误)

16 (Fatal Error)

16(致命错误)

‘OP’ can be any one of the following:

“OP”可以是以下任意一项:

EQ (Equal to)

EQ(等于)

NE (Not Equal to)

NE(不等于)

LT (Less than)

LT(小于)

LE (Less than or Equal to)

LE(小于或等于)

GT (Greater than)

GT(大于)

GE (Greater than or Equal to)

GE(大于或等于)

244. What are the different stages of processing a job?

处理作业的不同阶段有哪些?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fae | 官方: 否 | 付费: 否

答案:

JCL is used for processing work by the z/OS system by defining which program needs to be executed, what resources need to be allocated, etc. The description of work specified is called a job. z/OS system makes use of JES (Job Entry Subsystem) that receives jobs into the OS, schedules them and processes them, and controls their output.

JCL用于z/OS系统处理工作,通过定义需要执行的程序、需要分配的资源等。所指定的工作描述称为作业。z/OS系统利用JES(作业输入子系统)将作业接收到操作系统中,调度并处理它们,并控制其输出。

Following are the phases of job processing:

以下是作业处理的阶段:
  • Input Phase: This is a phase for inputting the jobs utilizing using input devices like remote terminals, card readers, job entry networks, etc. We can also use internal readers that can be used by other programs for submitting the job, providing commands and control statements to JES2.Whenever JES2 reads the input stream, a job identifier is assigned to each job and places every job’s JCL, control statements, SYSIN data etc onto DASD datasets which are called spool data sets. The spool has direct access to the datasets and provides the capability to perform simultaneous job processing and also provides a temporary storage area for incomplete jobs. JES2, later on, selects jobs from this spool and processes them.
  • Conversion Phase: This phase involves the usage of a converter program for analyzing every JCL statement and does the task of checking program syntax.
    JES can also determine if JCL has any procedure calls. If there are any, then the convertor does the task of taking the job’s JCL, merges it with JCL by making use of the procedural library like SYS1.PROCLIB and converts composite JCL to internal text which is then stored in a spool.

    JES还可以确定JCL是否有任何过程调用。如果有,转换器会执行任务,获取作业的JCL,利用过程库(如SYS1.PROCLIB)将其与JCL合并,并将合并后的JCL转换为内部文本,然后存储在假脱机中。
    During this conversion, if any errors are identified, then JES2 sends out appropriate error messages and queues them for output processing.
    在此转换过程中,如果识别到任何错误,JES2会发送相应的错误消息,并将它们排队进行输出处理。
    In case there are no errors in the job, then the job is queued for further processing based on the priority of its class.
    如果作业中没有错误,则作业会根据其类别的优先级排队进行进一步处理。
  • Execution Phase: In this phase, the initiators are started either automatically or employing an operator at the time of system initialization. Once the initiator is ready, a job is requested from JES2 for execution.
    JES2 selects the job and assigns it to the initiator based on the priority assigned for the order of execution.

    JES2根据为执行顺序分配的优先级选择作业,并将其分配给启动器。
    The initiator invokes the interpreter for building the control blocks from the internal text created in the earlier step. It also allocates resources that are required for running the job.
    启动器调用解释器,从先前步骤创建的内部文本中构建控制块。它还会分配运行作业所需的资源。
    Once sufficient resources are allocated, the program starts its execution as requested in the JCL EXEC statement.
    一旦分配了足够的资源,程序就会按照JCL EXEC语句中的要求开始执行。
  • Output Phase: Post the execution of the program, output processing is done for sending out system messages to the user. The job’s output characteristics are analyzed by JES2 based on the requirements and then queues for printing or punch processing. This queue is called an output queue which can contain records that require local or remote processing.Once the output processing is complete, the jobs are sent to the purge queue and made ready for the purge phase.
  • Purge Phase: Post-processing of the job, JES2 picks it from the purge queue and releases the resources and spool space of the job to make it available for upcoming jobs. The purge indicator message will then be sent to the OS from the system.

245. What happens if both STEPLIB and JOBLIB statements are specified?

如果同时指定了STEPLIB和JOBLIB语句,会发生什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fb1 | 官方: 否 | 付费: 否

答案:

  • JOBLIB is a DD statement that determines the program location that is called EXEC statement. The statement applies to all the steps of the entire job but can not be used for catalogued procedures.
  • STEPLIB is similar to JOBLIB and is used for determining the dataset where the program is present. It applies only to the step that it is part of and not the whole job. This can be used at any step in the job and also in catalogued procedures.
  • If both STEPLIB and JOBLIB are used, then priority is given to STEPLIB thereby ignoring JOBLIB by the system.

246. How to handle deadlock (-911 Error) in DB2 program?

如何在DB2程序中处理死锁(-911错误)?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fb4 | 官方: 否 | 付费: 否

答案:

Deadlock occurs in the case where two or more mainframe programs get an exclusive lock on the resource which cant execute until the data is accessed. In case the error occurs, we can roll back the current work unit of any one of the programs after a specified preset deadlock time interval and thereby terminating the program.

死锁发生在两个或多个大型机程序对资源获取独占锁的情况下,该资源在数据被访问之前无法执行。如果发生错误,我们可以在指定的预设死锁时间间隔后回滚任何一个程序的当前工作单元,从而终止该程序。

247. How will you repair the SOC-7 error?

如何修复SOC-7错误?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fb7 | 官方: 否 | 付费: 否

答案:

The most common cause of SOC-7 error is problematic data associated with an uninitialized numeric item. We can get hold of dumps of run-time abends by performing some setups like invoking Operating System Services using assembly languages. Using these dumps, we can get the exact location of instruction where the abend has occurred. Using this, we can verify the XREF output that lists the compilation to get the line number and verb of the source code of the instruction error offset. Runtime dumps can be captured by defining datasets as Sysabout (for example) in JCL. We can also make use of the debugging utilities provided by the setups. When none of the methods is working, we need to find the error location by making use of good judgement and understanding of the system developed.

SOC-7错误最常见的原因是未初始化数值项相关的有问题的数据。我们可以通过一些设置(如使用汇编语言调用操作系统服务)来获取运行时异常的转储。利用这些转储,我们可以获得异常发生的确切指令位置。由此,我们可以验证XREF输出,列出编译信息,以获得错误指令偏移的源代码行号和动词。运行时转储可以通过在JCL中定义数据集(例如Sysabout)来捕获。我们还可以利用设置提供的调试工具。当所有方法都不起作用时,我们需要利用良好的判断力和对系统开发的理解来找到错误位置。

248. What are the various forms of Evaluate Statements?

评估语句有哪些各种形式?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fba | 官方: 否 | 付费: 否

答案:

EVALUATE Statements are of different types: - Simple EVALUATE: This type of EVALUATE has only one condition for validation. It does so by validating the item in the WHEN phrase, if the item matches, then the statement below the WHEN phrase would get executed.

评估语句有不同类型: - 简单评估:这种类型的评估只有一个用于验证的条件。它通过在WHEN短语中验证项目来实现,如果项目匹配,则WHEN短语下方的语句将被执行。
EVALUATE DAY
EVALUATE DAY
WHEN 01
WHEN 01
DISPLAY 'MONDAY'
显示 'MONDAY'
WHEN 03
WHEN 03
DISPLAY 'WEDNESDAY'
显示 'WEDNESDAY'
WHEN 05
WHEN 05
DISPLAY 'FRIDAY'
DISPLAY 'FRIDAY'
WHEN OTHER
其他情况时
DISPLAY 'Not alternate'
显示 'Not alternate'
END-EVALUATE - EVALUATE TRUE: This type has boolean expressions and the WHEN phrases had logical expressions. If EVALUATE condition is True, then statements under WHEN where logical expression evaluates to TRUE is executed. If none of the WHEN evaluates to TRUE, then WHEN OTHER is executed.
END-EVALUATE - EVALUATE TRUE:此类型包含布尔表达式,且WHEN短语包含逻辑表达式。如果EVALUATE条件为True,则执行WHEN下逻辑表达式计算为TRUE的语句。如果没有WHEN计算为TRUE,则执行WHEN OTHER。
EVALUATE TRUE
EVALUATE TRUE
WHEN WEEKDAY EQUAL 01
WHEN WEEKDAY EQUAL 01
DISPLAY 'MONDAY'
显示 'MONDAY'
WHEN WEEKDAY EQUAL 03
WHEN WEEKDAY EQUAL 03
DISPLAY 'WEDNESDAY'
显示 'WEDNESDAY'
WHEN WEEKDAY EQUAL 05
WHEN WEEKDAY EQUAL 05
DISPLAY 'FRIDAY'
DISPLAY 'FRIDAY'
WHEN OTHER
其他情况时
DISPLAY 'NOT ALTERNATIVE'
DISPLAY 'NOT ALTERNATIVE'
END-EVALUATE - EVALUATE having THRU: EVALUATE THRU type is used for validating data where values are from a given range in contiguous and ascending order. The data item in the EVALUATE statement should belong to a range of values specified in the WHEN phrase to execute the statements. If values do not belong to the range, then statements under WHEN OTHER gets executed.
END-EVALUATE - 具有THRU的EVALUATE:EVALUATE THRU类型用于验证数据,其中值来自给定范围,且顺序连续且升序。EVALUATE语句中的数据项应属于WHEN短语中指定的值范围,以执行语句。如果值不属于该范围,则执行WHEN OTHER下的语句。
EVALUATE TOTAL-MARKS
EVALUATE TOTAL-MARKS
WHEN 70 THRU 100
WHEN 70 THRU 100
DISPLAY 'DISTINCTION'
DISPLAY 'DISTINCTION'
WHEN 50 THRU 69
WHEN 50 THRU 69
DISPLAY 'FIRST CLASS'
DISPLAY 'FIRST CLASS'
WHEN 30 THRU 49
WHEN 30 THRU 49
DISPLAY 'SECOND CLASS'
DISPLAY 'SECOND CLASS'
WHEN OTHER
其他情况时
DISPLAY 'DID NOT PASS'
显示'未通过'
END-EVALUATE - EVALUATE having multiple WHEN conditions: This type is used for validating data items with a set of different values which require the same action to be performed. The WHEN statements are grouped and a set of steps to be executed is written. If anyone WHEN phrase gets matched, then the statements are executed.
END-EVALUATE - 具有多个WHEN条件的EVALUATE:此类型用于验证数据项,其中包含一组不同的值,这些值需要执行相同的操作。WHEN语句被分组,并编写一组要执行的步骤。如果任何WHEN短语匹配,则执行这些语句。
EVALUATE TOTAL-GRADE
EVALUATE TOTAL-GRADE
WHEN 'A'
WHEN 'A'
WHEN 'B'
当为'B'时
WHEN 'C'
当为'C'时
DISPLAY 'PASS'
显示'通过'
WHEN OTHER
其他情况时
DISPLAY 'DID NOT PASS'
显示'未通过'
END-EVALUATE - EVALUATE having MULTIPLE conditions: This type of EVALUATE is used for validating a set of multiple conditions which are combined by using ALSO. The number of objects in the WHEN phrase should be equal to the number of subjects in EVALUATE. If all expressions specified in WHEN is satisfied, then the statements below that WHEN is executed.
END-EVALUATE - 具有多个条件的EVALUATE:这种类型的EVALUATE用于验证一组通过使用ALSO组合的多个条件。WHEN短语中的对象数量应等于EVALUATE中的主体数量。如果WHEN中指定的所有表达式都满足,则执行该WHEN下方的语句。
EVALUATE TRUE ALSO TRUE
评估 TRUE 也评估 TRUE
WHEN AGE > 018 ALSO GENDER = 'M'
当年龄 > 018 且性别 = 'M'
DISPLAY 'Man can Vote'
显示'男性可以投票'
WHEN AGE > 018 ALSO GENDER = 'F'
当年龄 > 018 且性别 = 'F'
DISPLAY 'Woman can Vote'
显示'女性可以投票'
WHEN AGE > 018 ALSO GENDER = 'U'
当年龄 > 018 且性别 = 'U'
DISPLAY 'Person can vote'
显示'人可以投票'
WHEN OTHER
其他情况时
DISPLAY 'Cant vote'
显示'不能投票'
END-EVALUATE
END-EVALUATE

249. What steps do you follow to create a COBOL program?

创建 COBOL 程序时,您遵循哪些步骤?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fbd | 官方: 否 | 付费: 否

答案:

  • Create all necessary tables in the database.
  • Create DCLGEN (Declaration Generator). This is an optional step. Perform it only if needed.

    1. 创建 DCLGEN(声明生成器)。这是可选步骤。仅在需要时执行。
  • Pre-compile the program.

    1. 对程序进行预编译。
  • Compile the program and perform Link Edit.

    1. 编译程序并执行链接编辑。
  • Perform DB2 BIND.

    1. 执行 DB2 绑定。
  • Execute the Program.

    1. 执行程序。

250. What is the importance of coding COMMITS in batch programs?

在批处理程序中编写 COMMIT 的重要性是什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fc0 | 官方: 否 | 付费: 否

答案:

COMMIT statements are used for releasing locks that are needed for that particular work unit and then allow new work units. In case, COMMITS are not part of the program, then during processing of the program, it has to go back to the inserts that were made during the program run instead of going back to few inserts near the most recent commit. This process takes 2 or 3 times extra time than the time taken for program execution.

COMMIT 语句用于释放特定工作单元所需的锁,然后允许新的工作单元。如果程序中不包含 COMMIT,则在程序处理过程中,它必须回退到程序运行期间所做的插入操作,而不是回退到最近一次提交附近的少量插入操作。此过程比程序执行所需的时间多 2 到 3 倍。

251. How does paging work in the memory?

分页在内存中是如何工作的?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fc3 | 官方: 否 | 付费: 否

答案:

Whenever data is requested from the memory, the CPU first hits the primary memory, i.e RAM, and checks if the requested data is present on that page in the memory. If it is not present, then the CPU performs paging on secondary memory, i.e reads data from hard disk in equal blocks of memories called pages. During paging, a frame constitutes a single page of physical memory and it need not be physically contiguous. This ensures faster memory access and ensures data is fetched faster from secondary memory.

当从内存请求数据时,CPU 首先访问主内存(即 RAM),并检查请求的数据是否存在于内存中的该页上。如果不存在,则 CPU 对辅助内存执行分页,即从硬盘读取数据,按等大小的内存块(称为页)进行。在分页过程中,一个帧构成物理内存的单个页,且无需物理连续。这确保了更快的内存访问,并保证从辅助内存更快地获取数据。

252. How will you understand if your module is called statically or dynamically?

如何判断您的模块是静态调用还是动态调用?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fc6 | 官方: 否 | 付费: 否

答案:

We can understand it by looking at the linkage editor output or from the load module. In case the module is called dynamically, then that will not be part of the main module. If it is called, statically, then we can see the details of the module in the load module. There is one more type of module calling known as an IMPLICIT calling which identifies the module name by getting implications from the content of the storage variable consisting of the program name.

我们可以通过查看链接编辑器输出或加载模块来了解。如果模块是动态调用的,则它不会属于主模块的一部分。如果是静态调用的,那么我们可以从加载模块中看到该模块的详细信息。还有一种模块调用类型称为隐式调用,它通过从包含程序名的存储变量内容中获取含义来识别模块名称。

253. What are the differences between external and internal sort? What are their syntaxes?

外部排序和内部排序有什么区别?它们的语法是什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fc9 | 官方: 否 | 付费: 否

答案:

  • Internal sort is handled by the COBOL program by making use of input file, work file, and output file. Here, recompiling of the COBOL program is needed when any kind of processing is done. Internal Sort uses two types of syntaxes:
    USING, GIVING sorts use no extra file processing.

    USING、GIVING 排序不涉及额外的文件处理。
    INPUT PROCEDURE, OUTPUT PROCEDURE sorts allow data manipulation before or after sort.
    INPUT PROCEDURE、OUTPUT PROCEDURE 排序允许在排序之前或之后进行数据操作。
  • External sort is not based on COBOL and utilizes direct use of SORT utility and is performed by making use of JCL and PGM=SORT.

254. What needs to be done to ensure the program executes above 16 Meg Line?

需要做什么来确保程序在 16 兆线以上执行?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fcc | 官方: 否 | 付费: 否

答案:

We need to do the following steps: - Ensure the link option is set to AMODE=31 and RMODE=ANY.

我们需要执行以下步骤:- 确保链接选项设置为AMODE=31和RMODE=ANY。
  • Compile option does not have SIZE(MAX).
  • For efficiency, BUFSIZE can be 2K.

255. How do you pass incentives from JCL to COBOL?

如何从JCL向COBOL传递参数?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fcf | 官方: 否 | 付费: 否

答案:

This can be done by making use of the RETURN-CODE keyword which can be used for passing information to the JCL from the COBOL program. We can use it for identifying the outcome of any operation. Generally, the program activity returns 0,4,8 or 12 in cases of success or irregularities. We can change it by making use of this keyword which also ensures that the information is passed from COBOL to JCL.

这可以通过使用RETURN-CODE关键字来实现,该关键字可用于将信息从COBOL程序传递给JCL。我们可以用它来识别任何操作的结果。通常,程序活动在成功或异常情况下返回0、4、8或12。我们可以通过使用这个关键字来更改它,这也确保信息从COBOL传递到JCL。

256. How do you avoid deadlocks while reading data in Mainframe?

在大型机中读取数据时如何避免死锁?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fd2 | 官方: 否 | 付费: 否

答案:

We can do the following steps in order to avoid deadlocks: - Use FOR UPDATE clause which ensures that U lock is set when a process tries reading data during select operation. This clause does not allow row-blocking.

我们可以执行以下步骤以避免死锁:- 使用FOR UPDATE子句,该子句确保在select操作期间进程尝试读取数据时设置U锁。此子句不允许行阻塞。
  • Use the following clauses in queries that ensure U lock is set when a process tries to read the data and allows row-blocking:
    WITH RR or WITH RS

    WITH RR或WITH RS

USE AND KEEP UPDATE LOCKS

使用并保持更新锁

257. Difference between index and subscript.

索引和下标之间的区别。
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fd5 | 官方: 否 | 付费: 否

答案:

Index
索引
Subscript
下标
Index represents the number of displacement positions of the array.
索引表示数组的位移位置数。
Subscript is the number of occurrences of the array.
下标是数组的出现次数。
Index does not require a separate declaration. INDEX BY is used to declare index.
索引不需要单独的声明。INDEX BY用于声明索引。
Subscript requires separate declaration with S9(04) COMP in WORKING-STORAGE SECTION.
下标需要在WORKING-STORAGE SECTION中使用S9(04) COMP进行单独声明。
Helps in faster access of data in the table.
有助于更快地访问表中的数据。
Is slower in accessing data items.
访问数据项时较慢。
Uses SET statement to initialize index.
使用SET语句初始化索引。
Uses MOVE statement to initialize subscript.
使用MOVE语句初始化下标。
Can decrease by using SET DOWN BY statement and SET UP BY statement is used to increase index.
可以使用SET DOWN BY语句减小,并且SET UP BY语句用于增加索引。
ADD statement is used to increase subscript and SUBTRACT is used to decrease it.
ADD语句用于增加下标,SUBTRACT用于减小它。

258. How many types of locks are there and what are their functions?

锁有几种类型,它们的功能是什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: coding
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fd8 | 官方: 否 | 付费: 否

答案:

There are 3 types of locks. - Shared lock: – This lock can ensure that two or more mainframe programs can read from the locked resource at a time but modifying is not allowed.

有3种类型的锁。- 共享锁:- 此锁可以确保两个或多个大型机程序同时从锁定的资源中读取,但不允许修改。
This lock is also called a read lock as it is used only for reading data items. Since these are read locks, they support read integrity and ensures that when a record is being read, that won't be updated. Shared locks can also be used to prevent any kind of updates of record. Consider a scenario where we have A=100 initially and we have 2 transactions that want to read A. If one among them wants to update or modify A, then there are chances where the other transaction would read the wrong value. Here, if we use a shared lock, the data updation would be prevented until the transaction has completed reading. - Update lock: – This lock allows the program to use the shared or locked resource to change it.
此锁也称为读锁,因为它仅用于读取数据项。由于这些是读锁,它们支持读完整性,并确保当记录正在被读取时,不会被更新。共享锁也可用于防止对记录的任何类型的更新。考虑一个场景,我们初始有A=100,并且有2个事务想要读取A。如果其中一个想要更新或修改A,那么另一个事务可能会读取错误的值。在这里,如果我们使用共享锁,在事务完成读取之前,数据更新将被阻止。- 更新锁:- 此锁允许程序使用共享或锁定的资源来更改它。
This lock requires TABLESPACE OR LOCKSIZE TABLE along with cursor-based SELECT having FOR UPDATE OF clause. A table with this lock allows data read but does not allow modification of the locked data. Whenever the application tries to update the data, the U lock will be promoted to Exclusive Lock. - Exclusive lock: – This lock restricts all user types to access locked space.Consider an example where A=100 initially, and we have a transaction that wants to deduct some value say 25 from A. This can be allowed by placing an exclusive lock on A so that whenever any other transaction wants to read or write from it, the lock prevents it.
此锁需要TABLESPACE或LOCKSIZE TABLE以及具有FOR UPDATE OF子句的基于游标的SELECT。具有此锁的表允许数据读取,但不允许修改锁定的数据。每当应用程序尝试更新数据时,U锁将被提升为排他锁。- 排他锁:- 此锁限制所有用户类型访问锁定的空间。考虑一个示例,其中A=100初始,并且我们有一个事务想要从A中扣除某个值,比如25。这可以通过在A上放置排他锁来允许,这样每当任何其他事务想要从中读取或写入时,锁都会阻止它。

259. What is the importance of the DCB parameter in DD statements?

DD语句中DCB参数的重要性是什么?
  • 知识点: 大型机与遗留系统 (主题: mainframe;标签: interviewbit, mainframe, topic-specific)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37bc158d557c902bb3fdb | 官方: 否 | 付费: 否

答案:

DCB stands for Data Control Block . DCB parameter in DD (Data definition) statements helps to detail out the physical characteristics of datasets that are newly created in the job step. - LRECL: signifies what is the length of record that can be held within a dataset.

DCB代表数据控制块。DD(数据定义)语句中的DCB参数有助于详细说明在作业步骤中新建数据集的物理特性。- LRECL:表示数据集内可容纳的记录长度。
  • RECFM: signifies record format type of the datasets.

260. What is the purpose of AMS in VSAM?

AMS在VSAM中的目的是什么?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc956d | 官方: 否 | 付费: 否

答案:

An AMS (Access Method Service) is a service program that performs a wide range of functions on VSAM/Non-VSAM datasets and catalogues. AMS includes a powerful utility program known as IDCAMS that can be invoked via a standard JCL and is able to carry out a slew of AMS functions through its commands. AMS deploys two kinds of commands: - Functional commands: These are commands that demand real action, like DEFINE CLUSTER, REPRO, VERIFY, DELETE, BLDINDEX, and LISTCAT.

AMS(访问方法服务)是一种服务程序,用于对VSAM/非VSAM数据集和目录执行多种功能。AMS包含一个名为IDCAMS的强大实用程序,可通过标准JCL调用,并能够通过其命令执行大量AMS功能。AMS部署了两类命令:- 功能命令:这些是需要实际操作的命令,如DEFINE CLUSTER、REPRO、VERIFY、DELETE、BLDINDEX和LISTCAT。
  • Modal commands: These are commands that specify conditions for executing functional commands such as "IF-THEN-ELSE". A TSO (Time Sharing Option) user can only use functional commands, not modal commands.

261. If a GDG exists in 3 generations, how would you reference the 1st generation in the JCL?

如果GDG存在三个世代,如何在JCL中引用第一代?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9570 | 官方: 否 | 付费: 否

答案:

Generation(0) refers to the current GDG generation, Generation(-1) refers to the GDG generation just prior to the current generation, and Generation(+1) refers to the GDG generation following the current generation. - When a GDG exists in 3 generations, then the 3rd generation is the current generation, and therefore, we refer to it using generation(0) in JCL.

Generation(0)指当前GDG世代,Generation(-1)指紧邻当前世代之前的GDG世代,而Generation(+1)指当前世代之后的GDG世代。- 当GDG存在三个世代时,第三代是当前世代,因此,我们在JCL中使用generation(0)来引用它。
  • The generation (2nd generation) right before the current generation (3rd generation) is referenced with generation(-1) in JCL.
  • Lastly, the generation (1st generation) just before the 2nd generation is referenced using generation(-2) in JCL.
    Conclusion

    结论

In the 1970s, VSAM was introduced to replace the older IBM file-access methods with greater functionality, and ease-of-use, and to reduce device-dependency issues. The organized index in VSAM makes it easy to access data, and it also supports many datasets within one cluster. For those preparing for an interview in this niche, the above-listed VSAM interview questions will be beneficial to both experienced and new candidates. With this collection of 30+ solved VSAM questions, you can prepare for technical interviews as well as online selection tests during campus placements and interviews. Having this arsenal of tricky VSAM questions in hand, you'll be able to handle objective type and multiple-choice questions on this topic with ease.

在20世纪70年代,VSAM被引入以替代较旧的IBM文件访问方法,提供更强的功能和易用性,并减少设备依赖性问题。VSAM中的组织索引使得数据访问更加容易,并且它还能在一个集群内支持多个数据集。对于正在准备这一专业领域面试的人来说,上述列出的VSAM面试问题对经验丰富的候选人和新候选人都很有帮助。借助这30多个已解答的VSAM问题,你可以为技术面试以及校园招聘和面试期间的在线选拔测试做好准备。掌握了这些棘手的VSAM问题后,你将能够轻松应对有关此主题的客观题和多项选择题。

Learning VSAM will be easier if you are conversant with COBOL, although it is not required. The attentive interviewer rarely plans to ask you a specific question during the interview; instead, they start by asking some basic questions about the subject, followed by further questions based on the discussion and your response. Candidates should have solid conceptual knowledge, as well as the ability to communicate confidently and clearly. It's a great way to build confidence and prepare for various interview scenarios by taking a mock interview. Good preparation and a bit of cleverness will easily get you through this interview.

如果你熟悉COBOL,学习VSAM会更容易,尽管这不是必需的。细心的面试官很少计划在面试中问一个具体问题;相反,他们会先问一些关于该主题的基础问题,然后根据讨论和你的回答提出进一步的问题。候选人应具备扎实的概念知识,以及自信清晰沟通的能力。通过模拟面试来建立信心并准备各种面试情境是一个很好的方法。充分的准备和一点聪明才智将让你轻松通过这次面试。

Useful Resources

有用资源
https://www.interviewbit.com/jcl-interview-questions/ https://www.interviewbit.com/cobol-interview-questions/ https://www.interviewbit.com/mainframe-interview-questions/ https://www.interviewbit.com/technical-interview-questions/
https://www.interviewbit.com/jcl-interview-questions/ https://www.interviewbit.com/cobol-interview-questions/ https://www.interviewbit.com/mainframe-interview-questions/ https://www.interviewbit.com/technical-interview-questions/

262. How are the GDG versions named?

GDG版本是如何命名的?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9573 | 官方: 否 | 付费: 否

答案:

For identifying a specific generation of a GDG, an absolute generation and version number are used. GnnnnVmm is the format of the generation and version numbers.

为了标识GDG的特定世代,使用绝对世代号和版本号。GnnnnVmm是世代号和版本号的格式。

Syntax:

语法:

ABC.PQR.XYZ.GnnnnVmm

ABC.PQR.XYZ.GnnnnVmm
Here, - XYZ.ABC.PRS.GDG represents GDG Base.
这里,- XYZ.ABC.PRS.GDG表示GDG基名。
  • Gnnnn represents the Generation number (Value range: 0000 – 9999).
  • Vmm represents Version number (Value range: 00 – 99).
    Example:

    示例:

If the GDG base name is SCALER.DATA.SAMPLE.GDG, then the datasets should be named as follows: - SCALER.DATA.SAMPLE.GDG.G0001V00

如果GDG基名是SCALER.DATA.SAMPLE.GDG,那么数据集应命名如下:- SCALER.DATA.SAMPLE.GDG.G0001V00
  • SCALER.DATA.SAMPLE.GDG.G0002V01, and so on.
    Here, - SCALER.DATA.SAMPLE.GDG.G0001V00 is the generation data set 1, version 0 in the generation data group SCALER.DATAI.SAMPLE.GDG.

    这里,- SCALER.DATA.SAMPLE.GDG.G0001V00是生成数据组SCALER.DATAI.SAMPLE.GDG中的生成数据集1,版本0。
  • SCALER.DATA.SAMPLE.GDG.G0002V01 is the generation data set 2, version 1, in the generation data group SCALER.DATA.SAMPLE.GDG.
    The latest/current version of the GDG is SCALER.DATI.SAMPLE.GDG(0). The current generation of GDG is called generation(0), previous versions are called SCALER.DATA.SAMPLE.GDG(-1), and so on. SCALER.DATA.SAMPLE.GDG(+1) is the next generation to be created after the current generation.

    GDG的最新/当前版本是SCALER.DATI.SAMPLE.GDG(0)。GDG当前世代称为generation(0),以前的版本称为SCALER.DATA.SAMPLE.GDG(-1),依此类推。SCALER.DATA.SAMPLE.GDG(+1)是当前世代之后要创建的下一个世代。

263. What is GDG in VSAM?

VSAM中的GDG是什么?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9576 | 官方: 否 | 付费: 否

答案:

Generally, a GDG (Generation Data Group) comprises a collection of related non-VSAM data sets that are chronologically arranged. These datasets are grouped together based on a common name known as the GDG base, and each dataset associated with the GDG base is called a GDG version. A GDG base can have up to 255 generations. They are highly effective tools for processing data sets created on a periodic basis, i.e., monthly, weekly, daily, and hourly. Each processing cycle results in a new generation of the dataset. GDG can be used for a myriad of purposes, such as Invoicing, Statistics, Reporting, Back-Up, Audit Trails, etc.

通常,GDG(生成数据组)由一组按时间顺序排列的相关非VSAM数据集组成。这些数据集根据一个共同名称(称为GDG基名)分组在一起,与GDG基名关联的每个数据集称为GDG版本。一个GDG基名最多可有255个世代。它们是处理定期创建的数据集(即每月、每周、每日和每小时)的高效工具。每个处理周期都会产生数据集的一个新世代。GDG可用于多种目的,如开票、统计、报告、备份、审计跟踪等。

264. How would you define a KSDS?

你会如何定义KSDS?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9579 | 官方: 否 | 付费: 否

答案:

To create KSDS dataset, IDCAMS DEFINE CLUSTER command is used with INDEXED parameters. A few other important parameters are RECORDSIZE, KEYS, etc.

要创建KSDS数据集,需使用带INDEXED参数的IDCAMS DEFINE CLUSTER命令。其他一些重要参数包括RECORDSIZE、KEYS等。

Syntax: Here is the JCL to create a KSDS dataset with minimum parameters.

语法:以下是使用最少参数创建KSDS数据集的JCL。

DEFINE CLUSTER (NAME(ksds-file-name) -

DEFINE CLUSTER (NAME(ksds-file-name) -
VOLUMES(volume-serial) -
VOLUMES(volume-serial) -
INDEXED -
INDEXED -
RECORDSIZE (average maximum) -
RECORDSIZE (average maximum) -
[FREESPACE(CI-Percentage,CA-Percentage)] -
[FREESPACE(CI-Percentage,CA-Percentage)] -
KEYS(length, offset) -
KEYS(length, offset) -
CISZ(number) -
CISZ(数字) -
DATA - (NAME(ksds-file-name.data)) -
DATA - (NAME(ksds-file-name.data)) -
INDEX - (NAME(ksds-file-name.index))
INDEX - (NAME(ksds-file-name.index))
Here, - INDEXED Parameter indicates that the created file is KSDS.
此处,INDEXED参数表示创建的文件是KSDS。
  • All remaining parameters are almost the same as in ESDS or KSDS.

265. What modes of access are available for the VSAM files?

VSAM文件有哪些可用的访问模式?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc957c | 官方: 否 | 付费: 否

答案:

The following three modes of access are available for VSAM files: - Sequential Access: Enter the code ACCESS IS SEQUENTIAL in the FILE-CONTROL entry for sequential access. Records within indexed files can be accessed based on the key field selected (either the primary key or an alternate key), and records within relative files can be accessed based on their relative record numbers.

VSAM文件有以下三种访问模式: - 顺序访问:在FILE-CONTROL条目中输入代码ACCESS IS SEQUENTIAL以实现顺序访问。可基于所选键字段(主键或备选键)访问索引文件中的记录,并可基于相对记录号访问相对文件中的记录。
  • Random Access: Enter the code ACCESS IS RANDOM in the FILE-CONTROL entry for random access. Records within indexed files can be accessed based on the value entered in a key field, and records within relative files can be accessed based on the value entered in the relative key.
  • Dynamic Access: Enter the code ACCESS IS DYNAMIC in the FILE-CONTROL entry for dynamic access. In dynamic access, sequential and random access are both combined within the same program. By using dynamic access, a single program can be written to perform both sequential and random operations, allowing some records to be accessed in sequential order and others based on their keys.

266. What is the best way to load a VSAM dataset with Records?

加载带记录的VSAM数据集的最佳方法是什么?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc957f | 官方: 否 | 付费: 否

答案:

Using the REPRO command, data can be loaded into a VSAM dataset. This command can also be used to copy data between VSAM data sets, as well as to copy data from sequential files to VSAM files. The IDCAMS utility loads datasets using the REPRO command.

使用REPRO命令,可将数据加载到VSAM数据集中。此命令也可用于在VSAM数据集之间复制数据,以及将数据从顺序文件复制到VSAM文件。IDCAMS实用程序使用REPRO命令加载数据集。

Syntax:

语法:

REPRO INFILE(in-ddname)

REPRO INFILE(in-ddname)
OUTFILE(out-ddname)
OUTFILE(out-ddname)
Here , - in-ddname represents the DD name of the input dataset which has records.
这里,- in-ddname 表示包含记录的输入数据集的 DD 名称。
  • out-ddname represents the DD name of the Output Dataset, into which the input dataset records will be copied.

267. What are the steps to create an Alternate Index?

创建备用索引的步骤有哪些?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9582 | 官方: 否 | 付费: 否

答案:

The steps for creating an Alternate Index are as follows:

创建备用索引的步骤如下:

Step1: Define Alternate Index

步骤1:定义备用索引

DEFINE ALTERNATEINDEX command is used to define an alternate index.

DEFINE ALTERNATEINDEX 命令用于定义备用索引。

Syntax:

语法:

DEFINE ALTERNATEINDEX -

DEFINE ALTERNATEINDEX -
(NAME(alternateindex-name) -
(NAME(备用索引名称) -
RECORDSIZE(average maximum)) -
RECORDSIZE(平均 最大)) -
FREESPACE(CI-Percentage,CA-Percentage) -
FREESPACE(CI 百分比, CA 百分比) -
RELATE(vsamfile-name) -
RELATE(VSAM 文件名) -
UPGRADE / NOUPGRADE -
UPGRADE / NOUPGRADE -
KEYS(length offset) -
KEYS(长度 偏移量) -
CISZ(number) -
CISZ(数字) -
NONUNIQUEKEY / UNIQUEKEY -
NONUNIQUEKEY / UNIQUEKEY -
DATA - (NAME(vsamfile-name.data)) -
DATA - (NAME(vsamfile-name.data)) -
INDEX - (NAME(vsamfile-name.index))
INDEX - (NAME(vsamfile-name.index))
Here, - DEFINE ALTERNATEINDEX define Alternate Index.
此处,- DEFINE ALTERNATEINDEX 定义备用索引。
  • NAME specifies the Alternate Index name.
  • RELATE specifies the VSAM cluster name for which the alternate index is created.
  • NONUNIQUEKEY / UNIQUEKEY; NONUNIQUEKEY signifies that duplicate entries may exist for the alternative index, while UNIQUEKEY indicates the alternate index is unique.
  • UPGRADE / NOUPGRADE; NOUPGRADE specifies that an alternate index shall be unchanged if the base cluster is changed, while UPGRADE specifies that it shall be modified if the base cluster is changed.
    Step2: Define Path

    步骤2:定义路径

Using the Define Path, the alternate index can be related to the base cluster. Defining a path includes specifying its name and the alternative index it is related to.

使用定义路径,备用索引可以与基本簇关联。定义路径包括指定其名称及与之关联的备用索引。

DEFINE PATH -

DEFINE PATH -
NAME(alternateindex-path-name) -
NAME(alternateindex-path-name) -
PATHENTRY(alternateindex-name))
PATHENTRY(alternateindex-name))
Here, - NAME specifies the Alternate Index Path Name
此处,- NAME 指定备用索引路径名称
  • PATHENTRY Specifies Alternate Index Name.
    Step3: Building Index

    步骤3:构建索引

The alternate index is built using the BLDINDEX command. It reads the entire VSAM indexed data set (or base cluster) and extracts essential data to build the alternate index.

备用索引使用 BLDINDEX 命令构建。它读取整个 VSAM 索引数据集(或基本簇)并提取关键数据以构建备用索引。

BLDINDEX -

BLDINDEX -
INDATASET(vsamcluster-name) -
INDATASET(vsamcluster-name) -
OUTDATASET(alternateindex-name))
OUTDATASET(alternateindex-name))
Here, - INDATASET specifies the VSAM Cluster Name
此处,- INDATASET 指定 VSAM 簇名称
  • OUTDATASET specifies the Alternate Index Name.

268. Define VSAM Alternate Index.

定义 VSAM 备用索引。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9585 | 官方: 否 | 付费: 否

答案:

Additional indexes are created for ESDS/KSDS datasets in addition to the primary index. Alternate indexes enable records to be accessed by using more than one key. The key of the alternate index is not necessarily unique; it can have duplicates.

除了主索引外,还为ESDS/KSDS数据集创建了附加索引。备用索引使得记录可以通过多个键来访问。备用索引的键不一定是唯一的;它可以有重复值。

269. Which IDCAMS commands are available for VSAM?

VSAM有哪些可用的IDCAMS命令?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9588 | 官方: 否 | 付费: 否

答案:

A number of operations can be carried out on VSAM datasets using VSAM commands. Here are some of the most useful VSAM commands: - Alter: Modifies VSAM file attributes (cluster, path, catalogue, etc.)

使用VSAM命令可以对VSAM数据集执行许多操作。以下是一些最有用的VSAM命令:- Alter:修改VSAM文件属性(簇、路径、目录等)
  • Repro: Loads the VSAM dataset with data.
  • Listcat: Obtains VSAM dataset catalogue details.
  • Verify: Checks and fixes VSAM files that have not been properly closed.
  • Print: Prints VSAM dataset’s content.
  • Delete: Delete VSAM and non-VSAM datasets, as well as the catalogues.

270. If VSAM is out of space, how do you fix the problem?

如果VSAM空间不足,如何解决该问题?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc958b | 官方: 否 | 付费: 否

答案:

If VSAM is running out of space, you can fix the issue as follows: - Create a new VSAM dataset with additional space allocated.

如果VSAM空间即将耗尽,可以按以下方式解决问题:- 创建具有额外空间分配的新VSAM数据集。
  • Copy the old VSAM file into the new VSAM dataset using the IDCAMS REPRO command.
  • Alter/rename/delete an old VSAM dataset using IDCAMS.
  • With IDCAMS, the new VSAM dataset can be altered/renamed to the original VSAM dataset's name.

271. On what basis do you choose the optimum values for CI and freespace?

您是根据什么标准来选择CI和自由空间的最佳值?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9590 | 官方: 否 | 付费: 否

答案:

The Control Interval (CI) size should depend on the length of the record and the type of processing. In most cases, CI is 4K. In cases where the record length exceeds 1K, choose CI sizes of 6K or 8K. If more insertions are anticipated, then FREESPACE (CI-percent, CA-percent) should be large. Set the value to (20-20) when updates are heavy.

控制间隔(CI)大小应根据记录长度和处理类型来决定。在大多数情况下,CI为4K。当记录长度超过1K时,选择6K或8K的CI大小。如果预期会有更多插入操作,则FREESPACE(CI百分比,CA百分比)应较大。当更新频繁时,将该值设置为(20-20)。

272. Explain CI Split and CA Split.

解释CI分割和CA分割。
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9595 | 官方: 否 | 付费: 否

答案:

CI and CA split occur when new data records are inserted. When a record is to be inserted in a CI and there is not enough space to fit it, the CI will be split. - CI SPLIT: Essentially, it refers to the movement/transfer of some records from an existing CI to a free CI within the same CA when an addition or update is not feasible in the existing CI.

CI和CA分割发生在插入新数据记录时。当一条记录要插入到CI中但没有足够空间容纳时,CI将被分割。- CI分割:本质上,它指的是当现有CI中无法进行添加或更新时,将一些记录从现有CI移动/转移到同一CA内的空闲CI。
  • CA SPLIT: It refers to the movement/transfer of half of the records from one CA to another one when an addition or update is not feasible in the existing CI. This results in two CAs that are around half full rather than one full and one empty.

273. What do you mean by Control Interval (CI) and Control Area (CA)?

控制间隔(CI)和控制区域(CA)是什么意思?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc9598 | 官方: 否 | 付费: 否

答案:

In the data component of the VSAM cluster, each data record is stored as a part of a unit called the Control Interval (CI), and each Control Interval is stored in a unit called the Control Area (CA). - Control Interval (CI): It is a contiguous storage area that VSAM uses to store data records and other control information. A block represents a unit of data being transferred between memory and storage devices in non-VSAM data management methods. CI presents a unit of data transferred between the storage device (DASD) and memory (buffer) in VSAM. A control interval size is specified at the time the cluster is defined. The size of Control Intervals is measured in bytes. For example, 2 kilobytes.

在VSAM簇的数据组件中,每条数据记录都作为称为控制间隔(CI)的单元的一部分存储,每个控制间隔存储在称为控制区域(CA)的单元中。- 控制间隔(CI):它是VSAM用来存储数据记录和其他控制信息的连续存储区域。在非VSAM数据管理方法中,块表示内存与存储设备之间传输的数据单元。在VSAM中,CI表示存储设备(DASD)与内存(缓冲区)之间传输的数据单元。控制间隔的大小在定义簇时指定。控制间隔的大小以字节为单位测量。例如,2千字节。
  • Control Area (CA): A control area consists of several CI (Control intervals). Depending on the number of records, a VSAM dataset consists of one or more CAs. Data records are grouped into CIs, and Control Intervals are grouped into CAs. Sizes of Control Areas are measured in cylinders or disk tracks.

274. What do you mean by Cluster in VSAM?

VSAM中的簇是什么意思?
  • 知识点: 大型机与遗留系统 (主题: vsam, mainframe;标签: interviewbit, vsam, topic-specific, mainframe)
  • 类型: technical | 难度: hard | 子类型: concept
  • 分类: fullstack
  • id: 69b37c8d58d557c902bc959b | 官方: 否 | 付费: 否

答案:

The VSAM consists of datasets used to store the data and are referred to as clusters. Index, sequence set, and data portion of a dataset are all grouped into clusters. Each VSAM cluster occupies an area divided into contiguous areas called CI (Control Intervals). A VSAM cluster consists of two main components: - Index Component: This component consists of the index part. VSAM retrieves records from the data component using the index component.

VSAM由用于存储数据的数据集组成,这些数据集称为簇。索引、序列集和数据集的数据部分都分组到簇中。每个VSAM簇占据一个区域,该区域被划分为称为CI(控制间隔)的连续区域。VSAM簇由两个主要组件组成:- 索引组件:该组件由索引部分组成。VSAM使用索引组件从数据组件中检索记录。
  • Data Component: This component contains the data. It contains the actual data records.
0

评论

博主关闭了当前页面的评论
EN