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

how do you define single dimensional array and multidimensional array in your cobol?

678


how do you reference the rrds file formats from cobol programs

801


What is amode(24)?

684


What is a report item?

741


Define static linking and dynamic linking.

669






what is the use of outrecord?

1771


What is the difference between a binary search and a sequential search? What are the pertinent cobol commands?

717


What are the cobol coding sheets?

665


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1657


2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic

2120


How to print 10 to 1 if the input have only 10 digit number?

811


how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)

1931


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

998


What are the different data types in cobol?

797


here is my requirement A1 is alphanumeric with value 'A1B2C3D4' as defined below 05 A1 PIC X(8) VALUE IS 'A1B2C3D4' but i need to have A2,A3 as ABCD & 1234 repectively...... A2 = ABCD A3 = 1234 Can you please explain me what are the different ways to do it?

6834