Decimal Data Error In Field
Contents |
statements Oracle on iSeries File Sharing View All Integrated File System (IFS) iSeries Access (Client Access) iSeries managed email and groupware NetServer Network File System (NFS) QNTC File System High Availability View All decimal data error in rpgle Business Continuity High Availability Tools Replication IBM iSeries division news View All decimal data error in as400 iSeries application development View All iSeries Application development tools iSeries CL programming iSeries COBOL programming iSeries ILE programming iSeries
Decimal-data Error Occurred In As400
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
Mch1202 Error In As400
Remote Journaling Restores Storage iSeries database management View All DB2 UDB (universal databases) iSeries SQL commands 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 how to handle decimal data error in rpg 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 division news iSeries application development iSeries backup and recovery iSeries database management iSeries document output iSeries hardware management iSeries networking iSeries security planning iSeries systems management iSeries training and education iSeries upgrades and modernization Section Evaluate News Get Started Evaluate Manage Problem Solve Sponsored Communities Q What is a Decimal Data Error? byJohn Blenkinsop One Search400.com member writes, "Can you please tell me what a Decimal Data error is, and what is the scenario in which it is received?" Search400.com's application development expert John Blenkinsop explains. Sections Share this item with your netwo
available for download here, and it has been updated since it originally ran [Updated 06/13/07] I have seen requests many times in the forums from programmers asking how best to handle data with invalid decimal data. Typically this
Decimal Data Error In Cobol 400
type of error is first discovered when a program ends abnormally. I have found this rpgle monitor decimal data error problem occurs most often with data received from outside sources: customers and vendors. Many times this data comes from systems other than a System i. I've developed a command to identify and (optionally) "fix" errant data. What's in a Number? First, what is invalid decimal data? This is non-numeric data in a numeric field. For example, a field defined http://search400.techtarget.com/answer/What-is-a-Decimal-Data-Error as "5s 0" should contain a number in the range of -99999 to +99999. The data is invalid if it contains values such as ABCDE or 123A6. Of course in the case of a zoned-decimal field such as this one, it is acceptable for the last (and only the last) position to contain a value that appears to be alphabetic. This is because the last position of the field identifies the sign. To consider http://www.itjungle.com/fhg/fhg061307-story01.html numeric values properly you must think in terms of the hexadecimal (hex) representation of the field. The first four bits of each byte are called the "zone" and the last four bits the "digit". Values for each zone and digit can range from 0 to 9 and A to F for the values 0 to 15 in the base-16 (hexadecimal). The base-10 (decimal) numbers 0 to 9 are defined for zoned-decimal fields in hex as F0-F9, respectively. The last byte identifies the sign of the value. For this byte only, the zone portion can be either a C or F for positive values and a D for negative. The hex representation of the zoned-decimal value 123 stored in a "5s 0" field is: F0F0F1F2F3 or F0F0F1F2C3. Packed fields are stored differently. Normally packed fields have an odd length, such as "7p 0" or "9p 2". The physical length of the stored data is: (scale of field + 1) / 2. For example, a "7p 2" field is stored in (7 + 1) / 2 = 4 bytes. For packed fields each zone and digit contains a position of the value except for the right-most digit which contains the sign. If the number 123 is stored in a "5p 0" field, the hex value is 00123F or 00123C. Valid values f
sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above http://www.code400.com/forum/forum/iseries-programming-languages/rpg-rpgle/2772-decimal-data-error to proceed. To start viewing messages, select the forum that you want to visit from the selection below. sponsored links Collapse Announcement Collapse No announcement yet. 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 data error new posts donna_ny Experienced Forum Member Join Date: Oct 2006 Posts: 81 #1 decimal data error November 30th, 2006, 09:57 AM I get below error while debugging my program Message . . . . : Decimal-data error occurred (C G D F). Cause . . . . . : RPG procedure ABC025 in program DLESTER/ABC025 found a decimal-data error at statement 501. A decimal data error packed or zoned value does not contain valid numeric data. A digit and/or sign is not valid. 501 statement is EVAL ABC_32A_WHLPOS = %abs(ABC_32A_WHLPOS) ABC_32A_WHLPOS is defined as D ABC_32A_WHLPOS... D 12 0 D 1 inz(',') But it appears to me valid data , how can I further debug the problem to find whats going on and to fix it... All help is appreciated. Donna Tags: None Red Analyst Join Date: Mar 2005 Posts: 392 #2 November 30th, 2006, 10:07 AM Re: decimal data error Use start debug command STRDBG PGM(program) UPDPROD(*yes) set a break point at the statment in error and display the variable Comment Cancel Post Zdenko Analyst Join Date: Jun 2005 Posts: 195 #3 November 30th, 2006, 10:11 AM Re: decimal data error Hi You don't have to set the break point, because program will stop at the certain line, when condition will be met. LP Zdenko Comment Cancel Post Red Analyst Join Date: Mar 2005 Posts: 392 #4 November 30th, 2006, 10:19 AM Re: decimal data error That's true you don't have to set the break point. I do it out of habit. In hind