Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
View previous topic :: :: View next topic  
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

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, 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

Site Director


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

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

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts C03 ABEND sjiraga PL/I & Assembler 1 Thu Jun 01, 2017 4:51 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us