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.
Answers were Sorted based on User's Feedback
Answer / elite group
c) PIC clause can't be specified the group item
| Is This Answer Correct ? | 18 Yes | 0 No |
Answer / 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 |
Answer / craig
In previous answer,
01 W-DATE-NUM PIC 9(6).
01 W-DATE REDEFINES W-DATE-NUM.
05 DD PIC 99.
05 MM PIC 99.
05 YY PIC 99.
should be the code block at the bottom, sloppy cut and
paste, sorry.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sachin
We never specified pic clause on group level item.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / anshu puri
cobol dont allow to use PIC clause at 01 level
| Is This Answer Correct ? | 2 Yes | 7 No |
2)Where the Plan is located in CICS-DB2?
wht is the difference between goto and perform stmts
can we use full outer join with cursors declared in cobol program?
Q:what is the difference between the variable length and fixed lenght.how it varies in the cobol.
How is sign stored in a comp-3 field?
Which division and paragraphs are mandatory for a COBOL program?
How to read the last 100 records from a COBOL file. The file contains N number of records.
consider the following piece of code 01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
what will happen if pass values more than 100 using PARM parameter?
what is Reentrancy and Quasi-reentrancy?
Can we MOVE X(9) to 9(9) OR 9(9) to X(9)? If yes what are the ways for doing this?
12 Answers T systems, Tech Mahindra,
What is the meaning of 'Eject' verb in cobol?