What will happen if we move SPACES to numeric field and
ZEROES to alphabetic field?

Answers were Sorted based on User's Feedback



What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / varun v

1) Move Spaces to Numeric field:

Here program would give compilation error saying Spaces
to Numeric integer did not follow the "MOVE" statement
compatibility rules.

2) Move Zeroes to Alphabetic field:

Would work fine with Movement of Zeroes to the
Alphabetic field.

Is This Answer Correct ?    20 Yes 4 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / aliya

It will give SOC7.

Is This Answer Correct ?    9 Yes 5 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / ram.g

ans to last ans

anything you can move to alpha...provided ..ur input is w/n
quotes...


ans to ur qn...

its quite possible by using redefine command...

the field will be sharing same memorylocation..

eg: 05 ws-num pic 99
10 ws-char redefines ws-num pic x(2)

move 12 to ws-num
move 'ab' to ws-char

Is This Answer Correct ?    4 Yes 0 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / ram.g

sorry for post 3 2nd ans

it supposed for the qn ...x(7) to 9(9) nd vice versa..
plz refer the qn...

Is This Answer Correct ?    3 Yes 0 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / sivakumar sekharannair

compile error will occure if zeroes moved to alphabetic
field or spaces moved to numeric field.

Is This Answer Correct ?    5 Yes 4 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / jayaprabhu

spaces to umeric field will give data exp error soc7

bocz we cant move the spaces to numeric field

Zeroes to alphabetic we cant bcoz zeroes is numeric we cant
move into the alphabetic if we move it will give soc7

But using redefines we can moves num-alpa, alpa -num
these kind we use for copybook where in if you have one
field need to change for num/alpa.instead going for new
copybook .

Is This Answer Correct ?    1 Yes 1 No

What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?..

Answer / thavasi

all above answers are incorrect.


Move SPACES to numeric field:
=============================

Moving spaces/non-numeric to numeric won't give any
compilation error or S0C7.

S0C will occur only when u do computation with non-numeric data.

ZERO to alphabetic field:
========================

MOVing ZEROS to alphabetic - will result in compilation error.

Is This Answer Correct ?    5 Yes 7 No

Post New Answer

More COBOL Interview Questions

What is the difference between SEARCH and SEARCH ALL?

6 Answers   Cognizant,


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 is diff betn PS and ESDS file? What is the diffrent compiler options in cobol and there discription? What is retrive nth maximum salary from salary DB2 table. Can we redefine COM-3 variable with varchar variable?

4 Answers  


What are the different rules to perform a Search?

0 Answers  


) what is the difference between AID and HANDLE AID?

0 Answers   IBM,






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

7 Answers  


what is ASRA, AEY9?

2 Answers   IBM,


i need a small 3d program using inline and outline.

0 Answers  


HI THIS IS ANIL. HOW TO PASS A RECORDS OF A FILE(PS OR PDS) TO AN ARRAY?

2 Answers  


What is the difference beetween Arrays and Tables in Cobol? please dont give the answer that arrays in cobol terminology is called tables......

3 Answers   BirlaSoft,


How many bytes will be allocated for the following record description entries? 01 REC-A. 05 A PIC S9(4). 05 B PIC XXXBXXX. 05 C PIC ____9.99. 05 D PIC S9(5) COMP-3. 05 E PIC 9(3) COMP.

16 Answers   IBM, TCS,


we can use set true for condition names.. similarly can we code set to false in cobol pgm? will it work?

1 Answers  


Categories