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 |
If my program receives input feed from program in other system.. if the receiving field size is less than the sending field.. what abend will be happening.
1.Can we define condition-name conditions in FD entry.
What is the size of s9(19)comp3? explain
What is the difference between PIC 9.99 and PIC9v99?
How may divisions are there in JCL-COBOL?
study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
how to refer the data field?
Can anyone tell me how to handle the array beyond the limit. If we have an array or a table which can handle 5000 records but now we have to compensate 20000 records with the same array? how to handle the situation.
what is internal sort and external sort ? which is preferable ?
If there are two files one with 100 records and other with 101 records. we have to find out the one record that is the odd man out . What are the steps to do it
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?