s0c 4 abend with Reason code 4



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

s0c 4 abend with Reason code 4

Postby a b c d » Tue Mar 09, 2010 4:03 pm

This program is to compare 2 files and matching cases will be written to third file.

IEF236I ALLOC. FOR SAMPJCL STEP01
IGD103I SMS ALLOCATED TO DDNAME STEPLIB
IEF237I JES2 ALLOCATED TO SYSOUT
IEF237I JES2 ALLOCATED TO SYSPRINT
IEF237I JES2 ALLOCATED TO PLIDUMP
IEF237I JES2 ALLOCATED TO SYSUDUMP
IGD103I SMS ALLOCATED TO DDNAME NRASCAN
IGD103I SMS ALLOCATED TO DDNAME BONUS
IGD103I SMS ALLOCATED TO DDNAME MATCH
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=0C4 REASON CODE=00000004
TIME=10.19.21 SEQ=43479 CPU=0000 ASID=0039
PSW AT TIME OF ERROR 078D1000 A41000FA ILC 4 INTC 04
ACTIVE LOAD MODULE ADDRESS=24100000 OFFSET=000000FA
NAME=Y1E75
DATA AT PSW 241000F4 - 18F090E0 104850D0 10044160
GR 0: 00000001_00000110 1: 00000000_00000000
2: 00000000_00000040 3: 00000000_241005D8
4: 00000000_00ACF9B0 5: 00000000_00AFF078
4: 00000000_00ACF9B0 5: 00000000_00AFF078
6: 00000000_00AB8FE0 7: 00000000_FD000000
8: 00000000_00AF83B0 9: 00000000_00AFF2E0
A: 00000000_00000000 B: 00000000_00AFF078
C: 00000000_87041BFA D: 00000000_00006008
E: 00000000_00000000 F: 00000000_00000110
END OF SYMPTOM DUMP
IEF472I SAMPJCL STEP01 - COMPLETION CODE - SYSTEM=0C4 USER=0000 REASON=00000004
a b c d
 
Posts: 6
Joined: Thu Mar 04, 2010 11:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: s0c 4 abend with Reason code 4

 

Re: s0c 4 abend with Reason code 4

Postby expat » Tue Mar 09, 2010 5:08 pm

Click HERE for a link to the IBM manual which explains system abends. Please bookmark this location and learn to use it.
expat
 
Posts: 382
Joined: Sat Jun 09, 2007 3:21 pm
Has thanked: 0 time
Been thanked: 1 time

Re: s0c 4 abend with Reason code 4

Postby a b c d » Tue Mar 09, 2010 9:40 pm

Find attached the JCL, could anyone pull out of it..

//SAMPJCL JOB 001A000UP000,'UNIPEN ',CLASS=C,MSGCLASS=C,
// NOTIFY=&SYSUID
//*
//STEP0001 EXEC PGM=Y1E75
//*
//*STEPLIB DD DSN=NEV.P.IPEN1.A.LOAD(Y1E75),DISP=SHR
//*
//NRASCAN DD DISP=SHR,DSN=MSP0839.ENDEV.YA1.P.SCAN2NRA.FILE110
//BONUS DD DISP=SHR,DSN=MSP0839.ENDEV.YA1.P.YA1593.ACTIONS.FB
//*
//MATCH DD DISP=SHR,DSN=MSP0839.ENDEV.SCANNRA.BONUS.MATCH
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//PLIDUMP DD SYSOUT=C,HOLD=YES
//SYSUDUMP DD SYSOUT=C,HOLD=YES
a b c d
 
Posts: 6
Joined: Thu Mar 04, 2010 11:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: s0c 4 abend with Reason code 4

Postby Robert Sample » Tue Mar 09, 2010 10:17 pm

The S0C4 - 04 abend means you have a storage protection exception. In other words, you are attempting to access storage in the system that you do not have access to (often because the system already owns the storage). Possible causes for this condition include:

