本文介绍了COBOL 88级数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 这里非常基本的问题。 我必须为COBOL程序写出一个数据词汇表。此数据词汇表包含以下每个变量的详细信息: 名称 数据类型 价值范围(如适用) 行号 富勒名称 我有几个包含88级开关的变量。我的问题是:这些88级交换机是否被视为变量,我应该将它们包括在数据术语表中?或者,根据数据词汇表结构,我必须合作,应该在这种情况下被忽略吗? 当我在这里时,另一个简单的问题。填充物应该包含在数据词汇表中吗?该程序特别包含大量的填充变量,大部分是简单的PIC X变量。解决方案假设我明白了这个问题被问。 如果您可以给出一个示例,其中包含COBOL布局和数据词汇表项,其中一个没有88条目。不过,我会尽力回答这个问题。 否,88个级别的条目不是变量,它们不会增加或减少记录的长度。他们只是允许你创建条件语句。如果您的数据词汇表仅包含有助于记录长度的变量,那么这个说法呢? 如果是,则每88项不应有单独的数据词汇表条目。但是,它可能有助于解释一个给定的变量的值(3,也许5或甚至一个预期值的额外的行)。 01唱片店。 02位置图9(4)。 88 dist-center value 100,101,102. 02 value pic 9(6)。 02付费图片X(1)。 88是值'Y','y'。 88 no value'N','n'。 您的数据术语表可能是: 位置 名称:位置 数据类型:整数 价值范围:0-9999 行号:20 富勒名称:数据 预期价值: 100,101,102分配中心 1- 99为客户 103-9999无效 现在知道你的预期价值,你可以回去改变你的88个价值? ... 02位置图9(4)。 88中心价值100,101,102。 88个客户价值1到99. 88无效值0,103至9999. ... 如果没有,那么: 您可以有一个单独的数据词汇表条目前88级条目。 您的数据术语表将可能是: 位置 名称:位置 数据类型:整数 价值范围:0000-9999 行号:20 Fuller Name:数据 dist-center 名称:dist-center 数据类型:boolean 值范围:100 ,101,102 行号:5 富勒名称:位置是一个配送中心 客户 名称:客户 数据类型:布尔值 价值范围:1-99 行号:5 Fuller名称:位置客户 无效 名称:无效 :boolean 价值范围:0001,0010,0100 行号:5 Fuller Name :位置是无效值 Very basic question here.I have to write out a data glossary for a COBOL program. This data glossary includes the following details about every variable:NameData typeRange of values (if applicable)Line numbersFuller nameI have several variables that include level 88 switches. My question is this: Are these level 88 switches counted as variables, and should I include them in the data glossary? Or, judging by the data glossary structure I have to work with, should they be ignored in this context?And while I'm here, another simple question. Should fillers be included in data glossaries? This program in particular contains a LOT of filler variables, most being simple "PIC X" variables. 解决方案 Assuming I understand the question being asked. It would help if you could give an example with a COBOL layout and data glossary entry one with and one without an 88 entry. However, I'll do my best to try to answer the question. No, 88 level entries are not variables and they do not increase or decrease the length of the record. They simply allow you to create a conditional statement. With that being said should your data glossary only include variables that contribute to the length of the record? If yes then there shouldn't be a separate data glossary entry per 88 item. However, it might help to explain a given variable's value[s] (3 and maybe 5 or even an extra line for expected values). 01 record-store. 02 location pic 9(4). 88 dist-center value 100, 101, 102. 02 value pic 9(6). 02 paid pic X(1). 88 yes value 'Y', 'y'. 88 no value 'N', 'n'.Your data glossary would/could be:locationName: locationData Types: integerRange of Value: 0-9999Line Numbers: 20Fuller name: location of the dataExpected Values:100, 101, 102 for distribution centers 1-99 for customers103-9999 invalidNow knowing your expected values you might go back and change your 88 values?... 02 location pic 9(4). 88 dist-center value 100, 101, 102. 88 customers value 1 thru 99. 88 invalid value 0, 103 thru 9999.... If no then:You could have a separate data glossary entry pre 88 level entry.Your data glossary would/could be:locationName: locationData Types: integerRange of Value: 0000-9999Line Numbers: 20Fuller Name: The location of the datadist-centerName: dist-centerData Types: booleanRange of Value: 100, 101, 102Line Numbers: 5Fuller Name: Is location is a distribution center customerName: customerData Types: booleanRange of Value: 1-99Line Numbers: 5Fuller Name: Is location a customerinvalidName: invalidData Types: booleanRange of Value: 0001, 0010, 0100Line Numbers: 5Fuller Name: Is location an invalid value 这篇关于COBOL 88级数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-25 14:25