I encountered an error when I move spaces to a numeric
field?What should I do to move spaces on that field?help
please.

Answers were Sorted based on User's Feedback



I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / ramesh

first numeric field rediffens alpha numeric field
then you check numeric and move spaces to redifened name
ex:
01 num pic 9(09).
01 num1 rediffens num.
02 num2 pic x(09).

if num is numeric
move spaces to num2
end-if.

Is This Answer Correct ?    20 Yes 0 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / mahesh

Thing is that spaces can't be moved to numeric fields,
u can move only zeros and other numeric values to numeric
fields, spaces can be moved to alphanumeric and alphabetic
fields only.

Is This Answer Correct ?    7 Yes 0 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / nitesh sethi

Use option BLANK WHEN ZERO for that field and initialize
that field.
Initalize will move zeroes to that field and declarion of
that field with BLANK WHEN ZERO will not have zeroes in
that field.

Directly moving spaces to a numeric field is not possible
as it will result in SOC7 Abend

Is This Answer Correct ?    0 Yes 0 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / sundar

Directly move space to numeric fields encount severe error.
But if you move space to another alphanumeric field and
then move to numeric field then this will not get any error.

Is This Answer Correct ?    0 Yes 0 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / arpan

We need to use Initialize for Numeric and SPACES for Alpha
numeric fields.

Is This Answer Correct ?    0 Yes 1 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / sundar

Move space to the numeric field not getting any error.
However if that numeric field involves any arithmatic
operation than it will get abend.

Is This Answer Correct ?    0 Yes 1 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / guest

IF I-field-name IS NUMERIC
MOVE SPACES TO I-field-name
END-IF

Is This Answer Correct ?    2 Yes 4 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / kanika

intialize will solve the purpose.

Is This Answer Correct ?    1 Yes 4 No

I encountered an error when I move spaces to a numeric field?What should I do to move spaces on th..

Answer / guest

IF I-field-name EQUAL ZEROES
MOVE SPACES TO O-field-name
END-IF

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More COBOL Interview Questions

What is SSRANGE, NOSSRANGE ?

5 Answers  


If I want to increase the Limit in GDG. What should I do?

1 Answers   IBM,


What are subroutines ? and how do we pass data to the sub routines?

2 Answers   Xansa,


what is the use of filler in cobol programing?

4 Answers   MAT,


what will happen if i give program name and member name as different? program runs successful or w'll abend?

5 Answers   CTS,


What is the figurative constant in cobol?

1 Answers  


File status must be checked both while opening and reading the file or only while reading the file?

2 Answers  


i have a sequencial file contains multiple records, i want to extract one row which contains various fields like order number,date,warehouse,.ect.. in to the another file by accepting the order number from jcl. how can i do it. pls help me..

4 Answers   CGI,


sample code for read a 2nd record from last in flatfile how can do?

4 Answers   iNautix,


CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?

1 Answers  


Can we dynamically increase the size of occurs clause? i.e In case I an not sure of the size of array and want to increase the size at run time.If yes , how?

1 Answers  


Mention the guidelines to write a structured cobol program?

0 Answers  


Categories