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
How arrays can be defined in COBOL?
example for sub strings ? and refernce modifications whit output pls
How do get the result of your program directly on your pc?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
i want to learn mainframe..any websites and material to learn from basic..? my mail id : rajeswaribe2010@gmail.com
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
Discuss about changing dataset name in proc.
How do define dynamic array in cobol. how do you define single dimensional array and multidimensional array in your cobol?
How do you reference the fixed block file formats from cobol programs
what is s000 u4087 error? please give the all error codes in cobol,jcl.
What are different data types in cobol?
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
What is redefines clause in COBOL?