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 / nanda
*********************** Top of Data ****
ID DIVISION.
PROGRAM-ID. ALLINONE.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-DATE1.
05 DD PIC 9(2).
05 MM PIC 9(2).
05 YY PIC 9(4).
01 WS-DATE2.
05 YY PIC 9(4).
05 MM PIC 9(2).
05 DD PIC 9(2).
PROCEDURE DIVISION.
ACCEPT WS-DATE1.
MOVE CORR WS-DATE1 TO WS-DATE2.
DISPLAY WS-DATE1.
DISPLAY WS-DATE2.
STOP RUN.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to get the last record in vsam file in cluster? And how can you get the ksds file records into cobol program?
What are the access modes of START statement?
Write a program that uses move corresponding.
What is the difference between PIC 9.99 and PIC9v99?
What are literals?
Can we change the password using ALTER? anyone tried and changed?
) what is the difference between AID and HANDLE AID?
What is a SSRANGE and NOSSRANGE?
What rules are to be followed while using the corresponding options?
What is the usage of comp fields in cobol?
if we display var1 then what will b displayed in below condition. 77 var1 pic s9(2) value -10. 77 var1 pic s9(2) value -11. " " " -12. " " " -13. -14 ... ... -19.
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What are the different types of condition in cobol and write their forms.
How do you reference the following file formats from cobol programs?
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?