View previous topic :: View next topic
|
Author |
Message |
ramvilas
New User
Joined: 03 Jul 2008 Posts: 2 Location: India
|
|
|
|
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
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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....
Regards,
Bill |
|
Back to top |
|
|
ramvilas
New User
Joined: 03 Jul 2008 Posts: 2 Location: India
|
|
|
|
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
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - thank you for letting us know it is now working
d |
|
Back to top |
|
|
|