cobol 英文资料

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cobol 英文资料相关的知识,希望对你有一定的参考价值。

最好是ppt,详细一些,我是给别人上培训用的
万谢!

参考技术A COBOL

英文缩写: COBOL (Common business Oriented Language)
中文译名: COBOL语言
解 释: 一种适合于商业及数据处理的类似英语的程序设计语言。这种语言可使商业数据处理过程精确表达。
COBOL(面向商业的通用语言,又称为企业管理语言、数据处理语言等,Common Business Oriented Langauge)是最早的高级编程语言之一,是世界上第一个商用语言。

翻译:English abbreviation: COBOL (Common business Oriented Language)

English translation: COBOL Language

Explanation: a suitable commercial and data processing procedures similar to the English language. This language allows precise expression of commercial data processing.

COBOL (Common Business Oriented Language, also known as enterprise management language, data processing and language, Common Business Oriented Langauge) is the first high-level programming language is one of the world's first commercial language. ..

COBOL的历史
1959年5月,五角大楼委托格雷斯·霍波(G.Hopper)博士领导一个委员会并由Rear Admiral Grace Hopper公司主持开发,并于1961年由美国数据系统语言协会公布。正式发布于1960年4月,称为Cobol-60。
1968年美国国家标准委员会ANSI又通过了新的标准ANSI COBOL X.3.23-1968。
1972年国际标准化组织ISO将其作为ISO COBOL-72。1974年ANSI对COBOL-68作出了修订扩充,形成了ANSI COBOL X3.23-1974,随后1978年ISO采用其形成ISO COBOL-78,后来又提出了ANSI X3.23-85,增加了很多结构化程序设计的内容,ISO标准ISO1989:1985也采用了该标准。COBOL标准还在不断地改进和完善,最新的标准COBOL 2002主体已经于2002年12月出版,其他部分还在不断地完善之中。现在最新的版本是Cobol-2002。
1963年,美国国家标准研究所(ANSI)进行了标准化,但是ANSI标准很少被遵循;因此,COBOL程序只是部分可移植的。

翻译:The history of COBOL

In May 1959, the Pentagon commissioned格雷斯霍波(G. Hopper) by a committee led by Dr. Rear Admiral Grace Hopper led the development of the company, and in 1961 by the American Association of Data Systems Languages. Officially released in April 1960, known as the Cobol-60.

1968, American National Standards Institute ANSI has adopted a new standard ANSI COBOL X.3.23-1968.

1972 International Organization for Standardization ISO as ISO COBOL-72. 1974 Nian ANSI pairs of COBOL-68 was amended in expanded form ANSI COBOL X3.23-1974, following its formation in 1978, ISO using ISO COBOL-78, and later proposed ANSI X3.23-85, increased the number of structured programming content, ISO standard ISO1989: 1985 also adopted the standard. COBOL standards are continuing to improve and perfect the latest standard COBOL 2002 subjects have been published in December 2002, other parts are still being constantly improved. Now, its latest version of Cobol-2002.

In 1963, the American National Standards Institute (ANSI) has standardized, but the ANSI standard are rarely followed; so, COBOL programs only partially portable.

COBOL的重要性
经过40多年的不断修改、丰富完善和标准化,COBOL已发展为多种版本的庞大语言,在财会工作、统计报表、计划编制、情报检索、人事管理等数据管理及商业数据处理领域,都有着广泛的应用。
COBOL的重要性可以用这句话来描述:世界上70%的数据都是用COBOL语言处理的,并且90%的ATM事务处理用的都是COBOL语言。每天在线处理的COBOL事务有300亿次。500强中有492家(包括全部的100强)使用了COBOL语言,目前在COBOL方面的投资已经超过3万亿美元,,据称用COBOL书写的程序超过了1000亿行,并且以每年大约50亿行代码的速度在增长。
由于COBOL在商业领域的雄厚基础,而且COBOL主要是应用于银行、金融和会计行业等非常重要的商业数据处理领域。所以,即使对于具有相当经验的IT公司来说,重新编写COBOL语言的可靠的应用软件也是不实际或是从商业角度上并不可行的,而且还要花上很长的时间,只要大型机存在,COBOL就不会消失,即使是对电脑界产生巨大影响的“千年虫”(Y2K)也没有改变COBOL的命运。

