IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

COMP-3 and COMP Fields gives S0C4 Error


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
changeurlife2003
Currently Banned

New User


Joined: 22 May 2006
Posts: 15

PostPosted: Fri Sep 08, 2006 3:55 pm
Reply with quote

Hi ,

I have one record contains COMP & COMP-3 Fields.

01 GA-VSGPGRUC.
03 GA-GRP-KEY-ID.
05 GA-GRP-NO-ID PIC X(6).
05 GA-SUBGR-NO PIC X(3).
03 GA-GRP-STAS-CD PIC 9(4) COMP.
88 GA-GS-ACTIVE VALUE IS 01.
88 GA-GS-IN-SETUP VALUE IS 02.
88 GA-GS-PENDING VALUE IS 03.
03 GA-EFF-DT PIC 9(7) COMP-3.
03 GA-TERM-DT PIC 9(7) COMP-3.
03 GA-MKT-NO-ID PIC X(8).
03 GA-GRP-SERV-NM PIC X(50).
03 GA-PROG-CD PIC X.
03 GA-GD-APPL-CD PIC 9(4) COMP.
03 GA-GRC-DY-CD PIC 9(3) COMP-3.
03 GA-BENE-COOR-CD PIC 9(4) COMP.
03 FILLER PIC X(3).

This is my input rcord structure.I would like to write this record in output file with DISPLAY format.
how can i do this.
i declared like
01 WS-VSGPGRUC.
03 WS-GRP-KEY-ID.
05 WS-GRP-NO-ID PIC X(09).
05 WS-SUBGR-NO PIC X(03).
03 WS-GRP-STAS-CD PIC 9(02).
03 WS-GRP-EFF-DT PIC 9(07).
03 WS-GRP-TERM-DT PIC 9(07).
03 WS-GRP-MKT-NO-ID PIC X(08).
03 WS-GRP-SERV-NM PIC X(50).
03 WS-GRP-PROG-CD PIC X.
03 WS-GRP-GD-APPL-CD PIC 9(02).
03 WS-GRP-GRC-DY-CD PIC 9(03).
03 WS-GRP-BENE-COOR-CD PIC X(02).
03 FILLER PIC X(02).

But am getting SOC4 Error. Give me the exact record structure with display fileds.
Back to top
View user's profile Send private message
raghunathns

Active User


Joined: 08 Dec 2005
Posts: 127
Location: rochester

PostPosted: Fri Sep 08, 2006 7:04 pm
Reply with quote

define same field names and use move corrosponding
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Sat Sep 09, 2006 1:43 am
Reply with quote

When do you get the 0C4 error?

What Cobol code is associated with the error? Can you post the associated code?

Dave
Back to top
View user's profile Send private message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Mon Sep 11, 2006 9:32 am
Reply with quote

Here are the reasons for Soc 4 abend-

PROTECTION EXCEPTION - A VIRTUAL ADDRESS COULD NOT BE
TRANSLATED INTO A REAL ADDRESS.
--POSSIBLE CAUSE--
INVALID ADDRESS WAS REFERENCED DUE TO SUBSCRIPT ERROR OR BAD PARMS
THE KEY OF AN INSTRUCTION OR AN OPERAND IN STORAGE DOES NOT
MATCH THE PROTECTION KEY IN THE PSW (INTERRUPT CODE 4)
THE VIRTUAL SEGMENT OR PAGE WAS NEVER ALLOCATED
(INTERRUPT CODE 10 OR 11, RESPECTIVELY)
THE PAGE WAS PAGED OUT AND THE ROUTINE REQUESTING THE CODE WAS
DISABLED FOR I/O INTERRUPTS (INTERRUPT CODE 11)
COBOL - IN GROUP MOVE, RECEIVING RECORD VARIABLE LENGTH DEFINED WRONG
- TRIED MOVING VAR. LENGTH REC. LARGER THAN TARGET FIELD MAX
- TRIED TO READ OR WRITE A FILE WHICH WAS NOT OPEN
- USED DD DUMMY AND LOGIC SAYS AT END MOVE HIGH VALUES TO FD
- TRIED TO CALL WITHIN COBOL F SORT INPUT/OUTPUT PROCEDURE
- U WITH SORT - TRIED TO GOBACK IN THE OUTPUT PROCEDURE
Back to top
View user's profile Send private message
vin12pr
Warnings : 1

New User


Joined: 14 Jun 2006
Posts: 56

PostPosted: Mon Sep 11, 2006 10:02 am
Reply with quote

Tried moving variable length record than the target field maximum may be the cause for Soc 4 I guess.
Back to top
View user's profile Send private message
vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Tue Sep 12, 2006 11:30 am
Reply with quote

Hello changeurlife2003,

the field GA-GRP-STAS-CD PIC 9(4) comp has to be difined with GA-GRP-STAS-CD 9(4)... but u defined with 9(2).

I think it would be helpfull to U...

Regards.
Vijay
Back to top
View user's profile Send private message
red_roses

New User


Joined: 31 Oct 2005
Posts: 27

PostPosted: Wed Sep 13, 2006 2:58 pm
Reply with quote

if what u have posted is the actual definition.. then..
GA-GRP-NO-ID PIC X(6). but u have defined WS-GRP-NO-ID PIC X(09).

also fields defined as 9(4) COMP. u have defined only as 9(2).. define them as 9(4)

also GA-BENE-COOR-CD PIC 9(4) COMP.
should be defined as WS-BENE-COOR-CD PIC 9(4). not as X(2)
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Error while running web tool kit REXX... CLIST & REXX 5
Search our Forums:

Back to Top