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...

how we can reverse the string in the cobol for example
satheesh can be reveresed as hseehtas

Answer Posted / adarsh

This can be achieved using
1. FUNCTION REVERSE - RECOMMENDED
2. REFERENCE MODIFICATION
.

1. MOVE FUNCTION REVERSE(WS-NAME-INPT) TO
WS-NAME-RVRS.

2. MOVE WS-NAME-INPT(1:1) TO WS-NAME-RVRS(8:1)
MOVE WS-NAME-INPT(2:1) TO WS-NAME-RVRS(7:1)
MOVE WS-NAME-INPT(3:1) TO WS-NAME-RVRS(6:1)
MOVE WS-NAME-INPT(4:1) TO WS-NAME-RVRS(5:1)
MOVE WS-NAME-INPT(5:1) TO WS-NAME-RVRS(4:1)
MOVE WS-NAME-INPT(6:1) TO WS-NAME-RVRS(3:1)
MOVE WS-NAME-INPT(7:1) TO WS-NAME-RVRS(2:1)
MOVE WS-NAME-INPT(8:1) TO WS-NAME-RVRS(1:1).

Is This Answer Correct ?    19 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?

1263


What is the difference between comp and comp-3?

1132


Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.

2395


) How do u handle errors in BMS macro?

1908


i want a program using by if, evaluate , string, unstring, perform, occurs?

4636


What is the default value(s) for an initialize? What keyword will allow for an override of the default?

1062


)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?

1954


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2482


how can i see junk values in dclgen or in hostvariable of comp ?

2933


How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?

1092


In which area will you utilize 88 level items in cobol?

1098


Write the code to count the sum of n natural numbers.

1143


Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?

1055


What is comp-1 and comp-2?

1185


how to move the records from file to array table. give with code example

2631