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
What is the difference between a binary search and a sequential search what are the pertinent cobol?
What is the difference between comp and comp-3 usage?
What are literals?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
what are decleratives in cobol?
Can we redefine the field of x(200) to less than 200?
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.
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.
Write a program to enter and display the names of students in a class using the occurs clause.
Difference between cobol and cobol-ii?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
Describe the cobol database components?
Define cobol?
What is the default value(s) for an initialize and what keyword allows for an override of the default?
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 ......