1. PERFORM VARYING A FROM 1 BY -1 UNTIL A>100 , 会死循环;2. IF 100(A)=ZERO , 应该是你写错或看错了吧, 这里的"100" 换成个数组变量就可以了, 就像 WA-NAME(A), 但是得当心数组溢出;3. 07 ABCDESFG OCCURS 8, 就像定义了一张表---"ABCDESFG", 一般都这么用,01 WA-TABLE....
3. PERFORM VARYING. 4. PERFORM VARYING…. UNTIL…. 5. PERFORM THRU 6. PERFORM TIMES Inline Perform: It performs a set of Cobol statements between Perform & END-Perform. Basically this is to keep a particular logic in a boundary and execute it in a loop or number of times or execute d...
I'm having a bit of trouble comprehending indexes and PERFORM...VARYING statements. I'm using Cobol Unleashed as a resource, but the examples there are apparently too advanced for me. I also looked the manuals and searched this forum. ...
(也就是执行下一条语句,紧跟该 PERFORM 的),有 5 种 PERFORM 语句: 基本 PERFORM PERFORM XXX N TIMES PERFORM XXX UNTIL YYY PERFORM XXX VARYING 内嵌 PERFORM Q102:数据部中有几个区 A102:6 个区 1,文件区;2,工作单元区;3,本地存储区;4,屏幕显示区;5,报告区; 6,连接区 Q103:REDEFINES 子句是...
1cobol循环问题?PERFORM 1-SECTION UNTIL I > 50 OR FLG-ERR = CNS-ONPERFORM VARYING J FROM 1 BY 1 UNTIL J >50 OR FLG-ERR = CNS-ON.END-PERFORM这2个循环有什么不同, 2 cobol循环问题? PERFORM 1-SECTION UNTIL I > 50 OR FLG-ERR = CNS-ON PERFORM VARYING J FROM 1 BY 1 UNTIL J ...
(比如,指 定要执行的次数执行到了或者UNTIL后的判断逻辑为真),那么程序控制权就会转到下一条执行语 句(也就是执行下一条语句,紧跟该PERFORM的),有5种PERFORM语句: A) 基本 PERFORM B) PERFORM XXX N TIMES C) PERFORM XXX UNTIL YYY D) PERFORM XXX VARYING E) 内嵌PERFORM Q105) How many sections are...
PERFORM VARYING session-var-1 FROM program-var-1 BY program-var-2 UNTIL program-var-3 = program-var-4 Examples Set a breakpoint at statement number 10 to move the value of variable a to the variable b and then list the value of x. AT 10 PERFORM MOVE a TO b; LIST (x); END-...
In the Interoperability topics, we see examples of using cobc to compiler "C" programs. This may seem odd at first, but it is important to remember that cobc translates COBOL into "C", and then invokes the host "C" compiler. When compiling a "C" program, cobc skips the COBOL ...
VARYING是什么?(详细介绍下这些子句)A:PERFORM语句是过程部的语句,它能将程序控制权交给一段指定的程序,并按照指定的次数执行(也就是说执行一段程序,PERFORM XXX N TIMES)等到这段程序执行完之后(比如,指定要执行的次数执行到了或者UNTIL后的判断逻辑为真),那么程序控制权就会转到下一条执行语句(也就是 43、执行...
perform varying IX-1 from 1 by 1 until IX-1 > 00003 inspect ITEM-D-CODE(IX-1) converting E-INFO to A-INFO end-perform * Table ITEM-D-PERCENT add 0000115 to ZERO giving RM-1 add 0000008 to ZERO giving RO-1 perform 00003 times inspect ITEM-RECORD(RM-1:00007) converting E-NUMB ...