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 |
01 var1 pic x(10) 01 var2 redefines var1 pic 9(10). then in procedure division move 'abcde' to var1 then waht is the value of var1 and var2
how can i see junk values in dclgen or in hostvariable of comp ?
When search all is used in cobol program without sorted input data?
6 Answers CGI, Principal Finance,
i have a sequencial file contains multiple records, i want to extract one row which contains various fields like order number,date,warehouse,.ect.. in to the another file by accepting the order number from jcl. how can i do it. pls help me..
Write down the divisions of cobol program?
what is the use of keep and pass in disp
How many divisions we have in Cobol ?
How is sign stored in Packed Decimal fields and Zoned Decimal fields?
consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
What are the various section in data division and briefly explain them.
what is s000 u4087 error? please give the all error codes in cobol,jcl.
wht happens if we dnt give scope terminator ?