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 |
What is the difference between NEXT SENTENCE and CONTINUE?
how to remove leading spaces and zeroes in a cobol variable.is there any easy way to do it
which generation language is cobol
I got user abend U4038 while compiling my runjcl.. can anyone help me?
The disposition parameter in the jcl is share ( DISP+SHR ) and the program opens file in extend mode what will happen?
comp-3 field occupy?
can I copy book which contain db2 statment in procedure divion?
What is redefines clause in COBOL?
where did you see the information regarding abend codes in jcl?
If i initialize the 01 level variable in array, will it initialize all the array elements (occurs)?
How do get the result of your program directly on your pc?
What is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?