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

what is S04E error in jcl?

11 Answers   IBM, L&T,


how to display the dataset information?

2 Answers  


How much salary you are expecting? If they ask in an interview, what we have to tell?

6 Answers   Tech Mahindra, Wipro,


What is difference between comp & comp-4?

6 Answers  


what is s013u000 for?

1 Answers   Hewitt,


what is difference between the sysabend and userabend?

2 Answers  


How many sections are there in data division in COBOL?

0 Answers   B-Ways TecnoSoft,


How do you fetch current date in normal cobol pgm and in cobol-db2 pgm?

3 Answers   Cap Gemini, CTS,


what is redefines? where it can be effectively use for the purpose of memory utilization? give an example?

4 Answers   IBM,


What are decleratives in COBOL ?

1 Answers   Xansa,


What guidelines should be followed to write a structured cobol prgm?

0 Answers  


File status must be checked both while opening and reading the file or only while reading the file?

2 Answers  


Categories