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 |
what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length
db2 variable decimal(15,2) what is the equalent size of cobol variable
if a file has 1000 recods how copy the records from 1 to 100 records using sort
What is the default value of DISP for temp datasets
Give some examples of command terminators?
I have one ps file in which there are 3 fileds emp_no,emp_name and leave_app.this ps file information give the detail of employee which is going to apply for leave.suppose emp_no=113430,emp_name=ajay,leave_app=1 that means he is going to apply for 1 day leave.and accordingling the table in db2 will be updated means if he has that no of leave in his account then he will get dat leave and updated acc. in table(leave_balance=previous leave present in table-leave_app).Now i want to check whther the updated result is correct or not by comparing the two ps file using IEBCOMPARE or icetool so what is going to be the two ps file and how its is going to be compare.
write a program to eliminate duplicate records in a input file and send them to output file.THIS IS IGATE RECENT QUESTIONN.....JUST 1 WEEK BACKKKK...
sample code for read a 2nd record from last in flatfile how can do?
can we redefine 77 level item is it possible
what is the difference between Normal vaiable and comp variable.
which is better comp or comp-3 in terms of memory utilization?