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 to display string in the reverse order using occurs
clause?

Answer Posted / fool

both r foolish programmers...heres the working code..
identification division.
program-id pg1.
environment division.
data division.
working-storage section.
01 j pic 99.
01 i pic 99.
01 s1 pic a(15).
01 s2 redefines s1.
02 instr pic a(1) occurs 15 times.
01 s3 pic a(15).
01 s4 redefines s3.
02 outstr pic a(1) occurs 15 times.
procedure division.
p1.
display "Enter the string ".
accept s1.
perform p3 varying i from 15 by -1 until i = 0.
display "Reverse string ".
display s4.
stop run.
p3.
compute j = 15 - i + 1.
move instr(i) to outstr(j).

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scope terminator give example?

1154


There are 5 fields and 1000 records in a file. Unload it into an array. Write the syntax for declaration and how will you unload it.

1497


Describe the cobol database components?

1215


what are decleratives in cobol?

2303


can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech

2490


what is the difference between COBOL2 AND COBOL390?

3112


Mention the guidelines to write a structured cobol program?

1138


What are the different data types in cobol?

1510


What is the difference between PIC 9.99 and 9v99 in COBOL?

1395


Which Search verb is equivalent to PERFORM…VARYING?

1102


Are you comfortable in cobol or jcl?

1088


how to convert the recors form vsam file to db2 table tru file aid

3311


Give some examples of command terminators?

1318


Why did you choose to work with ibm mainframe cobol programming?

1156


What rules are followed by the search verb.

1194