Joined: 06 Jun 2008 Posts: 8696 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.
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.
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 ,
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.
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 ?
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.
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?