how we can reverse the string in the cobol for example
satheesh can be reveresed as hseehtas
Answer Posted / g venkatesh
data division.
01 ws-input pic x(8).
01 ws-output pic x(8).
01 i pic 9.
01 j pic 9.
procedure division.
move 1 to i.
perform varying j from 8 by -1 until j =0
move ws-input(i:1) to ws-output(j:1)
add 1 to i
end-perform
display ws-output.
stop run.
Is This Answer Correct ? | 51 Yes | 7 No |
Post New Answer View All Answers
In COBOL programming, what is PERFORM? What is VARYING?
i have 10 names in an array and my name is one of them also array is not in sorted order i need to display my name using index how will i do this
How you can characterize tables in cobol?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
What is the difference between external and global variables in COBOL?
Write a program that uses move corresponding.
Difference between array and sub-script ?
What is Pic 9v99 Indicates in COBOL?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What are 77 levels used for?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
What is the difference between comp and comp-3 usage?
Write the code implementing the perform … varying.
) what is the difference between AID and HANDLE AID?
What is a scope terminator give example?