View previous topic :: View next topic
|
Author |
Message |
Rajshekhar
New User
Joined: 30 May 2022 Posts: 2 Location: India
|
|
|
|
Hello Team,
I am trying to call a new Cobol Db2 program from an existing Assembler program using Dynamic call. I am getting SOC4 abend(Protection exception) during run time.
Tried various combinations compile parameters to compile the new cobol DB2 but getting SOC4.
My Assembler program has many existing calls to other cobol programs and they are working fine. I compiled my existing cobol program with my compile JCL and existing pgm also giving SOC4.. I am using Registers R14 and R15 while calling the new Cobol DB2 pgm..
Could you please let me know how to resolve this abend.
Below are some of the compile parameters I used while compiling my new Cobol DB2 program
COPTS='LIB,RENT,DATA(31),OFFSET,MAP,TERM,DYNAM',
LOPTS='LIST,AMODE=31,MAP,LET,RENT,DYNAM(DLL),RMODE=ANY
SSrange, notest, nooffset and Reus |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2127 Location: USA
|
|
|
|
Besides “using registers 15 and 14” you need also to pass the correct R1, to pass parameter exactly as it is expected by COBOL program.
Did you test your COBOL program without calling it from Assemble, - using normal JCL as // EXEC PGM=cobolpgm ? |
|
Back to top |
|
|
Rajshekhar
New User
Joined: 30 May 2022 Posts: 2 Location: India
|
|
|
|
Thanks for your reply..
yes I tried executing my new Cobol DB2 program directly from JCL and its working fine.
When I call it via Assembler program, it abends at the entry point of Cobol itself with Memory protection exception.
tried various combinations of AMODE and RMODE values but no luck. |
|
Back to top |
|
|
hankoerlemans
New User
Joined: 25 Jan 2018 Posts: 61 Location: Australia
|
|
|
|
Can I sell you a debugger ? :-)
Sergey gave you a clue. What is R1 pointing to ?
Did you generate a SYSMDUMP ?
If so IPCS can help if you don't have anything more sophisticated. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2127 Location: USA
|
|
|
|
Passing R1 to simulate standard JCL PARM= field has nothing to do with “playing with AMODE, an RMODE”, unless you are using different addressing modes in two of your programs.
Please, RTFM about simulation of PARM= string when calling from Assembler. Even when no PARM is used, an empty string MUST be simulated. |
|
Back to top |
|
|
|