What is wrong with the following data declaration?
01 W-DATE PIC X(6).
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
(a) Nothing is wrong.
(b) Under W-DATE all level 05 items are having a PIC 99 but
level
01 has PIC X(6).
(c) PIC can't be specified for a group item.
(d) DD, MM, and YY are invalid datanames.
Answer Posted / craig
01 W-DATE PIC X(6).
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
is incorrect.
01 W-DATE.
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
Is correct, and W-DATE has an implied picture clause of
PIC X(6). Group items are always character in usage. To
use a group item that requires another picture clause, you
must do a redefines, ie.
01 W-DATE-NUM PIC 9(6).
01 W-DATE PIC X(6) REDEFINES W-DATE-NUM.
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
How you can read the file from bottom?
Explain how you can characterize tables in cobol?
) how do u code after getting data?
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.
Can we redefine the field of x(200) to less than 200?
please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?
What is the difference between PIC 9.99 and PIC9v99?
Discuss about changing dataset name in proc.
In COBOL programming, what is PERFORM? What is VARYING?
How to change size of Initial number of records to *NOMAX for ALL PF files from perticular library, how can I do that
Whats the difference between search & search ALL?
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...)
What are various search techniques in cobol? Explain.
What is the Purpose of POINTER Phrase in STRING command in COBOL?
What is the difference between Call and a Link?