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

01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING".
01 NAME2 PIC X(13).
now I want to display the value of NAME1 in reverse order
i.e value should be displayed as "GNIMMARGORP LOBOC"
HOW can I do that ??? please let me know if any one knows
it.

Answer Posted / rajani

working-storage section.
01 name1 pic x(17) value 'cobol programming'.
01 name2 pic x(17).
01 i pic 99.
01 j pic 99 value 1.
procedure division.
perform para varying i from 17 by -1 until i<1.
display name2.
stop run
para.
move name1(i:1) to name2(j:1).
add 1 to j.

Is This Answer Correct ?    11 Yes 1 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?

1379


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)?

1174


Mention the guidelines to write a structured cobol program?

1137


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

1156


What is the difference between structured cobol programming and object alternativelyiented cobol programming?

1278


Which division and paragraphs are mandatory for a COBOL program?

1327


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

1308


What are all the divisions of a COBOL program?

1267


What is length is cobol?

1152


Whats the difference between search & search ALL?

6655


How to remove 2 duplicate records and copy only one using job control language?

1257


Discuss about changing dataset name in proc.

1288


Difference between array and sub-script ?

1702


What is the LINKAGE SECTION used in COBOL?

1597


Can we change the password using ALTER? anyone tried and changed?

2075