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
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 |
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 |
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 |
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 |
Answer / arpan
We need to use Initialize for Numeric and SPACES for Alpha
numeric fields.
Is This Answer Correct ? | 0 Yes | 1 No |
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 |
Answer / guest
IF I-field-name IS NUMERIC
MOVE SPACES TO I-field-name
END-IF
Is This Answer Correct ? | 2 Yes | 4 No |
Answer / guest
IF I-field-name EQUAL ZEROES
MOVE SPACES TO O-field-name
END-IF
Is This Answer Correct ? | 1 Yes | 5 No |
What is SSRANGE, NOSSRANGE ?
If I want to increase the Limit in GDG. What should I do?
What are subroutines ? and how do we pass data to the sub routines?
what is the use of filler in cobol programing?
what will happen if i give program name and member name as different? program runs successful or w'll abend?
What is the figurative constant in cobol?
File status must be checked both while opening and reading the file or only while reading the file?
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..
sample code for read a 2nd record from last in flatfile how can do?
CAN ANY ONE HELP WHAT IS QTP? why it is nessery AND WEN IT IS USED?
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?
Mention the guidelines to write a structured cobol program?