IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ASSEMBLER: Got Abend during calling a Subprogram


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GAFUR

New User


Joined: 19 May 2005
Posts: 31

PostPosted: Tue Sep 25, 2007 5:46 pm
Reply with quote

Hello Assembler guys,

I am learing assembler and practising simple programes of assembler in my mainframe. i just coded a Cobol main program and called a assembler subprogram. But during execution got U4038 abend following. I dont have much idea about AMODE and RMODE. Can someone take a look why is it got abend?.

Also i want to know is it possible to call a Cobol subprogram from assembler mainprogram?

CEE3191E AN ATTEMPT WAS MADE TO INITIALIZE AN AMODE24 APPLICATION WITHOUT USING THE ALL31(OFF) AND STACK(,,BELOW)
RUN-TIME OPTIONS.
FROM COMPILE UNIT SUB1 AT ENTRY POINT SUB1 AT COMPILE UNIT OFFSET +000003EA AT ENTRY OFFSET +000003EA AT
ADDRESS 12801152.


Main program:

IDENTIFICATION DIVISION.
PROGRAM-ID. SUB1.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
77 WS-PGM PIC X(8) VALUE 'SUBASM1'.
LINKAGE SECTION.
PROCEDURE DIVISION.
CALL WS-PGM.
GOBACK.

Assembler Sub program.

SUBASM1 CSECT
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SUBSAVE+4
LA 13,SUBSAVE
WTO 'HELLO FROM SUBASM1'
L 13,SUBSAVE+4
L 14,12(0,13)
LM 0,12,20(13)
BR 14
SUBSAVE DS 18F
END
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Sep 25, 2007 8:01 pm
Reply with quote

Hello,

Quote:
Also i want to know is it possible to call a Cobol subprogram from assembler mainprogram?
Yes, it is.

You should talk with your system support people and ask for the proper jcl to assemble and link your module. Once you use the correct link jcl, the xMODE conflict should be resolved.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts How to go into a subprogram in IBM De... IBM Tools 5
Search our Forums:

Back to Top