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 / rajani
working-storage section.
01 name1 pic x(17) value 'cobol programming'.
01 name2 pic x(17).
01 i pic 99.
01 j pic 99 value 1.
procedure division.
perform para varying i from 17 by -1 until i<1.
display name2.
stop run
para.
move name1(i:1) to name2(j:1).
add 1 to j.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
What is the default value(s) for an initialize? What keyword will allow for an override of the default?
Write a program to enter and display the names of students in a class using the occurs clause.
What is inspect in cobol ?
what is the difference between COBOL2 AND COBOL390?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
In which area will you utilize 88 level items in cobol?
Write some characteristics of cobol as means of business language.
how to access the file from prodution from changeman tool and to submit a file to production
i need a small 3d program using inline and outline.
how do you reference the rrds file formats from cobol programs
What is the LINKAGE SECTION used in COBOL?
What is the difference between perform … with test after and perform … with test before?
There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.