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

OUTREC S0C7 issue for particular scenario of REDEFINED group


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ljaichandran

New User


Joined: 19 Mar 2010
Posts: 2
Location: Chennai

PostPosted: Fri Mar 07, 2014 1:10 pm
Reply with quote

Hi,

I am facing a S0C7 abend when I try to sort a file and outrec the data.

The input file here was written using a COBOL layout which has a redefine as stated in the below example:
Code:
01 REC.
    03 A.
        05 A1       PIC S9(11)V99 COMP-3.
    03 B REDEFINES A.
        05 B1       PIC 9(03).
        05 FILLER PIC X(04).

The records in the file are very much scenario based in such a way that any record would have a valid value in ether A1 or B1 which means the other field would be junk when interpreted as an individual field.

When I outrec the data, I want both the redefined fields as individual fields in the output file. As outrec would interpret as junk values when considering A1 or B1 as individual fields, it is abending with S0C7 error.

Is there any way in SORT OUREC that I can replace the junk value of A1/B1 or ignore it to avoid S0C7 abend?

Appreciate all your help on this. Thanks!
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Mar 07, 2014 3:01 pm
Reply with quote

Why not share your control cards with us so that we can see what you are doing? Probably all that you need to do is treat the fields as CH or BI whithin sort.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 07, 2014 4:01 pm
Reply with quote

You must have some way in your data of identifying which field contains valid content for that record.
Back to top
View user's profile Send private message
ljaichandran

New User


Joined: 19 Mar 2010
Posts: 2
Location: Chennai

PostPosted: Fri Mar 07, 2014 6:42 pm
Reply with quote

Here is the SORT card i am using for the example given above:

OPTION COPY
OUTREC FIELDS=(1:1,7,
8:1,3,
11:4,3)

Please suggest if I can ignore or treat that as CH or replace with something so that I can avoid the S0C7 abend.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Mar 07, 2014 7:59 pm
Reply with quote

Hello anfd welcome to the forum,

The same bytes cannot be used as zoned-decimal and packed-decimal at the same time.

Your process needs to decide which format is being processed and move that format to the output - probably moving zero to the other format.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Fri Mar 07, 2014 9:13 pm
Reply with quote

...and please use Code tags (Click on Code to preserve spacing).
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Mar 07, 2014 10:17 pm
Reply with quote

ljaichandran wrote:
Here is the SORT card i am using for the example given above:

OPTION COPY
OUTREC FIELDS=(1:1,7,
8:1,3,
11:4,3)

Please suggest if I can ignore or treat that as CH or replace with something so that I can avoid the S0C7 abend.



You sure the above control cards resulted in S0C7 abend? It is just a move and it doesn't matter what you have in those fields. Are you sure you did not use ZD/PD format and try to SUM or edit or convert to readable format? I would like to see the sysout of the above control cards that resulted S0C7.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Compare latest 2 rows of a table usin... DB2 1
No new posts S0C7 - Field getting overlayed COBOL Programming 2
No new posts Facing ABM3 issue! CICS 3
Search our Forums:

Back to Top