|
View previous topic :: View next topic
|
| Author |
Message |
dsivapradeep
New User

Joined: 06 Jul 2012 Posts: 43 Location: INDIA
|
|
|
|
Hi all,
i called a simple assembler program that displays a message using cobol as
call 'ASMRCEIV'
end-call.
when i executed this cobol i'm getting the following error message in spool.
CEE3191E An attempt was made to initialize an AMODE24 application without using the ALL31(OFF) and STACK(,,BELOW) run-time options.
can somebody tell me what happened here? i'm not able to understand my mistake from this error message. |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The message is from Language Environment and indicates, most likely, that your ASMRCEIV program was compiled with AMODE 24 while your site LE run time options are not set to allow that. Try adding this to your execution JCL:
| Code: |
//CEEOPTS DD *
ALL31(OFF)
STACK(,,BELOW)
/*
|
or you could recompile your assembler program with AMODE 31. |
|
| Back to top |
|
 |
Bill O'Boyle
CICS Moderator

Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Is there any particular reason the sub-program is AMODE 24? Does it contain DCB's (RMODE must be 24) or VSAM ACB access without specifying the "MODE=31" parm (default is 24)?
If neither of the above are present, the sub-program can be Assembled/Linked with AMODE 31/RMODE ANY. The default for IEWL (Linkage Editor) is AMODE 24/RMODE 24.
If DCB's are in the sub-program, then there's more to it than just an Assembly/Link as 31/ANY. |
|
| Back to top |
|
 |
Bill O'Boyle
CICS Moderator

Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Skeletal code example of below-the-line SYSIN usage/addressability in an Assembler sub-program, which had been Assembled/Linked as AMODE 31/RMODE ANY, using the AMODE/RMODE directives to override IEWL defaults. Register assignments are used as an example only -
| Code: |
SYSINWRK DSECT BELOW-THE-LINE DSECT (R10)
USING *,R10 INFORM ASSEMBLER
SYSINDCB DS XL(SYSINDLN) FOR 'SYSIN' 24-BIT DCB
SYSINOPN DS XL(SYSINOLL) FOR 'SYSIN' 24-BIT OPEN-LIST
SYSINCLO DS XL(SYSINCLL) FOR 'SYSIN' 24-BIT CLOSE-LIST
SUBPGM CSECT BEGIN CSECT (R3)
USING *,R3 INFORM ASSEMBLER
SAVE (14,12) SAVE REGISTERS
LR R3,R15 CSECT ADDRESSABIITY
L R7,0(,R1) PARMAREA ADDRESSABILITY
MVC 0(23,R7),=CL23'SUBPGM HAS BEEN REACHED'
LA R0,SYSINGML LOAD SYSIN 'GETMAIN' LGTH
GETMAIN R,LV=(R0),LOC=24 GET 24-BIT STG
LR R10,R1 LOAD DSECT-BASE
MVC SYSINDCB(SYSINDLN),SYSIN
MVC SYSINOPN(SYSINOLL),SYSINOL
MVC SYSINCLO(SYSINCLL),SYSINCL
LA R11,SYSINOPN POINT TO 'OPEN' LIST
OPEN (SYSINDCB,(INPUT)),MF=(E,(R11))
CLOSYSIN EQU *
LA R11,SYSINCLO POINT TO 'CLOSE' LIST
CLOSE (SYSINDCB),MF=(E,(R11)) CLOSE 'SYSIN'
LA R0,SYSINGML RELOAD SYSIN 'GETMAIN' LGTH
FREEMAIN R,LV=(R0),A=(R10) FREE THE 24-BIT STG
XR R15,R15 CLEAR R15
RETURN (14,12),RC=(15) RESTORE REGISTERS AND RETURN
*
SYSIN DCB DDNAME=SYSIN,MACRF=(GL),DSORG=PS,RECFM=FB, X
LRECL=80,BLKSIZE=80,DCBE=SYSIND
SYSIND DCBE RMODE31=BUFF,EODAD=CLOSYSIN
SYSINDLN EQU *-SYSIN DCB-LGTH
SYSINOL OPEN (,),MF=L OPEN-LIST
SYSINOLL EQU *-SYSINOL OPEN-LIST LGTH
SYSINCL CLOSE (,),MF=L CLOSE-LIST
SYSINCLL EQU *-SYSINCL CLOSE-LIST LGTH
SYSINGML EQU *-SYSIN TOTAL GETMAIN-LGTH
*
LTORG ,
*
YREGS , MVS REGISTER-MACRO
*
SUBPGM AMODE 31 SPECIFY AMODE OVERRIDE
SUBPGM RMODE ANY SPECIFY RMODE OVERRIDE
*
END , |
HTH.... |
|
| Back to top |
|
 |
dsivapradeep
New User

Joined: 06 Jul 2012 Posts: 43 Location: INDIA
|
|
|
|
| Bill O'Boyle wrote: |
| If neither of the above are present, the sub-program can be Assembled/Linked with AMODE 31/RMODE ANY. The default for IEWL (Linkage Editor) is AMODE 24/RMODE 24. |
Thanks Bill, your suggestion helped me. My assembler program isn't using any DCB. so i changed to AMODE 31/RMODE ANY. Previously, i was trying this combination in the JCL that was used for compiling/Linkedit and getting the run-time error message during execution.
Now i wrote the 2 options in my Called Assembler Program and it worked. |
|
| Back to top |
|
 |
dsivapradeep
New User

Joined: 06 Jul 2012 Posts: 43 Location: INDIA
|
|
|
|
Hi
Now i'm stuck in new exception
| Code: |
CEE3204S The system detected a protection exception (System Completion Code=0C4)
|
I'm getting this exception when i calls my assembler using parameters.
| Code: |
CALL 'ASMRCEIV' USING WS-PARM-FOR-ASM
END-CALL
|
i declared WS-PARM-FOR-ASM in working-storage section.
I know that in assembler R1 has parameters address, but i think in my code i dint manipulate it properly so i'm getting this exception.
My assembler code is below:
| Code: |
ASMRCEIV START
STM 14,12,12(13)
LR 12,15
USING ASMRCEIV,12
ST 13,SAVE+4
LR 2,13
LA 13,SAVE
ST 13,8(2)
** END OF STANDARD ENTRY ROUTINE
WTO 'IN ASMRCEIV PROGRAM'
L 5,0(1)
USING PARMDATA,5
* MVC SAVE1,PARM1
* WTO TEXT=SAVELEN,ROUTCDE=(11)
* WTO TEXT=SAVELEN,ROUTCDE=(11)
** STANDARD EXIT ROUTINE
END L 13,SAVE+4
LM 14,12,12(13)
LA 15,0
ASMRCEIV AMODE 31
ASMRCEIV RMODE ANY
BR 14
SAVE DC 18F'0'
SAVELEN DC H'4'
SAVE1 DC C'1234'
PARMDATA DSECT
PARM1 DS CL5
END ASMRCEIV
|
The message 'in asmreceiv program' is displaying SPOOL's JESYSMSG, but exception in SYSOUT.
Can someone help me in identifying mistakes of my code ? |
|
| Back to top |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
| Code: |
WTO 'IN ASMRCEIV PROGRAM'
|
That destroys R1. So you have to save R1 before you execute macro's. |
|
| Back to top |
|
 |
dsivapradeep
New User

Joined: 06 Jul 2012 Posts: 43 Location: INDIA
|
|
|
|
Thanks Peter,
I dint realize WTO is destroying R1. Saved R1 contents before WTO macro and its working now.  |
|
| Back to top |
|
 |
PeterHolland
Global Moderator

Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Most macro's use R1 to pass the address of their parameters to the OS.
To see what happens whit the registers consult the "Authorized Assembler Services Reference" manuals. |
|
| Back to top |
|
 |
Bill O'Boyle
CICS Moderator

Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If you're using R0, R1, R14 or R15 prior to issuing an MVS Macro, save all four of these register's beforehand and then restore them afterwards.
As Peter has said, R1 will be destroyed, but just in case, saving the other three should be a consideration if you're unsure.
Example (one of many) using a QUADWORD (16-Bytes aligned), together with a Store Multiple and a Load Multiple -
| Code: |
QUADWORD DS L 16-BYTE REGISTER-SAVEAREA
*
STM R14,R1,QUADWORD SAVE R14 THROUGH R1
*
* ISSUE MVS MACRO HERE
*
LM R14,R1,QUADWORD RESTORE R14 THROUGH R1
*
|
HTH.... |
|
| Back to top |
|
 |
dsivapradeep
New User

Joined: 06 Jul 2012 Posts: 43 Location: INDIA
|
|
|
|
| Bill O'Boyle wrote: |
Is there any particular reason the sub-program is AMODE 24? Does it contain DCB's (RMODE must be 24) or VSAM ACB access without specifying the "MODE=31" parm (default is 24)?
If DCB's are in the sub-program, then there's more to it than just an Assembly/Link as 31/ANY. |
Hi Bill,
Now i used DCB in my Assembler while calling it from Cobol.
Before using DCB i executed in RMODE ANY condition it worked. But, when i added DCB's it showed a Protection Exception. So changed to RMODE 24 as you suggested and it executed without any exception.
Can you tell me the significance of RMODE 24 here? |
|
| Back to top |
|
 |
Robert Sample
Global Moderator

Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
| Unless you use the DCBE extension to support 31-bit, assembler code with DCB is required to run in 24-bit mode. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|