View previous topic :: View next topic
|
Author |
Message |
Manjunathahm
New User
Joined: 22 Jul 2009 Posts: 6 Location: Bangalore
|
|
|
|
Hi,
I am facing S0C4 issue when CICS main module(compiled with Amode 31) is calling a Assembler subroutine(Amode 24).
can you please provide some inputs to resolve this issue.
Thanks,
Manjunath |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
In all likelihood, your main module is using variables with 31-bit addresses and passing one or more of these to the Assembler routine. The Assembler routine cannot address these and is trying to locate them at the address speified by the low-order 24bits of the address.
How is your transaction's TASKDATALOC defined? If 'Any', try setting to 'BELOW'.
Garry. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Try compiling the COBOL program using the DATA(24) compile option (default is DATA(31)).
Also, creating a LINKAGE ASSIST sub-program is an alternative.
One other pithy comment; You're calling a sub-program not a sub-routine.
Bill |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Does the Assembler sub-program use its own internal Program Storage or Dynamically Acquired Storage?
If it's Program Storage, then this raises a non-reentrant access and you could be opening yourself up for a problem in the future.
To check for non-reentrancy in the sub-program, Assemble it using the RENT option or specify *PROCESS RENT as the first line in the source code.
Alternatively, you could pass reentrant COBOL WS (from the CICS COBOL program) to the Assembler sub-program as an additional parameter.
Bill |
|
Back to top |
|
|
Manjunathahm
New User
Joined: 22 Jul 2009 Posts: 6 Location: Bangalore
|
|
|
|
Hi Folks,
Many thanks for the response.
As advised I have recompiled the main module(ABC) with A24 mode (below line) option. But when the Screen program(M01) XCTL's to main module ABC its abending with 4038.
error message :
CEE3191E An attempt was made to initialize an AMODE24 application without using the ALL31(OFF) and STACK(,,BELOW) run-time options.
Again i recompiled screen program with Amode 24 option. but i am getting same abend.
Can you please provide some inputs to resolve this issue.
thanks,
Manjunatha HM |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Is there a compelling reason why the Assembler sub-program is AMODE(24)?
BTW, you can change LE options on the fly via CICS transaction CLER.
Bill |
|
Back to top |
|
|
Manjunathahm
New User
Joined: 22 Jul 2009 Posts: 6 Location: Bangalore
|
|
|
|
Also i have been advised by production guys that sub-program works successfully only when i compile my main module with Amode 24.
Hence i am trying to resolve the above issue coming from screen program. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You didn't answer my question.
Why is the Assembler sub-program AMODE 24?
What is the compelling reason?
If it's just data manipulation, then AMODE 31 should be OK.
Unless it's issuing SVC's, using DCB's, etc, I don't understand the reason?
Besides, issuing the above in CICS is a big no no.
I take it that this is a CICS Dynamic Call and not a Static Call?
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Production guys don't know how to assm/link above the line. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
dbzTHEdinosauer wrote: |
Production guys don't know how to assm/link above the line. |
Dick,
Oh gosh, now you've done it....
Bill |
|
Back to top |
|
|
Manjunathahm
New User
Joined: 22 Jul 2009 Posts: 6 Location: Bangalore
|
|
|
|
Hi Bill,
I could see the below comment in all main modules which are calling that assembler subroutine.
NOTE: MUST BE COMPILED BELOW THE LINE - CALLS Assembler subroutine xyz which calculates the length of Varchar field.
thanks,
manjunath |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
do I have to repeat myself?
actually, if the assm module only calculates the length of a var char field
do it in COBOL |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
The sub-program doesn't sound like it's too big?
Could you post the sub-program without getting in any trouble with your organization?
If what you say is 100% accurate, then there's no reason this needs to be done in Assembler.
If it's just issuing a TRT (Translate and Test) to calculate a field length, this can be done in easily COBOL (as Dick has suggested) using an INSPECT.
Is the sub-program looking through the passed parm, locating the first SPACE, which would indicate the data LENGTH-1?
Because many people don't know Assembler, it would be wise that this be done in COBOL for maintenance purposes. It would also eliminate the AMODE 24 problem that you're up against.
Also, a TRT has a 256-byte search limitation (Operand 1), whereas, if you let COBOL do it, that restriction is waived.
What's your version of COBOL? I ask this because if you're on OS/VS COBOL (the predecessor to VS/COBOL II), then you'd need to use a TRANSFORM (as opposed to an INSPECT), which should NEVER be used in CICS.
Otherwise, you can roll your own....
Bill |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Bill,
I think the TS is waiting on responses from his thread Carrier as CICS Admin
and is probably going to a/Rmode24 everything in cics,
since he obviously does not want to ruffle the feathers of his potential new co-workers,
until that is,
they run out of 16meg space. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
unless they are so sophisticated to use a TRTE |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Enrico,
Yes, TRTE is the new extended TRT for > 256 bytes, although I've never used it....
Bill |
|
Back to top |
|
|
Manjunathahm
New User
Joined: 22 Jul 2009 Posts: 6 Location: Bangalore
|
|
|
|
Hi Folks,
As suggested I will be using cobol verb LENGTH OF Var-name to get the length of VARCHAR Field. That should resolve my current issue.
But i still wonder how this abend could be resolved when i compile my module with Amode24.
CEE3191E An attempt was made to initialize an AMODE24 application without using the ALL31(OFF) and STACK(,,BELOW) run-time options.
Thanks once again for the Overwhelming response |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Manjunath wrote: |
using cobol verb LENGTH OF Var-name |
No, that is wrong. you will then have every var-char with the same length.
LENGTH OF always returns the length of the field, never the contents.
as Bill suggested, and you ignored,
you need to INSPECT the data contained in the field to determine the length of the data. |
|
Back to top |
|
|
Earl Haigh
Active User
Joined: 25 Jul 2006 Posts: 475
|
|
|
|
If program is defined with DAtalocation Below, then must be assembled AMODE24
DAtalocation : Below Below | Any |
|
Back to top |
|
|
|