IBM MAINFRAME HELP FORUMS for COBOL, JCL, CICS, DB2, IMS etc...
Help & Support Forums for IBM Mainframe computers Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7, CA-11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, VSAM, ISPF, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Decimal Data error on first login only

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
View previous topic :: View next topic  
Author Message
ramvilas



Joined: 03 Jul 2008
Posts: 2
Location: India

Posted: Thu Jul 03, 2008 10:47 am    Post subject: Decimal Data error on first login only  

Hi all..

I am faced a very wierd problem today, it goes like this -

When I logon to the AS400 server and try executing a program, it crashed for the first time giving a decimal data erro on certain line of code, but the same program with same set of libraries and all gives no error whatsoever if I execut it again instantly after I received the error first time.

The next time I logged on first thing i did is keep the program in debug and execute it, the decimal data error comes on a MOVE statemet for which the values of variables on the line of code in picture are already valid but I can't figure out why is it happening.

Is it because of some system variable intialization or something else?

Please help me out on this issue.

I thank you in advance.
Back to top  
dick scherrer



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

Posted: Thu Jul 03, 2008 7:13 pm    Post subject:  

Hello ram and welcome to the forums,

Quote: Is it because of some system variable intialization or something else? I'd suggest you make sure that all of the variables in your code are initialized to some valid value.

If you code uses any "common" definitions, make sure your definition exactly matches the original.

It may be that the first time thru, your code moves a proper value to the problem field after the problem has been raised and then the next time thru the code, there is no error.
Back to top  
Bill O'Boyle



Joined: 14 Jan 2008
Posts: 294
Location: Orlando, FL, USA

Posted: Thu Jul 03, 2008 8:38 pm    Post subject: Re: Decimal Data error on first login  

Long ago and far away, IBM devised SAA, which (as the idea went) allowed programs to be used on multiple platforms.

One of the idiosecrencies was that Cobol COMP on a MAINFRAME is interpreted as COMP-3 on an AS400.

Hence, this is the reason SAA (System Application Architecture) pushed the use of BINARY (instead of COMP) and PACKED-DECIMAL (instead of COMP-3) for program portability compliance.

Could your decimal error have anything to do with programs which were ported?

Just a SWAG.... :wink:

Regards,

Bill
Back to top  
ramvilas



Joined: 03 Jul 2008
Posts: 2
Location: India

Posted: Tue Jul 08, 2008 10:30 am    Post subject: Re: Decimal Data error on first login  

Hey guys... thanks for the tips.

I spotted the problem. dick scherrer you were right, I had a file with garbage values and was copying it into a QTEMP file and using the temporary file data for first time. the next time I did not have such error because I did clear the file and wrote new records into it...

thanks again you guys.. you have a good time..
Back to top  
dick scherrer



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

Posted: Tue Jul 08, 2008 12:53 pm    Post subject: Reply to: Decimal Data error on first login only  

You're welcome - thank you for letting us know it is now working :)

d
Back to top  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM
Related Links