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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / praveen ellur
Reverse function in Cobol will do this for u.
Here is the syntax.
FUNCTION REVERSE ('COBOL PROGRAMMING')
| Is This Answer Correct ? | 5 Yes | 0 No |
If a file has 1000 records.. if i have to replace the first and last characters of the file with another character. how it can be done....
Can we change the password using ALTER? anyone tried and changed?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it
how can you identify wheather the program is using search or search all in the cobol program?
How do you code Cobol to access a parameter that has been defined in JCL?
How do define dynamic array in cobol.
if one main program ,n -subprograms are then which call you follow ?why reasonuhg
What are the divisions in a cobol program?
can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there
2)Where the Plan is located in CICS-DB2?
What is the difference between CONTINUE & NEXT SENTENCE ?