Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2
PIC X(13). now I want to display the value of NAME1 in
reverse order i.e value should be displayed as "GNIMMARGORP
LOBOC" HOW can I do that ??? please let me know if any one
knows it.

Answer Posted / sruthi

Hi Subu,
first of all the size of the var NAME1 is 13. You are
passing more than 13 chars. Some data will be truncted.
There are 2 methods to reverse the string.
one is move reference modification.it is very lengthy
process and other is reverse function.
syntax: move function reverse(NAME1) to NAME2

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

735


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

678


What are literals?

630


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

1614


what are decleratives in cobol?

1827






Can we redefine the field of x(200) to less than 200?

818


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.

5680


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2058


Write a program to enter and display the names of students in a class using the occurs clause.

652


Difference between cobol and cobol-ii?

704


What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

672


Describe the cobol database components?

680


Define cobol?

860


What is the default value(s) for an initialize and what keyword allows for an override of the default?

695


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

10608