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
Have you used the sort in your project?for this type of questions any working on real time project give the eg. with real time scenario.
How do u write test cases?
What is a SSRANGE and NOSSRANGE?
What are various search techniques in cobol? Explain.
how to access the file from prodution from changeman tool and to submit a file to production
Which is not true about evaluate statement
What is the difference between Global and External Variables?
How arrays can be defined in COBOL?
How do you define a variable of comp-1 and comp-2?
Describe the cobol database components?
What are the different types of condition in cobol and write their forms.
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
what is search and searchall?what is the diffrence between them?give an best example?
What is inspect in cobol ?
What are the different rules for performing sort operation?