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 external and global variables in COBOL?
What is the usage of comp fields in cobol?
What are the different types of condition in cobol and write their forms.
Write a program that uses move corresponding.
How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.
How to remove 2 duplicate records and copy only one using job control language?
What are the cobol coding sheets?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
What is the difference between perform … with test after and perform … with test before?
What are literals?
What are the pertinent COBOL commands?
Differentiate between structured cobol programming and object-oriented cobol programming.
How do u write test cases?
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?