Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
what could be route cause of problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
nkothako

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Fri Jun 12, 2009 6:06 pm    Post subject: what could be route cause of problem
Reply with quote

Code:
Working-storage section.
03  FN-TNZ-TOT-AMT-X.                                 
    05  FN-TNZ-TOT-AMT          PIC S9(11)    COMP-3.
    05  FILLER                  PIC X(02).           
03  FN-TNZ-TOT-AMT-I   REDEFINES  FN-TNZ-TOT-AMT-X.   
     05  FN-TNZ-TOT-AMT-14      PIC S9(15)    COMP-3.

procedure division

IF (WH-CENTRE-CODE  = 14            AND   FN-TNZ-TOT-AMT-14  NOT =  WA-TOTAL-AMT)  OR
   (WH-CENTRE-CODE  NOT EQUAL  14   AND   FN-TNZ-TOT-AMT     NOT =  WA-TOTAL-AMT)   << [color=red][b]why this condition failed[/b][/color]                                                       
   MOVE 'FN-TNZ-TOT-AMT NOT = WA-TOTAL-AMT' TO WS-IMSE-REASON-1

   IF WH-CENTRE-CODE  = 14                             
        DISPLAY 'FN-TNZ-TOT-AMT  = ' FN-TNZ-TOT-AMT-14 [color=red][b]<< how come this value is printed in the sysout[/b][/color]   ELSE 
   DISPLAY 'FN-TNZ-TOT-AMT  = ' FN-TNZ-TOT-AMT   
   END-IF                                             
                                                     
        DISPLAY 'WA-TOTAL-AMT    = ' WA-TOTAL-AMT           

   PERFORM 999999-CALL-ABEND                           
END-IF     


Code:
SYSOUT :
FN-TNZ-TOT-AMT  = 00004476673 404
WA-TOTAL-AMT    = 000000004476673
FUNCTION      STATUS CODE    AT 210400-CHECK-TRAILER-RECORD         
PCB --->                                                           
SSA1--->                                                           
SSA2--->                                                           
SSA3--->                                                           
SSA4--->                                                           
SSA5--->                                                           
REAS-1->FN-TNZ-TOT-AMT NOT = WA-TOTAL-AMT                           
REAS-2->                                                           
REAS-3->                                                           
CEE3250C The system or user abend U 778 R=00000000 was issued
.

DUMP VALUES

02 WH-CENTRE-CODE 999 DISP 001
03 FN-TNZ-TOT-AMT S9(11) CMP3 +00004476673
03 WA-TOTAL-AMT S9(15) CMP3 +000000004476673
03 FN-TNZ-TOT-AMT-14 S9(15) CMP3 *** Invalid data for this data type *** Hex 00004476673C 040
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 12, 2009 6:37 pm    Post subject:
Reply with quote

The root cause of the problem is you've got non-numeric data in a numeric field. Probably you're using FN-TNZ-TOT-AMT-14 without ensuring it has all digits defined.

Your two questions in BBcode are contradictory. If the second part of the first IF test were being taken, the DISPLAY would be the ELSE part. If WH-CENTRE-CODE has value 14, then the two values in the first IF statement are not equal. You need to figure out where the FN-TNZ-TOT-AMT-14 is getting the invalid data from.

I would classify the WORKING-STORAGE statements as bad coding practice, myself. If you're going to REDEFINE numeric fields, especially COMP-3 numeric fields, you should put the fillers on the FRONT of the variable so the sign is always in the last 4 bits of the variable, no matter which variable you are using. If you had done that, this problem probably would not have occurred.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Fri Jun 12, 2009 6:38 pm    Post subject:
Reply with quote

you are assuming WH-CENTRE-CODE <> 14.
all i see is something you have titled as DUMP VALUES.

Suggest you display WH-CENTRE-CODE after you set REAS-1.

actually, I don't trust any of your code and displays (dump values).

rerun with the display of WH-CENTRE-CODE within the logic you have provided.
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 LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts Route a product's job to specific lpar vasanthz All Other Mainframe Topics 9 Thu Mar 02, 2017 2:22 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us