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
What is the Purpose of Pointer in the string?
What kind of error is trapped by on size error option?
What do you understand by psb and acb?
How many bytes S(8) comp field occupy and its maximum value?
Can a Search can be done on a table with or without Index?
) How do u handle errors in BMS macro?
What is the difference between PIC 9.99 and 9v99 in COBOL?
what happens if parmparameter passes zero bytes to the program
explain sorting techniques in cobol program?
Which is not true about evaluate statement
Name the sections present in data division.
Have you used comp and comp-3 in your project? And how?
) what is the difference between AID and HANDLE AID?
2 input fles: 2 flat files, with different number of records. both are having unique key for each record and already sorted in ascending order . match these files using unique key and in output only matching key value has to be written. please procide cobol logic
How to get the last record in vsam file in cluster? And how can you get the ksds file records into your cobol program?