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 rules are to be followed while using the corresponding options?
Which Search verb is equivalent to PERFORM…VARYING?
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Why would you use find and get rather than to obtain?
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
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?
how to convert the recors form vsam file to db2 table tru file aid
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
What is the Purpose of POINTER Phrase in STRING command in COBOL?
) what is the difference between AID and HANDLE AID?
Discuss about changing dataset name in proc.
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
What is the LINKAGE SECTION used in COBOL?
Can a Search can be done on a table with or without Index?
how do you reference the esds vsam file formats from cobol programs