Joined: 06 Jun 2008 Posts: 8165 Location: East Dubuque, Illinois, 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:
//CEEOPTS DD *
or you could recompile your assembler program with AMODE 31.
Joined: 14 Jan 2008 Posts: 2504 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 -
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
LA R11,SYSINOPN POINT TO 'OPEN' LIST
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
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
YREGS , MVS REGISTER-MACRO
SUBPGM AMODE 31 SPECIFY AMODE OVERRIDE
SUBPGM RMODE ANY SPECIFY RMODE OVERRIDE
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.
CALL 'ASMRCEIV' USING WS-PARM-FOR-ASM
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:
** END OF STANDARD ENTRY ROUTINE
WTO 'IN ASMRCEIV PROGRAM'
* MVC SAVE1,PARM1
* WTO TEXT=SAVELEN,ROUTCDE=(11)
* WTO TEXT=SAVELEN,ROUTCDE=(11)
** STANDARD EXIT ROUTINE
END L 13,SAVE+4
ASMRCEIV AMODE 31
ASMRCEIV RMODE ANY
SAVE DC 18F'0'
SAVELEN DC H'4'
SAVE1 DC C'1234'
PARM1 DS CL5
The message 'in asmreceiv program' is displaying SPOOL's JESYSMSG, but exception in SYSOUT.
Can someone help me in identifying mistakes of my code ?
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.
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?