翻译:The importance of COBOL After 40 years of constant change, rich sound and standardization, COBOL has evolved into multiple versions of a large language, accounting, statistical reporting, planning, information retrieval, personnel management, data management and business data processing , all have a wide range of applications. The importance of COBOL can use these words to describe: The World's 70% of the data is to use COBOL language processing, and 90% of ATM transactions are used in COBOL language. COBOL matters dealt with every day online 300 million times. 500 There are 492 (including all of the 100) uses the COBOL language COBOL investments currently has more than three trillion U.S. dollars, allegedly written in COBOL programs with more than one hundred billion rows, and about 50 per year 100 million lines of code at the rate of growth. Since COBOL strong foundation in the commercial sphere, and COBOL is mainly used in banking, finance and accounting industries are very important business data processing. Therefore, even for considerable experience in IT companies, rewriting COBOL language, the application of reliable software is not practical or not feasible from a business point of view, but also spend a very long time, as long as there is mainframe , COBOL will not disappear, even for the computer industry a tremendous impact on the "millennium bug" (Y2K) did not change the fate of COBOL.

COBOL的特点
COBOL是一种面向数据处理的、面向文件的、面向过程(POL)的高级编程语言,是一种功能很强而又极为冗长的语言。
COBOL适合于具有循环处理周期的环境(例如打印工资支票)以及数据操纵量相当大的环境。COBOL主要应用于商业数据处理领域,对各种类型的数据进行收集、存储、传送、分类、排序、计算及打印报表、输出图象是它的强项。
COBOL语法与英文很接近,即使不懂电脑的人也能看懂程序。
强大的文件处理功能,大量的数据通常以文件的形式存储在磁盘上。
仅提供了加、减、乘、除及乘方这五种简单的算术运算,因而不适于进行科学计算。
未来的COBOL将支持XML等Web时代的新技术。

翻译:The characteristics of COBOL

COBOL is a data-oriented processing, file-oriented, process-oriented (POL) high-level programming language, is a feature very strong but extremely lengthy language.

COBOL for the processing cycle with the cycle of the environment (for example, print pay checks) as well as a large amount of data manipulation environment. COBOL is mainly used in commercial data processing, for various types of data collection, storage, transmission, classification, sorting, calculation and printing reports, the output image is its strength.

COBOL grammar and English is very close, even if people do not understand the computer program can read.

Powerful document processing capabilities, large amounts of data are usually in the form of files stored on disk.

Provided only add, subtract, multiply, divide, and involution of these five simple arithmetic operations, and thus not suitable for scientific computing.

COBOL will support the future of XML and other Web era of new technologies.

COBOL的程序结构
COBOL程序由4部(DIVISION)组成:IDENTIFICATION DIVISION.(标识部)、ENVIRONMENT DIVISION.(环境部)、DATA DIVISION.(数据部)、PROCEDURE DIVISION.(过程部),而每个部又由若干节 (SECTION)组成。

IDENTIFICATION DIVISION.

“PROGRAM-ID”(程序识别ID)、“AUTHOR”(作者名)、“DATE-WRITTEN”(编写日期),这些并直接不影响程序的执行,而是程序的注释 信息。程序注释可以采用任何语言书写,COBOL编译器可以接受。

ENVIRONMENT DIVISION.

用于记载程序可以被运行的计算机环境。“ENVIRONMENT DIVISION.”部包括“CONFIGURATION SECTION”环境节和“INPUT-OUTPUT SECTION”输入输出节。

DATA DIVISION.

用于定义和声明程序所要使用的变量及其他数据。程序要使用的全部变量和数据必须在这里定义。“DATA DIVISION.”部主要包含“FILE SECTION.”和“WORKING-STORAGE SECTION.”节。
如果程序要通过参数接收数据,那么使用“LINKAGE SECTION”来声明。
COBOL的数据种类
COBOL程序的数据,主要有以下3种:
变量(Variables)
常量(Literals)
表意常量(FigurativeConstants)变量和常量自不必说,说说表意常量。使用有特定意思的多个词组合成一个常量的代名词。好处是便于编码人员识别。比如:HIGH-VALUES、LOW-VALUES等可以表达一定意思的名称作为常量代名词。
COBOL变量类型
COBOL的基本变量类型,有以下三种:
数值型(Numeric)
英文字符型(AlphaNumeric)
英文字符串型(Alphabetic)

PROCEDURE DIVISION

