You are on page 1of 8

Check the Sysout of RUNJCL.

This shows the error statement and lists offset value

Take the Offset Value 000003C0

Got to respective Compilation Job listing, check the sysprint

Search for the offset value 0003C0 (delete +00 -- initial 3 letters of Offset value and search for it) check below 2 screen shots

This Offset value is listed under line no 0045 which refers to Move statement. Take this no. 045 and find for it in same sysprint. This points to the exact statement, caused SOC7

This 045 pints to the Move statement 1526, this is the exact line in the program

Check for the above line no. In source program. This points to the statement highlighted below. Check the statement, variable check-4, which is added to check-6. These are having different Picture clause. Check-4 is alpha numeric, holding some junk data, when this data is moved to Chcek-6 variable (of comp-3) creates SOC7 error. This is just an example to explain one cause for Soc7 error and how to find the root cause statement.

Method - 2 . If abend-aid is available, check the same.

This will directly provides the error statement and line no.

Do you have a product called Abend Aid? Probably not if you are asking us. The idea is to add the given displacement (15D, in your case) to the address given by the base register. And it is hexadecimal addition, so don't forget your base 16 math. Then you scan down your dump to the given address and read the instruction, checking the contents of the fields. It really helps when you have a yellow IBM instruction card which shows the hexadecimal equivalents of the commands. Wasn't 5D a MVC? But even that won't help unless you know enough Assembler to realize that MVC is a Move Character command, and that the first field after the command is the RECEIVING field contents and the second is the sending field contents. And unless your compile is done with the Assembler listing, that won't help much, because then you have to take the Assembler instruction back to your COBOL code to figure out what fields are being referenced by the abending command. So how do you do this quickly and easily? You have to know what causes what errors - basically, you have to understand your data. S0C7 is a data exception. This most commonly means that a numeric value has had something done to it that results in it being placed in an alphanumeric field. So start with your numeric fields. Pic 9(nn) fields are very forgiving, so start your research

with your COMP fields (COMP, COMP-3, etc.). Because you got a S0C7, I can safely assume this is a batch job and you are dealing with standard input files. Input files have copybook layouts. Look at the copybook. Find the "packed" (COMP) fields. Using the layout positions, use File-Aid to scan the file for non-numeric data in these fields. File-Aid option 8 from the main menu allows you to get a file layout froma copybook. This tells you what position the particular field starts in and how long it is. Here is an example:

Code:

09 DL-VAR-NUM01-05 09 DL-VAR-NUM02-04 09 DL-VAR-NUM03-03 09 DL-VAR-CH01-01 09 DL-VAR-CH02-18

PIC S9(05)V COMP-3. ... PIC S9(04)V COMP-3. ... PIC S9(03)V COMP-3. ... PIC X(01). ... PIC X(18). ...

Here are three packed fields. I go to File-Aid F.8 to get the copybook layout and find where these fields are in the actual file: Code: File-AID ---------------------- VIEW LAYOUT ------------ Row 24 to 44 of 1,850 COMMAND ===> SCROLL ===> CSR Layout: MVD.ENVA.PANVALET(DLVAR512) FIELD --------- FIELD LEVEL/NAME ---------- -PICTURE- -NUMBER START END LENGTH 9 DL-VAR-DT05 X(10) 20 53 62 10 9 DL-VAR-NUM01-05 S9(5) 21 63 65 3 9 DL-VAR-NUM02-04 S9(4) 22 66 68 3 9 DL-VAR-NUM03-03 S999 23 69 70 2 9 DL-VAR-CH01-01 X 24 71 71 1

This tells me that I am looking for my first packed field to start in column 63 for a physical length of 3, ending in column 65. (63, 64, 65 makes three physical columns). Then, again using File-Aid, I would look for nonnumeric values in these columns. Remember that characters are less than numbers in the mainframe world, so I can search any or all of these columns for data less than zero (for the purpose of this example, I took the liberty of using a different file): Code:

File-AID ------------- Unformatted Selection Criteria ------ Row 1 to 1 of 1 COMMAND ===> SCROLL ===> CSR Use END to continue, CANCEL to return to main screen. AND Cmd /OR Position Length RO Data Value --- --- -------- ------ -- ---------------------------------------------------___ 9 3 LT T'0' ************************** END OF SELECTION CRITERIA **************************

And this gives me my offending record (or records, as the case may be). Code: File-AID - Edit - MV603.NON.NUMERIC ----------------------------------------------------------------------------------------------COMMAND ===> SCROLL ===> CSR ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---9----+----0****** ******************************************************* TOP OF DATA **************** - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 31 RECORD(S) NOT SELECTED 000001 D5013290ABC531074057839092061C E3C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 44 RECORD(S) NOT SELECTED ****** ****************************************************** BOTTOM OF DATA *********

You might also like