soc-7 is a bad data,invalid data.
when ever we are moving the alphabets in the position of
numeric then we got this abend. so my question is if
o1 ws-data pic 9(1) value passing the alphabet some x. then
we got soc-7 or not? i want clarification ?
Answers were Sorted based on User's Feedback
Answer / manju
Hi,
Sruthi's answer is completely wrong.
Guys, If you are not clear with the answer then please dont
post it. This website is refered by many and you may lead
them to wrong direction. Even if you post when you are not
clear, then mention it clearly that you are not sure about
the answer and ask somebody else's suggestion to correct if
that is wrong. Dont post the wrong answer as such you are
sure.
The answer for the above question is:
Yes, S0C7 is data exception, However it is no where related
with move statement. Move statement (Alphanum or Alpha to
Num) and (Num to Alphanum or Alpha) never give you any
abend or error. The move happens either ways.
the simple answer for the above question is "No" you wont
get any abend for the above move statement.
S0C7 comes only when you use Alphabetic feild for
arithmatic operation OR a Numeric feild containing an
alphabet and used for arithmatic operation.
I dont think i am wrong here.. If anybody feels please
correct me.
Thanks,
Manju.
Is This Answer Correct ? | 10 Yes | 3 No |
Answer / mridul
Hi all,
i think we will not get SOC 7, but we will get error while
moving alphabetic value to numeric field.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / jaganmohanreddy
hai manju u said for arthimatic expressions we will get
this abend not only for this when u trying to read file in
cobol it has alphanumeric data but the corresponding field
described in file description has 9(5) something numeric
pic clause we will get this abend just check it once u have
any doubt so soc7 is for invalid data , when u try with
move statemets with data exception u will get runtime error
check it also once, and u said numeric field containg
alphabet using for arthimatic exp then we will get this ,i
have one doubt how numeric filed will contail alphabetic
data just clear my doubt please
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / tania
So Manju u mean to say if we try to move spaces to Numeric
field (PIC 9(5) for ex) u wont get any abend ??
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sruthi
Hi,
we can pass numeric data to alphanumeric.bcz x accept
both numerica alphabets.
if we pass numerics to alphebets like 9 to a we will get
that kind of error.
Is This Answer Correct ? | 4 Yes | 9 No |
which one is better among static call and dynamic call?
how we separate the cobol cics statements from cobol&cics programming?
The disposition parameter in the jcl is share ( DISP+SHR ) and the program opens file in extend mode what will happen?
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning
What is report-item?
i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?
can we use 77 level no for Redefines?if we use give an example?
What is difference between COBOL and VS COBOL II?.
What is binary search?
Minimum how many Number of Paragraphs are there in ID- Divison?
What are the differences bitween cobol and cobol-2?