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 / reshma j.
INPUT-DATE has value of 09032010.
In working storage:
01 INPUT-DATE.
03 MM1 PIC 9(2).
03 DD1 PIC 9(2).
03 CCYY1 PIC 9(4).
01 PRINT-DATE.
03 CCYY2 PIC 9(4).
03 DD2 PIC 9(2).
03 MM2 PIC 9(2).
In Procedure Division:
MOVE MM1 TO MM2.
MOVE DD1 TO DD2.
MOVE CCYY1 TO CCYY2.
After Moving values,PRINT-DATE value will be 20100309.
In this cond,Its totally depend on how we declare format in
working storage section.
plz let me know,if i m wrong.
| Is This Answer Correct ? | 14 Yes | 1 No |
Post New Answer View All Answers
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.
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What is report-item in COBOL?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
What is rmode(any) ?
What is the difference between Global and External Variables?
How do you define a variable of comp-1 and comp-2?
HOw can I get the negative sign while deduct high value from low value
What is the Purpose of POINTER Phrase in STRING command in COBOL?
Can we change the password using ALTER? anyone tried and changed?
What is the difference between structured cobol programming and object alternativelyiented cobol?
What are the pertinent COBOL
how to convert the recors form vsam file to db2 table tru file aid
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?