View previous topic :: View next topic
|
Author |
Message |
ljaichandran
New User
Joined: 19 Mar 2010 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
You must have some way in your data of identifying which field contains valid content for that record. |
|
Back to top |
|
|
ljaichandran
New User
Joined: 19 Mar 2010 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
...and please use Code tags (Click on Code to preserve spacing). |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
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 |
|
|
|