Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

Answer / elite group

c) PIC clause can't be specified the group item

Is This Answer Correct ?    18 Yes 0 No

What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

Answer / rohit

c) PIC can't be specified for a group item.

Is This Answer Correct ?    8 Yes 0 No

What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

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

What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

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

What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

Answer / sachin

We never specified pic clause on group level item.

Is This Answer Correct ?    1 Yes 0 No

What is wrong with the following data declaration? 01 W-DATE PIC X(6). 05 DD PIC 99. ..

Answer / anshu puri

cobol dont allow to use PIC clause at 01 level

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More COBOL Interview Questions

I need to compare 3 variables(dates) and do some processing based on the earliest date. There could be more then 1 date record in any of the 3 fields. What is the best way to code this?

0 Answers  


What are the functions like c or c++ in cobol?

2 Answers  


What will happen if we try to create GDG (+2) generaton instead of (+1) generation?

1 Answers  


What is the local-storage section?

0 Answers  


How To move a value to an array using move verb?

3 Answers   IBM,


how do you reference the printer file formats from cobol programs

0 Answers  


What is mean by maxcc

7 Answers   Syntel,


what is the difference between Plan & package?

1 Answers   IBM,


If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially? For example : Input File 01 02 03 Para 900 Read infile Display Infile rec Read infile Display infile rec Read infile Display infile rec. What will be the output?

2 Answers  


which of the following can be used as a check protection symbol a.Z b.S c.* d.+

2 Answers   TCS,


Write a cobol program making use of the redefine clause.

0 Answers  


how to change picture class of copy book variable inside program?

2 Answers  


Categories