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


Please Help Members By Posting Answers For Below Questions

In COBOL programming, what is PERFORM? What is VARYING?

666


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

988


How you can characterize tables in cobol?

709


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.

5667


What is the difference between external and global variables in COBOL?

806






Write a program that uses move corresponding.

668


Difference between array and sub-script ?

1157


What is Pic 9v99 Indicates in COBOL?

716


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)?

619


What are 77 levels used for?

653


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.

1107


What is the difference between comp and comp-3 usage?

670


Write the code implementing the perform … varying.

637


) what is the difference between AID and HANDLE AID?

1628


What is a scope terminator give example?

652