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.

Answers were Sorted based on User's Feedback



01 NAME1 PIC X(13) VALUE "COBOL PROGRAMMING". 01 NAME2 PIC X(13). now I want to ..

Answer / rajul

declare
01 NAME2 PIC X(13) RIGHT JUSTFIED.

MOVE NAME1 TO NAME2.
DISPLAY NAME2.

Is This Answer Correct ?    1 Yes 13 No

Post New Answer

More COBOL Interview Questions

1.What is the default print format in cobol?

5 Answers   HSBC,


Explain the configuration section of a cobol program with examples of syntax.

0 Answers  


What are the pertinent COBOL

0 Answers   IBM,


given the following piece of code: CALL SUB-PGM USING A, B, C. CALL SUB-PGM USING A, C, C. (a) Both CALL statements will always produce same result. (d) Both CALL statements may produce different result. (c) Compile-time error because SUB-PGM is a dataname. (d) Compile-time error because A, B, C are used twice.

2 Answers   TCS,


when COMP-3 is preferrable?

3 Answers   Patni,


What is length is cobol?

0 Answers  


consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

5 Answers   TCS,


Hi All, Can anyone tell me how we can MOVE value of a X(19) variable to a S9(17) COMP-3 variable? Answer with an Example will be of great help.

6 Answers   EDS,


why 02 level number can't be use as a separate level number like 01 or 77 ?

3 Answers  


how can we code index in an array of cobol pgm?

1 Answers   Wipro,


can u plz expain me how to declare dynamic array? what is the meaning of depending on clause in dynamic array?

3 Answers   IBM, Satyam,


study the following 01 A PIC 99V0 VALUE 5 01 B PIC 9V9 VALUE 6 01 C PIC 99V9 VALUE 2.5 01 D PIC 99 VALUE 3 COMPUTE A ROUNDED B C = A+B*C/D ON SIZE ERROR PERFORM PRINT-ERROR the comments of A.B.C after execution of the above statement are a.A=10 B=0 C=10 b.A=10 B=9.9 C=9.9 c.A=10 B=0 C=9.9 d.A=10 B=6 C=10

4 Answers   TCS,


Categories