IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Decimal Data error on first login only


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ramvilas

New User


Joined: 03 Jul 2008
Posts: 2
Location: India

PostPosted: Thu Jul 03, 2008 10:47 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Thu Jul 03, 2008 7:13 pm
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Jul 03, 2008 8:38 pm
Reply with quote

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.... icon_wink.gif

Regards,

Bill
Back to top
View user's profile Send private message
ramvilas

New User


Joined: 03 Jul 2008
Posts: 2
Location: India

PostPosted: Tue Jul 08, 2008 10:30 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Jul 08, 2008 12:53 pm
Reply with quote

You're welcome - thank you for letting us know it is now working icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Error when install DB2 DB2 2
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
Search our Forums:

Back to Top