Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

COMP-3 and COMP Fields gives S0C4 Error

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: COMP-3 and COMP Fields gives S0C4 Error
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    Post subject: Regaring COMP-3 and COMP Fields
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    Post subject: Re: Regaring COMP-3 and COMP Fields
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    Post subject: Re: Regaring COMP-3 and COMP Fields
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    Post subject: Re: Regaring COMP-3 and COMP Fields
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    Post subject: Re: Regaring COMP-3 and COMP Fields
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Syncsort Help to group fields sudhakarraju SYNCSORT 6 Thu Dec 29, 2016 1:38 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us