Page 1 of 1

Abend S0C7

PostPosted: Thu Dec 08, 2011 8:47 am
by revulsion
Hello,

I'm getting abend SOC7 on my code for some reason. Any suggestions?
**********************  BEGIN LOGIC  *********************************
         MVC    CHAR(1),ZONE
         CLI    CHAR,C'-'
         BNE    SKIP
         NI     ZONE+10,X'DF'
SKIP   EQU    *
         PACK   PACKNUM,MM_CS+1
         CVB    R5,PACKNUM
**********************  END LOGIC    *********************************
**********************  DATA AREAS   *********************************
DYNAREA  DSECT ,                   
          DS   0F                     
SAVEAREA DS   18F               
        DS   0D
PACKNUM  DS   D
CHAR        DS   CL1
                YREGS
                SUMFUNMM
                END

**************************** Bottom of Data ***************************


Thanks!

Re: Abend S0C7

PostPosted: Thu Dec 08, 2011 9:42 am
by steve-myers
You aren't showing the data area definitions, and that makes it more difficult for us to guess what you're doing, so this is nothing more than a guess.

PACK PACKNUM,MM_CS+1

The PACK instruction requires two lengths, one for each operand. I'm guessing

NI ZONE+10,X'DF'

is altering the last byte in MM_CS, but the PACK is using the entire length of MM_CS, so it is running 1 byte too long, and PACKNUM becomes a non-packed decimal value, so the CVB will get the S0C7.

Another possibility is PACKNUM is not length 8.