用于容纳程序的实际处理代码。需要传入参数时,采用“PROCEDURE DIVISION USING 引数名[,参数名...]”的方式。
因为前3个DIVISION都是注释,却又必须,只到第4个DIVISION“PROCEDURE DIVISION”才真正涉及程序代码,这样的繁琐规定使得COBOL被批评为开场白像老太太裹脚布。但是,基于这样的4个DIVISION的明确记述等的严格形式,COBOL也被公认是可读性强的语言。另外,COBOL的保留字数量庞大,字数过长的保留字太多是COBOL的特征之一。
目前Cobol 就业市场包含以下两种类型:
第一,在旧的 Cobol 代码和新程序之间充当桥梁,这种工作要求人们懂 Cobol,懂那些老 Cobol 程序员所依赖的商业逻辑,同时动新的编程语言,如 Java。
第二是维护旧的 Cobol 代码,并编写新的 Cobol 代码。

翻译:COBOL program structure of COBOL programs from the four (DIVISION) composed of: IDENTIFICATION DIVISION. (ID Department), ENVIRONMENT DIVISION. (Ministry of the Environment), DATA DIVISION. (Data Division), PROCEDURE DIVISION. (The process of Department), and each department also by a number of sections (SECTION) component. IDENTIFICATION DIVISION. "PROGRAM-ID" (identification process ID), "AUTHOR" (author name), "DATE-WRITTEN" (write the date), which do not directly affect the program execution, but the program notes the information. Program notes written in any language can be used, COBOL compiler is acceptable. ENVIRONMENT DIVISION. Recorded program can be used to run computer environment. "ENVIRONMENT DIVISION." Department, including "CONFIGURATION SECTION" Environment Day and "INPUT-OUTPUT SECTION" input-output section. DATA DIVISION. Definitions and declarations for procedures to be used for variables and other data. Program to use all the variables and data must be defined here. "DATA DIVISION." Department consists mainly of "FILE SECTION." And "WORKING-STORAGE SECTION." Festival. If the program is to pass parameters to receive data, then use the "LINKAGE SECTION" to the statement. COBOL data types of COBOL program data, mainly in the following three kinds: variables (Variables) Constants (Literals) ideographic constant (FigurativeConstants) variables and constant self-Needless to say, talk about the ideographic constant. Use of a specific meaning of a constant synthesis of a number of phrases synonymous. The advantage of facilitating coders identified. For example: HIGH-VALUES, LOW-VALUES, etc. can express a certain meaning of the name as synonymous with a constant. COBOL variable type of the basic variable types of COBOL, the following three ways: numeric (Numeric) English character (AlphaNumeric) English string (Alphabetic) PROCEDURE DIVISION is used to accommodate the actual processing procedure code. Need to pass parameters using "PROCEDURE DIVISION USING argument name [, parameter names ...]" way. Because the former are three DIVISION notes, but must be only to the first 4 DIVISION "PROCEDURE DIVISION" really involved in the program code, such as red tape makes COBOL has been criticized for his opening remarks, like the old lady bindings. However, based on these four DIVISION such a clear account of the strict form, COBOL has also been recognized as readable language. In addition, COBOL reserved words large number of long words is a COBOL reserved word too much one of the characteristics. Cobol job market at present contains the following two types: first, in the old Cobol code and to act as a bridge between the new procedures, this kind of work requires people to understand Cobol, understand those old Cobol programmers rely on business logic, while moving the new programming languages such as Java. The second is to maintain the old Cobol code, and the preparation of new Cobol code.

参考资料:http://baike.baidu.com/view/90933.htm

在COBOL中,是不是可以递归调用一个段落?

【中文标题】在COBOL中,是不是可以递归调用一个段落?【英文标题】:In COBOL, is it possible to recursively call a paragraph?在COBOL中,是否可以递归调用一个段落? 【发布时间】:2015-01-06 20:40:21 【问题描述】:

在 IBM 大型机的 COBOL 中,是否可以递归调用段落?

200-PARAGRAPH SECTION.

    IF WS-COUNTER < 10
       ADD 1 TO WS-COUNTER
       PERFORM 200-PARAGRAPH
    ELSE
       DISPLAY 'I'M DONE'
    END-IF.

 200-EXIT.
    EXIT.

【问题讨论】:

没有。一个 imlmenehtstion 可以免费支持递归 PEFFROM,但这不是必需的。 @EJP imlmenehtstion? “实施”是我最好的猜测:-D 【参考方案1】:

检查当前的 COBOL 语言参考,但 AFAIR a para 无法自行执行。措辞类似于您将得到不可预测的结果,因为不支持递归。

如果您需要遍历相同的代码,也许您需要重构以使用 PERFORM UNTIL?

【讨论】:

