View previous topic :: View next topic
|
Author |
Message |
Ezra Walters
New User
Joined: 29 Jan 2023 Posts: 1 Location: Jacksonville
|
|
|
|
Hi All,
Received a S0C7 after issuing a call to I/O subprogram. Subprogram reads DB2 tables, but when it returned to the calling program, the WS fields used as accumulators are getting S0C7 when ADD statement is issued by calling program. I know it is overlaying the storage area where the fields are defined.
Any idea on resolution.
1)WS field is COMP-3, with Value clause zeros.
2) My first APS program, it was cloned, I think it is static call |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Zero useful information presented.
Not enough data to give any response except: “There is a bug somewhere in your code”
Try to trace step-by-step every operation, - between reading DB2 tables, and the failed attempt to use COMP-3 field(s). |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Welcome !
1. Review the called module how does it populate ws variables that you are receiving. If it’s working submodules for years then it’s an issue in callling module.
2. Review calling module to make sure you initialize all IO variables and then populate values as needed for called program before issuing a call statement.
3 once you get control back from the called module do primary validation of received data like IS NUMERIC or using db2 functions and trap any errors here .
4. Btw, You can easily tell it’s it’s static or dynamic call , if you have used program name in single quotes during the call then it’s static and if you have used variable name then it’s dynamic.
If everything is good then go forward with compute or ADD .
Good Luck 👍 |
|
Back to top |
|
|
|