how to display date in reverse order if the pic clause of
the is numeric
suppose date is 09032010 ==> need to print in 20100309
(pic clause is numeric)
Answer Posted / tata
id division.
program-id. exe.
data division.
working-storage section.
01 idate pic 9(8) value 10032010.
01 rdate pic 9(8).
procedure division.
move idate (1:2) to rdate (7:2).
move idate (3:2) to rdate(5:2).
move idate (5:4) to rdate(1:4).
display rdate.
stop run.
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
HOw can I get the negative sign while deduct high value from low value
how do you reference the printer file formats from cobol programs
I have a program with an Array of 5000 occurences which is being passed from 5 sub levels to the front end screen. Thess 5 programs using each 5*2 = 10 different arrays with size as 5000. This is causing the transaction to utilize more storage consupmtion. I am looking to reduce the storage consumption. As part of that initially i thought Dynamic array may solve my problem. After viewing the comments given i see its same as normal array. IS there any other way we can resolve this issue?
example for sub strings ? and refernce modifications whit output pls
how do you reference the rrds file formats from cobol programs
What rules are followed by the search verb.
how do you reference the variable block file formats from cobol programs
What is the default value(s) for an initialize and what keyword allows for an override of the default?
Write the code implementing the perform … varying.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the problem of ordered sequential files access?
In COBOL programming, what is PERFORM? What is VARYING?
Write a program to explain size error.