Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

CICS module calling Assembler subroutine

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
Manjunathahm

New User


Joined: 22 Jul 2009
Posts: 6
Location: Bangalore

PostPosted: Thu Jul 01, 2010 11:13 am    Post subject: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Thu Jul 01, 2010 1:06 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 01, 2010 4:05 pm    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 01, 2010 10:50 pm    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
Manjunathahm

New User


Joined: 22 Jul 2009
Posts: 6
Location: Bangalore

PostPosted: Thu Jul 01, 2010 11:14 pm    Post subject: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 01, 2010 11:18 pm    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
Manjunathahm

New User


Joined: 22 Jul 2009
Posts: 6
Location: Bangalore

PostPosted: Thu Jul 01, 2010 11:21 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 01, 2010 11:26 pm    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 01, 2010 11:27 pm    Post subject:
Reply with quote

Production guys don't know how to assm/link above the line.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 01, 2010 11:35 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
Production guys don't know how to assm/link above the line.

Dick,

Oh gosh, now you've done it.... icon_lol.gif

Bill
Back to top
View user's profile Send private message
Manjunathahm

New User


Joined: 22 Jul 2009
Posts: 6
Location: Bangalore

PostPosted: Thu Jul 01, 2010 11:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 01, 2010 11:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Jul 02, 2010 12:35 am    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 02, 2010 12:42 am    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Jul 02, 2010 1:23 am    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

unless they are so sophisticated to use a TRTE
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Jul 02, 2010 1:37 am    Post subject: Reply to: CICS module calling Assembler subroutine
Reply with quote

Enrico,

Yes, TRTE is the new extended TRT for > 256 bytes, although I've never used it....

Bill
Back to top
View user's profile Send private message
Manjunathahm

New User


Joined: 22 Jul 2009
Posts: 6
Location: Bangalore

PostPosted: Fri Jul 02, 2010 4:41 pm    Post subject: CICS module calling Assembler subroutine
Reply with quote

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 icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Jul 02, 2010 4:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Jul 03, 2010 5:45 pm    Post subject:
Reply with quote

If program is defined with DAtalocation Below, then must be assembled AMODE24

DAtalocation : Below Below | Any
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts CICS NEW SIT PARAMETERS CICS BEHAVIOR... Kyle Carroll CICS 0 Fri Nov 04, 2016 11:55 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us