Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to disp..

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

Re: 01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to disp..

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

Post New Answer

More COBOL Interview Questions

how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,


copy 100 records without using ibm utilities

3 Answers  


How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)

9 Answers   Bank Of America,


Size of a column has been changed in DB2 table (Suppose it was of 5 characters and later changed to 4 characters) and forgot to change the DCLGEN in COBOL program, what will happen during the execution of code? If the program Abends then what will be the error? If it doesn't abend then hpw the error can be catched?

5 Answers   IBM,


how do you move only numeric data from A to B 01 A pic x(10) value 'a1b2c34d5e'. 01 B pic x(5).

2 Answers   DELL, Mind Tree,


How may divisions are there in JCL-COBOL?

5 Answers   IBM,


can we display comp-3 variables. if we want to display what we have to do . give me one example

6 Answers   CGI, Deloitte,


how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........

4 Answers   Wipro,


What are the divisions in a cobol program?

1 Answers  


What is amode(24)?

0 Answers  


How to resolve the soc4 and soc7 errors?

5 Answers   IBM, RBS,


How do you reference the fixed block file formats from cobol programs

0 Answers  


Categories