I am executing a program which calls another program statically. My called program is abending before it enters the procedure division. There are some parameters passed to the called program. Could someone help me with this??
Joined: 02 Dec 2003 Posts: 151 Location: Tokyo, Japan
From Manual, S0C4 means -
PROTECTION EXCEPTION - A VIRTUAL ADDRESS COULD NOT BE TRANSLATED INTO A REAL ADDRESS. --POSSIBLE CAUSE-- INVALID ADDRESS WAS REFERENCED DUE TO SUBSCRIPT ERROR OR BAD PARMS THE KEY OF AN INSTRUCTION OR AN OPERAND IN STORAGE DOES NOT MATCH THE PROTECTION KEY IN THE PSW (INTERRUPT CODE 4) THE VIRTUAL SEGMENT OR PAGE WAS NEVER ALLOCATED (INTERRUPT CODE 10 OR 11, RESPECTIVELY) THE PAGE WAS PAGED OUT AND THE ROUTINE REQUESTING THE CODE WAS DISABLED FOR I/O INTERRUPTS (INTERRUPT CODE 11) COBOL - IN GROUP MOVE, RECEIVING RECORD VARIABLE LENGTH DEFINED WRONG - TRIED MOVING VAR. LENGTH REC. LARGER THAN TARGET FIELD MAX - TRIED TO READ OR WRITE A FILE WHICH WAS NOT OPEN - USED DD DUMMY AND LOGIC SAYS AT END MOVE HIGH VALUES TO FD - TRIED TO CALL WITHIN COBOL F SORT INPUT/OUTPUT PROCEDURE - U WITH SORT - TRIED TO GOBACK IN THE OUTPUT PROCEDURE
For more specific answer, give us more details, your parm structutr on called and calling program and the code while calling the sub program and other relevant information.
1. Please check the length of your calling program and called program. Both should match and equal.
2. In Called program , under linkage section, please specify first varible as length variable with S9(4) Comp. In called progra check the record length. Hope called program record structure is not matching with calling program record structure.
3. As per the error descriptions provided by you , your program is dealing with COBOL FILES concepts. you are trying to read / write a file with out OPENenig a file. so, please check in called program whether you opened a file or not.
Please let me know, if it works / any issues. Thanks.
I am executing a program which calls another program statically. My called program is abending before it enters the procedure division.
First things first, verify that the link/binder map shows that the called module is actually statically linked to the version of the calling module you are testing. If that means recompiling the calling program with a unique flag in WS, so be it.....
Check that link map and check the abend dump for the unique flag.....
Rule #1: Eliminate the uncertainty, know that what you are executing is matched to the listing and link map.