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 / ankur kar
In order to reverse the String the only way is by declaring
the string as an array and then sequentially arrage the
array based on the asending/desending order of the array
and then display the sequential result accordingly.
Otherwise there is no command in COBOL that will allow the
string to be displayed in the reverse order.
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc
What is the difference between PIC 9.99 and 9v99 in COBOL?
What is amode(24)?
1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?
Which division and paragraphs are mandatory for a COBOL program?
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is the difference between external and global variables in COBOL?
How you can read the file from bottom?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
Can a Search can be done on a table with or without Index?
Mention the guidelines to write a structured cobol program?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
Explain about different table spaces.
write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc
What is the problem of ordered sequential files access?