01 a pic x(4) value 'abcd'
01 b pic 9(3)
can we move from a to b.if possible what would be stored in
b.

Answers were Sorted based on User's Feedback



01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / rajini

We wont get data exception error (SOC7) , the program will
go fine , But the value in b will be junk.

Is This Answer Correct ?    20 Yes 11 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / sumanth toom

Ans 2 is correct and to add further to that..when the
program tries to use this variable 'b', then it will give
S0C7

Is This Answer Correct ?    8 Yes 2 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / rajeumesh

Answer 2 is correct

Is This Answer Correct ?    6 Yes 1 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / krishnarao

Ans 2 is correct. we wont get soc7.

Is This Answer Correct ?    5 Yes 0 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / vikas p o

First thing, when write this code and compile will it
compile sucessfully. If it compiles sucessfuly then if run
JCL will it give SOC7 or not.

Did test it but got error during compliation something like
"MOVE DID NOT FOLLOW COMPATIBILITY RULES".

Ppl can add to this...

Is This Answer Correct ?    4 Yes 0 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / amjith pillai

01 a pic x(4) value 'abcd'
01 b pic 9(3)

Yes, you can move. Try just a move and display B. you will
get abc.

But if you go for an operation (add, move to comp variable
etc) then you will hit SOC7

Is This Answer Correct ?    4 Yes 0 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / mime

No. You would encounter a data error - abend SOC7

Is This Answer Correct ?    13 Yes 12 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / barani dharan

Answer 2 is correct i have tested.

Is This Answer Correct ?    5 Yes 5 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / mainframe user

why do you want to do this? you know it is not compatible.
there is no point in doing analysis for this stuff.

Is This Answer Correct ?    0 Yes 0 No

01 a pic x(4) value 'abcd' 01 b pic 9(3) can we move from a to b.if possible what would..

Answer / satish

Yes We can move that.But I have another question.if we
move 'abcd' to comp variable then how it will get stored??I
know if we move theb it wont abend but dbt know how it will
be stored:-(

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

how to submit a jcl by cobol program. clear me with an example.

3 Answers   HCL,


what is the difference between PA & PF keys?

1 Answers   IBM,


i need the code for this program in cobol. 2 + 1 = 3 4+3=7 6+5=11 8+7=15 10+9=19

2 Answers  


What are 77 levels used for?

0 Answers  


Which of the following characters is NOT valid in column 7? a. - b. \ c. * d. # e. $

4 Answers  






What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

0 Answers   TryTechnicals Pvt Ltd,


input= ,,,, mainframe training ,,, hyderabad .... location.... output1=$ mainframe training in hyderabad location$ output2=**** mainframe training in hyderabad location ****. In this pgn when we give input considering the spaces the output is displayed in this format.Like in the place of ,,,, $ should be displayed likewise.So please helpmeout.

0 Answers  


How will you find the currepted records in a file

2 Answers  


9(2).99 how many bytes take? Why . consider as a byte?

2 Answers  


how do you define single dimensional array and multidimensional array in your cobol?

0 Answers  


What will happen if we generate GDG (+2) version without generating (+1) version?

2 Answers   IBM, T systems,


how to know that the file has 300 records how to acess it?

0 Answers   Hewitt, TCS,


Categories