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

what is rediffine clause?in what situation it can use?give me real time example?

1 Answers   IBM,


If A>B next sentence end-if display 1 display 2. display 3. If a>b, it will display only 3.(the next sentence, ie., after fullstop/period) ____________________________________ if a>b continue end-if display 1 display 2. display 3. If a>b, it Will display 1 2 3 (the next statement) ____________________________________ if a>b continue display 1 end-if display 2 display 3. display 4. If a>b, Will it display 2 3 4 (or) 1 2 3 4 ?

8 Answers   UST,


COMP-3 field occupy ?

8 Answers  


Can you REWRITE a record in an ESDS file? Can you DELETE a record from it?

6 Answers   ABC, IBM, Mphasis, Wipro,


Hi Devolopers.. i need ur help.. i have 3 years of exp in Manual testing and SQL, next month onwards i shifted in to MAINFRAME TESTING... i have ZERO Knowledge abt mainframes.... PLS SUGGEST ME WHAT I LEARN in AMEERPET? mainframe testing or mainframe total devolopment subject... AS a devoloper u know every thing tester what to do PLSSSSSSSSS help me ITS VERY URGENT...

1 Answers  






What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


i Want All cobol ERROR codes?

4 Answers   HCL, IBM,


How can i write a comp-3 variable into a sequential file should i declara the field in the file description as comp- 3?

1 Answers  


Suppose i have a Cobol field of 10 byte. it contains a decimal sign.How to know where is the point location?

1 Answers  


If you are current on the owner of a set, what is the difference between obtain next and obtain first?

0 Answers  


I need to compare two VSAM files, both having 'number' as key. If there is a matching record, write the data into another VSAM file. How will it be possible.

1 Answers   DSRC,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


Categories