Decimal Data Error Rpgle
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
Decimal-data Error Occurred In As400
Availability View All Business Continuity High Availability Tools Replication IBM iSeries division mch1202 error in as400 news View All iSeries application development View All iSeries Application development tools iSeries CL programming iSeries COBOL
How To Handle Decimal Data Error In Rpg
programming iSeries ILE programming iSeries 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 decimal data error in cobol 400 iSeries disaster recovery and business continuity 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 rpgle monitor decimal data error 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 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 scen
download here. We have all encountered decimal data errors at some time or another. The biggest difficulty they present is that, by the time they have been detected, no recovery is possible. Or to be more precise, no practical recovery is possible. In my previous tip, I mentioned that one of the benefits of data structure I/O is that you can avoid decimal data errors. In this tip I'm going to show you how and why that works. The code package associated with this tip contains three test programs that demonstrate the different scenarios. The first is a straightforward RPG program with no defenses. It reads a file http://search400.techtarget.com/answer/What-is-a-Decimal-Data-Error in a loop and will encounter decimal data errors. The second is intended to show the basic use of DS I/O. It still has errors but they are subtly different. The third program demonstrates how to extend the program to fully defend against such errors. See the Readme.txt file for instructions on how to install the source code on your system. One factor that adds to the difficulty of handling data decimal errors http://www.itjungle.com/fhg/fhg031715-story01.html is that that they may occur on a READ or CHAIN operation, making it difficult to determine exactly which field is in error. This happens because the system detects the error while moving the data from the buffer to the internal variable. When we use DS I/O, the entire record is moved as if it were a large character field. In other words the numeric data is not differentiated. Since numeric fields are not differentiated they can't cause errors! Let's walk through the process of running each of the three programs so that you can see the differences between them. First, here are relevant portions of program DATAERRS1. FBadData IF E DISK DoU %EOF(BadData); Read BadData; If %EOF(BadData); Leave; EndIf; records += 1; total += amount; date = %Date(numDate: *YMD); EndDo; If you run this program, you will receive an error when reading the second record. Using F1 to look at the actual details of the error reveals that it occurred on one of the compiler-generated lines associated with the READ. This is even more obvious when you run the program in debug. If you tell the program to go (option G) you will find a similar error occurs on the reading of the third record. In both cases, determining which field is in error is
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 errors when working with files that originated on http://www-01.ibm.com/support/docview.wss?uid=nas8N1018444 mainframes, non-IBM systems, and the 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 http://flylib.com/books/en/2.172.1.110/1/ OS/400 or IBM i5/OS system to do this because program-described files are still available, especially for programs that have been migrated and are running in the System/36 environment. The following example takes advantage of the data error 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 not be what you require. However, there is a very good chance the results will be satisfactory. Always keep a back-up copy decimal data error 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 first position still produced a correct converted value. All other testing resulted in a zero value being produced. To create and run the program to correct your data, you should do the following: 1. Make a copy of the file so you can exam
Music Digital Photography & Video Games & Strategy Guides Project Management Mobile & Wireless Computing Education & Reference Encyclopedias Test Preparation Studying & Workbooks Schools & Teaching Writing, Research & Publishing Guides Foreign Language Study & Reference Atlases & Maps Dictionaries & Thesauruses Words, Language & Grammar College & University Trivia & Fun Facts Consumer Guides Business & Investing Industries & Professions Management & Leadership Organizational Behavior Personal Finance Small Business & Entrepreneurship Popular Economics Marketing & Sales Finance Skills Business Life Economics Job Hunting & Careers Biography & History Reference International Real Estate Investing Women & Business Science & Math Mathematics Technology Reference Earth Sciences Physics Biological Sciences Behavioral Sciences Nature & Ecology Astronomy & Space Science History & Philosophy Experiments, Instruments & Measurement Agricultural Sciences Category list Computers & Technology Programming Languages & Tools Education & Reference Python Visual Basic Borland Delphi CSS XHTML XML Similar pages Section 19.7. ErrorsDisplaying Validation WarningsApogee-Audible Indication ControlCurves CommandsConverting IP Addresses0657-06609.9 USER_ERRORSException HandlingException HandlingSection 11.5. Example: Reading and Writing Binary FilesWorking with Decimal PlacesODS DECIMAL_ALIGN StatementDecimal Data Type11.2. Setting Limits on an Application s Permissions Appendix B: Decimal Data Errors Buy on amazon.com >> Cozzi B. << Previous page Table of contents Next page >> Appendix B: Decimal Data Errors Decimal data is at the heart of most business applications. Floating point and binary numbers are not as incorporated into business applications as decimal data. With the possible exception of the banking industry, floating point and binary fields are not widely used to calculate amounts, quantities, dollars, etc. in the vast majority of business applications. This appendix describes decimal data errors and shows how the system handles decimal data errors when the FIXNBR(*ZONED) and the FIXNBR (*INPUTPACKED) option is specified when an RPG source file member is compiled.
DECIMAL DATA OVERVIEW There are two forms of decimal data: Zoned decimal data -- Occupying