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 the default value(s) for an initialize? What keyword will allow for an override of the default?
input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.
How to read the 2nd last record of a VSAM file? (The file size is huge and we don't know the key)
What are the different open modes available in cobol?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?
) How do u handle errors in BMS macro
What are the cobol coding sheets?
what is difference bt COND, REGION & TIME parameters at JOB & EXEC. give an exp.
What is rmode(any) ?
Write the code implementing the perform … varying.
What is amode(24)?
i want a program using by if, evaluate , string, unstring, perform, occurs?
Write a program that uses move corresponding.
What is a report item?