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
What is length is cobol?
Which Search verb is equivalent to PERFORM…VARYING?
how can we apply for HSBC exam(Mainframe) in India??? i went to their site and was told to submit my CV ,. etc..( totally confusing...)
Mention the guidelines to write a structured cobol program?
IF I mention stop run in CICS what happens?
How can you get the ksds file records into your cobol program?
Write some characteristics of cobol as means of business language.
How do we get current date from system with century in COBOL?
What is the local-storage section?
Why did you choose to work with ibm mainframe cobol programming?
example for sub strings ? and refernce modifications whit output pls
I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue
I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?
Why occurs cannot be used in 01 level in COBOL?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?