Can anyone please give the example of Inline Perform.
Answers were Sorted based on User's Feedback
Answer / shanuss
PERFORM UNTIL I = 10
MOVE RATE(I) TO SPLIT-TOT(1)
ADD 1 TO I
END-PERFORM.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / nikhil
There is one special thing about inline performs - there
has to be a END-PERFORM associated with the perform
statement otherwise it will give compile error. I have
tried this as well.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / abhishek vashishta
PERFORM UNTIL WS-EXIT = 'Y'
DISPLAY 'ENTER UR NAME '
ACCEPT WS-NAME
DISPLAY 'WANT TO EXIT'
ACCEPT WS-EXIT
END-PERFORM.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / anjan
HI,
Inline perform is like inline function in C++. which
means in this case the control will not transfered to any
particular paragraph where as Immediately throws the result
of the code which has mentioned in the block perform and
end-perform.
Please correct me if i am wrong.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / bijay krishna mohapatra
perform varyiung i from 1 by 1 under i>5
display i
add 1 to i
end perform
display 'bijay'
stop run.
***********rules********:
1.in line should be terminated into scope delimiter(end-if)
2.we cant apply the after opt.
3.nesting can be done hr.
Is This Answer Correct ? | 1 Yes | 1 No |
)what is retrieve?
WORKING-STORAGE SECTION. 01 A PIC X(3) VALUE 'ABC' 01 B PIC 9(3). PROCEDURE DIVISION. MOVE A TO B. STOP RUN. OUTPUT IS: AB3 WHY AND HOW THIS IS HAPPENING.
What are some examples of command terminators?
how to pass 100 to s9(4) how r they inserted ?
How is sign stored in a comp-3 field?
How can you get the ksds file records into your cobol program?
Is this allowed? 01 WS-TABLE. 03 FILLER-X PIC X(5) VALUE 'AAAAA'. 03 WS-EX REDEFINES FILLER-X OCCURS 5 TIMES PIC X(1). can redefines clause be used with occurs clause?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
what will be the output when a)pic 9(6)value 000178 is moved to pic ***,***. b)pic 9(5) value 57397 is moved to pic $$,$$9.
How include time & date in the report generation in cobol programing?
wht is the difference between goto and perform stmts
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?