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

can i give 9(10) in comp 3 instead of s9(10) ? if i can give wht would be ths ans

2 Answers   DELL,


What is the difference between working storage copybook and linkage section copybook?

5 Answers   TCS,


why mainframe we use not like java as frontend oracle as backend. or not word excel.In there also huge ammount data stored.

2 Answers   TCS,


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.

1 Answers   L&T,


what is the minimum number of lines a Cobol program should have to successfully compile and run

11 Answers   ABC, Societe Generale,






what are the paramater we cannot use in procedure?how many instream we can write in single jcl?can we call instream to catalog and ctalog to instream?

2 Answers   Satyam,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


What is mean by maxcc

7 Answers   Syntel,


where will we code call by content and call by reference dude pls reply soon ?

2 Answers  


TO abend the data sholud open in which mode? 1.new 2.old 3.mod 4.shr

1 Answers   MNC,


01 ws-p pic 9(2). 01 ws-q pic 9(2) value 01. 01 ws-r pic 9(2) value 99. p.d. compute p = q + r what will be result of p ans(00) but my question is that how i got 10 on the place of 00. (truncation will ocuure on right side not left). please tell me ?

6 Answers   L&T,


Categories