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

how do you reference the esds vsam file formats from cobol programs

1142


What is the difference between a binary search and a sequential search what are the pertinent cobol?

1101


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

1095


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

1122


How do you reference the following file formats from cobol programs?

1130


How can you get the ksds file records into your cobol program?

1043


What is a scope terminator give example?

1058


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

1274


How arrays can be defined in COBOL?

1148


How do you get the data to code the BMS macro?

1931


How do get the result of your program directly on your pc?

2303


what is the use of outrecord?

2162


Explain what you understand by passing by value.

1103


how do you reference the variable block file formats from cobol programs

1195


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

9764