Re: 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
Answer / sruthi
Hi Subu,
first of all the size of the var NAME1 is 13. You are
passing more than 13 chars. Some data will be truncted.
There are 2 methods to reverse the string.
one is move reference modification.it is very lengthy
process and other is reverse function.
syntax: move function reverse(NAME1) to NAME2
| Is This Answer Correct ? | 12 Yes | 0 No |
Answer / praveen ellur
Reverse function in Cobol will do this for u.
Here is the syntax.
FUNCTION REVERSE ('COBOL PROGRAMMING')
| Is This Answer Correct ? | 5 Yes | 0 No |
select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself
How do u initialize an array?
How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(20) value " cobol language". 01 data-name-2 PIC x(20). MOVE data-name-1 to data-name-2. would like the value of data-name-2 is "cobol language".
what are decleratives in cobol?
Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a
What happens when we move a comp-3 field to an edited (say z (9). Zz-)?
Suppose i want to declare a binary comp fild of 7 byte .how to write?
Can anyone please give the example of Inline Perform.
How to pass return codes from cobol to jcl?
if we have " ibm mainframe ",in that how to remove first and last leading space eg:"ibm mainframe" like that the answer we need
When the working storage variables get allocated? a.At Compile time b.At starting of the run time c.At end of the run time. d.None of these
how do you reference the variable unblock file formats from cobol programs