View previous topic :: View next topic |
Author |
Message |
vkrishna2001 Beginner
Joined: 07 Aug 2003 Posts: 46 Topics: 18 Location: Danbury
|
Posted: Sat Dec 27, 2003 11:17 pm Post subject: S0C7 abend |
|
|
Hi
One of our VS-Cobol program fails with S0C7. The abend-aid report clearly tells that the statement causing the failure is
IF WS110-PCC-AMOUNT (XTBL1) IS GREATER THAN 0
At the time of abend the table field
WS110-PCC-AMOUNT (XTBL1) contains a value
X'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'
In the working storage section this field is defined as
WS110-PCC-AMOUNT PIC 9(13)V99.
Is there a possibility that this statement does cause the failure and if so why? How the comparison is done?
All ideas are welcome.
Thanks,
Vijayakrishna |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Sun Dec 28, 2003 2:40 pm Post subject: |
|
|
Vijayakrishna, if you're going to compare a variable with zero, then it needs to be numeric, i.e. each digit needs to be in the range X'F0' to X'F9'. The failure occurs in the conversion of your variable to packed decimal format. Recompile your program with the 'LIST' option, then have a good look at the Assembler instructions generated for the compare. _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
vkrishna2001 Beginner
Joined: 07 Aug 2003 Posts: 46 Topics: 18 Location: Danbury
|
Posted: Wed Dec 31, 2003 1:24 pm Post subject: |
|
|
Mervyn,
Thanks for the help. The compile parameter LIST did not work but PMAP worked.
Vijayakrishna |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Wed Dec 31, 2003 4:46 pm Post subject: |
|
|
Ah, yes. You're using a very old compiler. I'm glad you worked it out.
Happy New Year. _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
|
|