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...


i have the following varibles in the working storage

05 ws-A PIC X(30)
VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ '
05 WS-B REDEFINES WS-A
10 WS-B1 PIC X(10).
10 WS-B2 PIC 9(10).
10 WS-B3 PIC X(10).

If I Display B1, B2 and B3 respectively, what is the value
displayed in B2

Answers were Sorted based on User's Feedback



i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / sandy

It will not show variable mismatch error.
It will display KLMNOPQRES.

Is This Answer Correct ?    16 Yes 2 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / jibin jacob

there is no error.....
it will display 'klmnopqrst'

***********code************
identification division.
program-id. fst.
environment division.
data division.
working-storage section.
01 qs pic x(30) value
'abcdefghijklmnopqrstuvwxyzabcd'.
01 qs-r redefines qs.
02 qs-r1 pic x(10).
02 qs-r2 pic 9(10).
02 qs-r3 pic x(10).
01 aa pic 9.
procedure division.
p1.
accept aa.
display "r1=" qs-r1.
display "r2=" qs-r2.
display "r3=" qs-r3.
stop run.

Is This Answer Correct ?    5 Yes 0 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / kk

Hi,
klmnopqrst will displayed no compilation error and runtime
error it will work normally.

Is This Answer Correct ?    8 Yes 4 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / giri12

KLMNOPQRST will be displayed.

Is This Answer Correct ?    4 Yes 1 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / venkat reddy.madathala

It will display KLMNOPQRES.

Is This Answer Correct ?    2 Yes 1 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / mr.perfect

i have compiled and run it , it is workign fine.
the output format is
B1:ABCDEFGHIJ
B2:KLMNOPQRES
B3:TUVWXYZ

Is This Answer Correct ?    0 Yes 0 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / shubham

ABCDEFGHIJ
KLMNOPQRES
TUVWXYZ

Is This Answer Correct ?    0 Yes 0 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / satish

It will shows variable miss match error

Is This Answer Correct ?    7 Yes 8 No

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCD..

Answer / anand

isn't this a compilation error? A value clause cannot be
associated with a variable that is redefined.

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More COBOL Interview Questions

Mention the guidelines to write a structured cobol program?

0 Answers  


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,


What care has to be taken to force program to execute above 16 Meg line?

1 Answers  


What is the LINKAGE SECTION used for?

4 Answers  


What is Comm?

2 Answers   IBM, Kemper Corporation,


have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records...

2 Answers   ITC Indian Tobacco Company, PNP, TCS,


Are you comfortable in cobol or jcl?

0 Answers  


db2 variable decimal(15,2) what is the equalent size of cobol variable

2 Answers   Syntel,


If we use GO BACK instead of STOP RUN in cobol?

2 Answers   Temenos,


01 xxx pic 9(4). 01 yyy pic 9(6). move 123456 into yyy. move yyy to xxx. display yyy. what would be the value of yyy

13 Answers   HSBC,


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

2 Answers   L&T,


The maximum number of dimensions that an array can have in COBOL-85 is ?

11 Answers  


Categories