Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
SOC7 abend while moving COMP-3 variable to a normal variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
srikar tenali

New User


Joined: 07 Feb 2007
Posts: 22
Location: hyderabad

PostPosted: Tue Jul 29, 2008 10:51 am    Post subject: SOC7 abend while moving COMP-3 variable to a normal variable
Reply with quote

hi,

Following is the declaration of variables.


Code:

                 10 LS-EMPLOYEE-DATA-GRP.                         
                     15 LS-EMPL-KEY.                             
                         20 LS-EMPL-NBR   PIC S9(13)     COMP-3.
                     15 LS-OLD-EMPL-KEY REDEFINES LS-EMPL-KEY.   
                         20 LS-OLD-EMPL-NBR                       
                                          PIC S9(9)      COMP-3. 
                         20 LS-OLD-EMPL-SUB-NBR               
                                          PIC S9(3)      COMP-3. 



there can be no changes in the above declaration as this is a predefined variables in the system and working perfectly for all other programs.

Code:

    05  WS-OLD-EMPL-KEY.                               
        10  WS-OLD-EMPL-NBR       PIC S9(09).           
        10  WS-OLD-EMPL-SUB-NBR                     
                                   PIC S9(03).           



With the above declaration, the program is getting abended in the following statement.

Code:

     MOVE LS-OLD-EMPL-NBR         TO UNA-OLD-EMPL-NBR           


Please help to resolve.

Thanks in advance.
Srikar
Back to top
View user's profile Send private message
References
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1148
Location: Mumbai - India

PostPosted: Tue Jul 29, 2008 11:26 am    Post subject: Reply to: SOC7 abend while moving COMP-3 variable to a norma
Reply with quote

srikar,

Code:
UNA-OLD-EMPL-NBR


what is the picture clause of the above field?
Back to top
View user's profile Send private message
srikar tenali

New User


Joined: 07 Feb 2007
Posts: 22
Location: hyderabad

PostPosted: Tue Jul 29, 2008 12:04 pm    Post subject: Reply to: SOC7 abend while moving COMP-3 variable to a norma
Reply with quote

sorry that was,

Code:

MOVE LS-OLD-EMPL-NBR         TO WS-OLD-EMPL-NBR           
Back to top
View user's profile Send private message
dick scherrer

Global Moderator


Joined: 23 Nov 2006
Posts: 8729
Location: 221 B Baker St

PostPosted: Tue Jul 29, 2008 12:36 pm    Post subject:
Reply with quote

Hello,

Quote:
there can be no changes in the above declaration as this is a predefined variables in the system and working perfectly for all other programs.

The data definition code is simply wrong and will most likely fail (as you have seen). If the code works it is because someone coded around the improper definitions.

There are 2 comp-3 fields defined and that would require 2 signs and when a value is moved to LS-EMPL-NBR the move will destroy the sign on the first field in the redefinition.

The short-term resolution is probably to find the way the "working" programs are coded and follow the same scheme. I'd also suggest placing comments in all of the code that uses these definitions to alert the next person who has to work with it. If the definitions are a copybook, placing comments in the copybook would be a good thing as well.
Back to top
View user's profile Send private message
Terry Heinze

Active User


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

PostPosted: Tue Jul 29, 2008 9:25 pm    Post subject:
Reply with quote

Not only that but COMP-3 variables are offended you refer to them as "abnormal". icon_smile.gif
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1