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 / paul

DATA DIVISION.
WORKING-STORAGE SECTION.
01 I PIC 9.
01 J PIC 9.
01 ST1 PIC X(5).
01 ST2 PIC X(5).
PROCEDURE DIVISION.
MOVE 1 TO I.
MOVE 'KOTI' TO ST1.
PARA-A.
PERFORM PARA-B VARYING J FROM 5 BY -1 UNTIL J = 0.
DISPLAY 'STRING REVERSE' ST2.
STOP RUN.
PARA-B.
MOVE ST1(I:1) TO ST2(J:1).
ADD 1 TO I.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how you can characterize tables in cobol?

1063


how do you reference the printer file formats from cobol programs

1223


What are the different data types in cobol?

1450


how to refer the data field?

2280


I have a File that has duplicate records. I need only those records that occur more than thrice.?

9898


How do you differentiate between cobol and cobol-ii?

1214


What is the Purpose of POINTER Phrase in STRING command in COBOL?

1260


What are INPUT PROCEDURE and OUTPUT PROCEDURE?

1301


Why is it necessary that file needs to be opened in I-O mode for REWRITE?

1330


Discuss about changing dataset name in proc.

1238


What is the utilization of copybook in cobol? Could we utilize a similar copybook?

1233


what happens if parmparameter passes zero bytes to the program

2134


what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.

9109


Difference between cobol and cobol-ii?

1283


What is the Purpose of Pointer in the string?

1081