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 |
Difference between file status codes 02 and 22.... since both are for duplicate key detection.
In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data inside the table)
The maximum number of dimensions that an array can have in COBOL-85 is ?
COMPUTE X = A * B - C * D and COMPUTE X = (A * B) - (C * D) (a) Are not the same (b) Are same (c) Syntactically wrong (d) Will yield a run time error
How to find whether a Flat file is empty or not without Reading a file in COBOL Program. (not using JCL)
How can you submit a job from COBOL programs?
How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree
I am getting S00F abend when i try to compare two variable of different pic class,one variable is of 9(09) and another is S9(09) comp-3. First i moved the data from S9(09) comp-3 to 9(09), but no luck. So i tried to move the data from S9(09) comp-3 to X (09) and move to 9(09). I am getting same error message, Please help me to find solution for this ptoblem. ERROR MESSAGE - "The system or user abend S00F R=NULL was issued."
How To move a value to an array using move verb?
What is rmode(any) ?
How arrays can be defined in COBOL?
is it possible to pass an SQL query inside a jcl which is inside a cobol program?