Note: A PERFORM statement must not cause itself to be executed. A recursive PERFORM statement can cause unpredictable results.【参考方案2】:

@jdv 是正确的。

如果您想要递归,您可以使整个程序递归,查看同一手册(企业 COBOL 语言参考)和它的姐妹企业 COBOL 编程指南,特别是在 PROGRAM-ID 及其选项。

但是,如果您没有其他方法可以做到这一点,我只建议使用递归,这很少见。递归程序的开销很大。

你展示这个:

200-PARAGRAPH SECTION.

200-PARAGRAPH 位只是一个标签,只是一个名称。 SECTION 这个词告诉你它是什么,它不是一个段落。你确实有一个段落里面SECTION

不,SECTION 也不能递归使用。

过去,PROCEDURE DIVISION 中的 SECTION 更为重要。随着 COBOL 1985 标准的各种变化,SECTION 变得不那么重要了。

这就是我的编码方式(根据当地标准):

    PERFORM                      200-descriptive-and-meaningful-name
        invariant-data-item-with-a-VALUE-of-ten
                                 TIMES
    DISPLAY "I'M DONE"

200-descriptive-and-meaningful-name.
    CONTINUE (just representative of whatever code you need)
    .

或者做同样事情的内联执行(我喜欢执行段落,因为它有助于程序的自我记录)。

请注意,这些名称是为了向您解释阅读本文。您应该使用对手头的业务任务有意义的不同名称。

语言参考和编程指南是大量文档,可作为 PDF 格式免费下载或在线搜索。在 SO 之前进行这些呼叫。也不要忘记你应该有可以提供帮助的同事。

【讨论】:

我不知道,你的名字比我几十年来研究 COBOL 程序时遇到的许多名字都更具描述性。 :)【参考方案3】:

我不确定您显示的代码在技术上是否符合递归条件。但是,以下代码可以工作并且与平台无关。

       PERFORM
         VARYING ws-counter FROM 1 BY 1
           UNTIL ws-counter > 9
       END-PERFORM.
       DISPLAY 'I' QUOTE 'M DONE'.

如果你想真正开始 COBOL 程序员之间的斗争,请阅读这篇文章。

   200-SECTION SECTION.
   200-PARAGRAPH.
       IF ws-counter < 10
           ADD 1 TO ws-counter
           GO TO 200-PARAGRAPH
       ELSE
           DISPLAY 'I' QUOTE 'M DONE'
       END-IF.

虽然我可能更喜欢这个,但如果要采用 GO TO 方法。

   200-SECTION SECTION.
   200-PARAGRAPH.
       IF ws-counter < 10
           ADD 1 TO ws-counter
           GO TO 200-PARAGRAPH
       END-IF.
       DISPLAY 'I' QUOTE 'M DONE'.

我必须问一下,你想要完成什么?假设您的代码有效,它所做的就是数到十。这样就可以了,而且更简单。

       MOVE 10 TO ws-counter.
       DISPLAY 'I' QUOTE 'M DONE'.

我认为这是我会推荐的。

       05  ws-counter               PIC 9(02).
       05  max-passes               PIC 9(02) BINARY VALUE 10.

       MOVE ZERO TO ws-counter.
       PERFORM 200-PARAGRAPH
           UNTIL ws-counter >= max-passes.
       DISPLAY 'I' QUOTE 'M DONE'.

   200-PARAGRAPH.
       ADD 1 TO ws-counter.

【讨论】:

该部分/段落自己执行,除非我对递归的理解是错误的,即递归。这只是一个技术问题,因为我来自 Java,我正试图弄清楚如何在 Cobol 中做事。 IBM 的文档将其称为递归。我知道你的意思,但这只是一个段落/部分直接执行的例子。让它计算一个阶乘不会改变任何东西,它仍然不能那样做。无论如何,我确实喜欢最后的切入点:-) 经常有代码可以完成类似的事情...... 另外,PERFORM 10 TIMES ADD 1 TO ws-counter END-PERFORM DISPLAY "I'M DONE" 是您最后的中介 :-) 当然以 INITIALIZE ws-counter 为前缀。 向 ws 计数器添加 10。显示“我完成了”。 :-p

以上是关于cobol 英文资料的主要内容,如果未能解决你的问题,请参考以下文章

单片机英文资料

IFC详细资料大全

英语面试的相关资料

如何将 Python 变量转换为等效的 cobol 组变量?

在 COBOL 程序中出现重叠错误

求关于兰博基尼公司的英文资料