How To Handle Decimal Data Error In Cobol
Contents |
statements Oracle on iSeries File Sharing View All Integrated File System (IFS) iSeries Access (Client Access) iSeries managed decimal-data error occurred in as400 email and groupware NetServer Network File System (NFS) QNTC
Mch1202 Error In As400
File System High Availability View All Business Continuity High Availability Tools Replication IBM iSeries
What Is Decimal Data Error In As400
division news View All iSeries application development View All iSeries Application development tools iSeries CL programming iSeries COBOL programming iSeries ILE programming iSeries
How To Handle Decimal Data Error In Rpg
Java programming iSeries programming commands RPG iSeries programming Visual basic on iSeries iSeries backup and recovery View All Data backup, storage and retrieval on iSeries iSeries disaster recovery and business continuity Remote Journaling Restores Storage iSeries database management View All DB2 UDB (universal databases) iSeries SQL commands decimal data error in cobol 400 and statements Oracle on iSeries iSeries document output View All Imaging on iSeries Printing on iSeries Printing-Imaging Tools iSeries hardware management View All Grid Computing Logical Partitions (LPAR) On-demand Computing iSeries networking View All Connecting to Printers FTP Physical connections to iSeries Remote Access to iSeries TCP-IP VoIP iSeries security planning View All iSeries physical security iSeries system and application security Security Tools iSeries systems management View All Change Management Debugging i5-OS -- OS-400 iSeries Applications iSeries compliance and regulation iSeries service and support issues iSeries system performance and monitoring Multi-platform Integration Performance Server Consolidation Server Installation Server Pricing Systems Management Tools iSeries training and education View All iSeries job market iSeries skills User Groups iSeries upgrades and modernization View All Web Topics Archive View All iSeries Resources Please select a category File Sharing High Availability IBM iSeries divisio
This document provides information about finding and correcting decimal data errors. Resolving the problem It is not uncommon for programs to have problems with decimal data rpgle monitor decimal data error errors when working with files that originated on mainframes, non-IBM systems, and the rpg0907 IBM System/36. Program-described files are normally used on these systems and can result in non-numeric hexadecimal values in numeric fields. It is also possible for a program on the IBM OS/400 or IBM i5/OS system to do this because program-described files are still available, especially for programs that have been migrated http://search400.techtarget.com/answer/What-is-a-Decimal-Data-Error and are running in the System/36 environment. The following example takes advantage of the field descriptions in externally-described files to correct the problem. The program reads in each record and writes it out making assumptions on what the correct value should be. You are responsible for evaluating the results of using this program. Because it is necessary to make assumptions, the results might http://www-01.ibm.com/support/docview.wss?uid=nas8N1018444 not be what you require. However, there is a very good chance the results will be satisfactory. Always keep a back-up copy of the file until you evaluate the results and are comfortable with the end result. In the case of zoned numeric fields, hexadecimal values such as blanks, control characters, and unassigned hexadecimal values are normally converted to zeroes. When letters or special characters (for example, the ampersand) are encountered, the first hexadecimal character is converted to an F. For example, the letter A is C1 in hex, while the letter a is 81 in hex. Both are converted to F1, which is the number one. In testing, 8aA69 is converted to 81169. However, when certain values are encountered in certain positions in the field, the entire field can be converted to a zero value. For packed numeric fields, an incorrect value in any position normally causes the entire field to be converted to a zero value. One exception was noted in testing. A 10-digit packed field requires a 6-byte field, and the first position of the first byte is not used. An incorrect value in that fi
the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. http://www.code400.com/forum/forum/iseries-programming-languages/cobol-aa/8853-causes-of-decimal-data-error To start viewing messages, select the forum that you want to visit from the selection below. sponsored links Collapse Announcement Collapse No announcement yet. Causes of DECIMAL DATA ERROR Collapse X Collapse Posts Latest Activity Search Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new data error posts Previous Next kpandian Code400 Newbie Join Date: Oct 2009 Posts: 29 #1 Causes of DECIMAL DATA ERROR January 6th, 2010, 04:41 AM The following is the issue, i have faced. I read a file and moved the value of one of its NUMERIC [Eg.FLD1] field to a working variable [Eg. WFLD1] in COBOL. i.e MOVE FLD1 to WFLD1 [both fields are of numeric decimal data error & length is same] But, my program has received MCH1202 during the processing of the file. Now, i need to find out the various possibles scenarios which can cause the DECIMAL DATA ERROR i.e MCH1202 in a COBOL program. so that i can avoid those scenarios. Kindly help me in this regard. Tags: None Terry Wincheste Analyst Join Date: Jun 2005 Posts: 339 #2 January 6th, 2010, 06:27 AM Re: Causes of DECIMAL DATA ERROR Check to ensure the field has a valid numeric value *before* you move it: Code: if FLD1 numeric move FLD1 to WFLD1 else (Do Error Logic) end-if Comment Post Cancel johnmauro Experienced Forum Member Join Date: Dec 2007 Posts: 86 #3 January 6th, 2010, 09:26 AM Re: Causes of DECIMAL DATA ERROR and make sure the field receiving the numeric value has been properly set to a numeric value as in initilaization John M. Mauro Software Engineer MedAssets Comment Post Cancel kpandian Code400 Newbie Join Date: Oct 2009 Posts: 29 #4 January 7th, 2010, 12:29 AM Re: Causes of DECIMAL DATA ERROR Hi Terry and John, thanks for the solution. I have also implemented the same like