GAFUR
New User
Joined: 19 May 2005 Posts: 31
|
|
|
|
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 |
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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. |
|