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

COBOL program to read the string ' BOMBAY' in reverse order as 'YABMOB'

Answer Posted / sushree

id division.
prog-id. hello.
data division.
working-storage section.
01 ws-str pic A(6) value 'BOMBAY'.
01 ws-cnt pic 9(1).
01 ws-str1 pic A(1).
01 ws-str2 pic A(6) value space.
procedure division.
inspect ws-str tallying ws-cnt for all characters
display ws-cnt
perform until ws-cnt < 1
move ws-str3(ws-cnt:1) to ws-str1
string ws-str2 delimited by space
ws-str1 delimited by size
into ws-str3
compute ws-cnt = ws-cnt - 1
end-perform.
display ws-str3.
stop run.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

2477


How do you differentiate between cobol and cobol-ii?

1216


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

2435


How do you reference the fixed block file formats from cobol programs

1235


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

1243


Write the code implementing the perform … varying.

1076


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

1330


How arrays can be defined in COBOL?

1226


if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need

1356


What are the different data types in cobol?

1454


What kind of error is trapped by on size error option?

1250


What are declaratives and what are their uses in cobol?

1207


How to know whether the module is dynamical or statistical?

1148


what happens if parmparameter passes zero bytes to the program

2140


What is the utilization of copybook in cobol?

1200