Missing or incorrect DD name
Attempting to use FD 01 variable before OPEN is done - including INITIALIZE
Attempting to use FD 01 variable after CLOSE is done
Invalid index or subscript (outside table boundary)
Invalid usage of LINKAGE SECTION
Mismatch between calling program parameters and subprogram arguments
Issuing STOP RUN or GOBACK in SORT procedure
Branching outside SORT procedure
Improper mixing of addressing modes between calling programs and subprograms

Notice that these conditions are related to your program code, pretty much, and you have provided nothing that would help in determining which of these possible reasons apply. I recommend you start with the first possible cause (DD name problem), look for system messages or other evidence for (or against) this possible cause, and proceed down the list until you have isolated your problem. The first four are probably the vast majority of S0C4 abends.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 222 times

Re: s0c 4 abend with Reason code 4

Postby a b c d » Tue Mar 09, 2010 11:03 pm

Thank Robert...see the program below

Y1E75AA: PROC OPTIONS(MAIN);
DEFAULT RANGE(*) STATIC UNALIGNED;
DCL
1 INPUT_NRA,
3 TRAN_CODE CHAR(3),
3 NINO CHAR(8),
3 CPNO CHAR(10),
3 CONTRACT_CODE CHAR(7),
3 DATE1 CHAR(9),
3 STATUS1 CHAR(5),
3 RET_AGE1 CHAR(3),
3 STATUS2 CHAR(5),
3 RET_AGE2 CHAR(3),
3 STATUS3 CHAR(5),
3 DATE2 CHAR(9),
3 SPARE1 CHAR(25),
3 SEX CHAR(2),
3 IU_FLAG CHAR(1),
3 SPARE2 CHAR(5);
DCL
1 INPUT_BON,
3 TRAN_CODE CHAR(3),
3 NINO CHAR(8),
3 CPNO CHAR(9),
3 DATE1 FIXED BIN(31),
3 FUND_INFO CHAR(6),
3 UNIT_TYPE CHAR(1),
3 CONTRACT_CODE CHAR(6),
3 DATE2 FIXED BIN(31),
3 FILLER CHAR(59);
DCL
1 OUTPUT_MAT,
3 NINO CHAR(9),
3 CPNO CHAR(10),
3 FILLER CHAR(79);

DCL NRASCAN FILE INPUT RECORD;
DCL BONUS FILE INPUT RECORD;
DCL MATCH FILE OUTPUT RECORD;
DCL EOF_INPUT1 CHAR(1)
INIT('N');
DCL EOF_INPUT2 CHAR(1)
INIT('N');

ON ERROR
BEGIN;
ON ERROR SYSTEM;
DISPLAY ('** ERROR IN PROCESSING PROGRAM Y1E75AA **');
CALL PLIDUMP('TFCNHB','Y1E75AA');
END;
ON ENDFILE(NRASCAN) EOF_INPUT1 = 'Y';
ON ENDFILE(BONUS) EOF_INPUT2 = 'Y';

OPEN FILE(NRASCAN);
OPEN FILE(MATCH);

READ FILE(NRASCAN) INTO(INPUT_NRA);

DO WHILE(EOF_INPUT1 = 'N' );
OPEN FILE(BONUS);
READ FILE(BONUS) INTO(INPUT_BON);
DO WHILE(EOF_INPUT2 = 'N');
some logic
WRITE FILE(MATCH) FROM(OUTPUT_MAT);
END
CLOSE FILE (BONUS);
READ FILE(NRASCAN) INTO(INPUT_NRA);
END
CLOSE FILE (NRASCAN);
CLOSE FILE (MATCH);

END Y1E75AA;
a b c d
 
Posts: 6
Joined: Thu Mar 04, 2010 11:15 pm
Has thanked: 0 time
Been thanked: 0 time

Re: s0c 4 abend with Reason code 4

Postby a b c d » Tue Mar 09, 2010 11:35 pm

thanks everyone.....in the link I have removed the AMODE and RMODE, now its working fine
a b c d
 
Posts: 6
Joined: Thu Mar 04, 2010 11:15 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post