This group of test cases will show the process for converting a BINARY numeric format (COMPUTATIONAL or COMP) to a display format. Enter 2 and 3 in the TO section of the panel, for example:CA File Master Plus -- Reformat your.CONVERT.LIB(REFORMAT) COMMAND ===> SCROLL ===> CSR FROM Record ------------ CPYBK#O1 of your.CONVERT.LIB --------------Num Field Name Pos Format Row 1 of 3 1 DATAREC1OLD 1 78 2 FIELD1-PCK 1 P 8.2 3 FILLER 7 C 72 *************************** Bottom of Record Layout *************************** TO Record ------------ CPYBK#N1 of your.CONVERT.LIB --------------Num Field Name Pos Format Reformat Row 1 of 3 1 DATAREC1NEW 1 80 2 FIELD1-NUM 1 N 6.2 2 3 FILLER 9 C 72 3 *************************** Bottom of Record Layout ***************************After pressing enter the numbers will be automatically translated to the field names.Press PF3 and type E now.You will see the JCL now. AFTER THIS IT NEED BE AGAIN CONVERTED BACK INTO PACKED DECIMAL INORDER TO INSERT THIS FIELD INTO A TABLE. Your email address will not be published. P stands for Packed - in Easytrieve variable declaration. at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e) at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer. T gives right-alignment, U gives left-alignment. Converts a packed number to decimal format. COMP-3 fields length is calculated as number of digits that we need to store + 1 divided by 2. . The following PROCEDURE DIVISION statement shows how to convert from a ZONED-DECIMAL to a DISPLAY (with SIGN TRAILING SEPARATE) numeric value. Just define WS-DEC-PART as PIC V999 and ADD. This file used to be written by a COBOL program and this one field was written using COMP-3. Explore How to do EBC to ASC Data Conversion of an 80 byte Data Structure. Which worries me, those should require 10 bytes. PIC is "picture" 02 MONEDA-OUT PIC X(2). > We need to convert this hex character to its decimal equivalent. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Is there an existing gem or script that converts numbers to comp-3/packed decimal format? Connect and share knowledge within a single location that is structured and easy to search. On the next image you can see a On the Script Tab select Visual Basic as the Script Language. We have to instruct You know how Cobol has these field definitions for numbers like PIC 9999v99 and stuff. To I tried to import 40000 rows using the next format : 02 SUC-OUT PIC X(3). This numeric structure is supported by COBOL and may be explicitly defined with the "USAGE IS COMP" or "USAGE IS BINARY" clause. Is there a single-word adjective for "having exceptionally strong moral principles"? We specialize in the creation and deployment of business applications using new or existing technologies and services. Since both X and Y now occupy the same physical storage, the MOVE can be dropped as the following program and output illustrate: As you can quickly see, the result is probably not what you were hoping for since Y does not contain a human readable formatted number (i.e. Is the God of a monotheism necessarily omnipotent? the GnuCOBOL Technologies The decimal number representation of the input packed number. transformation. COMP-3 occupies INT(N+1/2) by. data we cant handle its content as simple text anymore, we need to perform analysis A string containing the converted string. Why is this sentence from The Great Gatsby grammatical? document.getElementById( "ak_js_1" ).setAttribute( "value", ( new Date() ).getTime() ); Your email address will not be published. This test case will show the process for converting a zoned-decimal-numeric format to a display (or zoned-decimal) format. How do you grab a string in COBOL from a file when the position is unknown? 359 , Road No. COMP-3 fields length is calculated as number of digits that we need to store + 1 divided by 2. The last digit goes in the upper nibble of the last byte. ("11 REFORMAT Convert file from one record layout to another"). This is something like moving numeric fields manually around the decimal '.' Is it possible to rotate a window 90 degrees if it has the same length and width? 9(3) is a three digit numeric, and COMP-3 is BCD encoded decimal. I assume the format is not fixed, since then you could just pick that part of the string and move it to a field defined with pic 9.999 and use it from there. 2. I am creating an SSIS package to read in unpacked data from a series of copybook files. For additional information about SIMOTIME Services or Technologies please contact us using the information in the Contact, Comment or Feedback section of this document. This is the "official" BCD packed format of the COBOL standard. Long winded but very straight forward. and view the COBOL source code for this numeric field conversion example. how to convert decimal to Packed decimal/COMP-3, Having trouble unpacking Comp-3 in .Net. 02 CAUSAL-OUT PIC X(3). which is a slight modification to my previously posted code, has been tested and correctly adds 1 to the 10th digit -- same output as previously posted. take a look at. What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots? Do we have a way? The function delivered in this version is based upon the enhancement requests from a specific group of users. This section includes links to documents with additional information that are beyond the scope and purpose of this document. The difference between the phonemes /p/ and /b/ in Japanese. display vars) ? copybooks. It is implemented as "comp-3". Sorry I am two years late :-( . Thanks for your time How to convert a alphanumeric string into numeric decimal in COBOL, How Intuit democratizes AI development across teams through reusability. To learn more, see our tips on writing great answers. The following PROCEDURE DIVISION statement shows how to convert from a ZONED-DECIMAL to an EDITED numeric value. This group of test cases will show the process for converting a zoned-decimal-numeric format (USAGE IS DISPLAY) to a display format. 03 AMOUNT PIC S9(11)V99 COMP-3. The SimoTime Home Page How do you convert packed decimal to numeric in COBOL? 1. I tried with below logic. This section provides various test cases for converting different types of numeric fields. The Result field is also defined with a SIGN TRAILING SEPARATE that creates an additional byte to the field for the sign. The following links will require an Internet connect. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Using Kolmogorov complexity to measure difficulty of problems? If the sample program is executed in the PC, ASCII environment the following would be displayed and written to the SYSOUT file. Each nybble (half-byte) of the field is a decimal value in binary, so. REFFILE. As said above, UNSTRINGing and combining didnt work, but REDEFINES works! on the properties frame set to true the UseBinaryFormat property. Note: As I already knew that decimal part has 3 digits, I divided DECIMAL-TOTAL by 1000. Why does my COBOL working storage variable have trailing zeroes? Explore This is because, MOVE will work fine, if the hexadecimally stored values are compatible. Category and Balance. about the data types just in case you dont know about Cobols syntax. The following shows the picture (PIC) clause, how the item is displayed using the DISPLAY verb, the field as it is stored in memory for an EBCDIC environment, the field as it would be stored in memory for an ASCII environment. We are going to instruct the SSIS pipeline The Source Field is defined as a Binary (or COMP) field with 6 digits and 3 decimal positions. Back to top. Is there an existing gem or script that converts comp-3/packed decimal format to number? The next step is to set up the Inputs and Outputs tab. How would "dark matter", subject only to gravity, behave? Morevoer i got SOC7 abend. As Mainframe_help1 said you can redefine it. Also the COBOL Routine for Example-204 Packed Decimal Data. The light-gray boxes identify a system function or an informational item. the COBOL Routine for Example-201 and what would happen then? Such a REFFILE will be created via File Master ISPF 3.11 menu, 11 REFORMAT Convert file from one record layout to another, How to convert packed decimal values to numeric values via File Master using COBOL copybooks, This document describes how packed decimal values (. There is some correction in his code too. Here is a sort card to convert packed decimals to zoned decimals. Packed Decimal. The Zoned-Decimal format may be used as the result field of a conversion process, for COBOL this is explicitly coded or defaulted as "USAGE IS DISPLAY". one digit per byte. This link requires an Internet Connection. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the icon. we must set the TextQualified option to False. Packed Decimal Data. I HAVE A PACKED DECIMAL FIELD WHICH IS REDEFINED TO A NUMERIC FIELD TO ADD "1" TO ITS TENTH DIGIT. and view the COBOL source code for this numeric field conversion example. The above internal table itab is passed to the Function module GUI_DOWNLOAD and the itab data is downloaded to a text file. Yes, for a fixed format define a structure accordingly. This document will focus on a discussion of a numeric field (or data string) known as "PACKED-DECIMAL" format (also referred to as packed data or a packed numeric field). Explore the Numbers Connection for additional information about the structure and processing of numeric data items (or numeric fields). In the world of programming there are many ways to solve a problem. For your program, check for negative (D) and if not, treat as positive. Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? The mask for the Result field will cause an explicit decimal point to be inserted. But just like with the zoned numbers, the less significant nibble of the first Did this satellite streak past the Hubble Space Telescope so close that it was out of focus? Software Agreement and Disclaimer. Does a summoned creature play immediately after being summoned by a ready action? What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots? Code: 01 WS-PACKED-DECIMAL PIC S9 (11)V99 COMP-3 VALUE 1542.16. previous tip, SSIS offers us the possibility to extend its functionality by 02 NUMOPE-OUT PIC X(6). Get alphanumeric string redefined into two numeric fields to hold and process decimal part and integer part individually. You are right, the issue is in that definition. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Coming to redefining with value field of PIC 9.999 doesnt work because 9.999 is a picture edited type, which will be useful for displaying/output purpose and will still not be able to do the required arithmetic. Can I tell police to wait and call a lawyer when served with a search warrant? If the packed decimal is 0x11234D. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats. My code is GPL licensed, can I issue a license to have my code be distributed in a specific MIT licensed project? SQL data types, SQLLEN values, and SQLTYPE values that the precompiler uses for host variables in COBOL programs. but this doesnt solve my issue.:-(. The decimal number representation of the input packed number. Now we need to drop into our package a Flat File Source, an OLEDB Destination The next image may be used as a guide. The fewer decimal positions of the result field will be rounded because of the ROUNDED keyword on the ADD statement. This program (NBRCVTC1.cbl) was written to show various techniques for converting between various Packed numeric field formats used on the mainframe and/or with the COBOL programming language. If you have read my The following PROCEDURE DIVISION statement shows how to convert from a BINARY to a DISPLAY (or unsigned Zoned-Decimal) numeric value. The Result field is also defined with a SIGN TRAILING SEPARATE that creates an additional byte to the field for the sign. The Source Field is defined as a Packed (or COMP-3) field with 6 digits and 3 decimal positions. Move LOW-VALUES to the first byte of the 2-bytes variable. Here I used SORT FIELDS=COPY is equal to OPTION COPY. I am unsure of the correct interpretation of the following field definitions and was hoping someone would know: FIELD-NAME-1 PIC S9(15)V9(3) COMP-3. The lower nibble of the last byte has 13 if the number is negative, and something else, (usually 12) if positive. So my advice to you is don't try bend COBOL into something that it is not. Calculation for length: PD= 5 bytes Length= ( (2 x PD) -1) = (2x 5) -1 = 9 bytes. The fewer decimal positions of the result field will be rounded because of the ROUNDED keyword on the ADD statement. The Source Field is defined as a Zoned-Decimal (or USAGE IS DISPLAY) field with 5 digits and zero decimal positions. Link toan Evaluation zPAK Optionthat includes the program members, documentation and control files. Why do you believe you want/need floating-point? Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? if itab-netpr has a value of 1,234.56, i need to convert that to ' 123456'. The Source Field is defined as a BINARY (or COMP) and the result fields are "USAGE IS DISPLAY" or a numeric edited field. This will allow COBOL to handle the conversion between the PIC X internal storage format and the COMP-3 internal storage format. This is an EBCDIC encoded environment. WS-VAR W 2 P 0. if itab-menge has a value of 2.00, i need to convert that value to ' 200'. Table 1. I've written a package just like this one and the packed fields are importing just fine. handle packed numeric values. > a hex character to represent a 3-digit insurance plan number (which in. so as i had explained earlier , i moved the packed decimal field to a numeric field and redefined the numeric field each having one digit. So the last four bits of the number is used to store the sign of the number that is C or D so "C" represents the positive number and "D" represents the negative number. (ie, Numeric to Numeric, Packed to Packed, or Binary into our sample table. Will Gnome 43 be included in the upgrades of 22.04 Jammy? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, How to convert Decimal Values to Strings in COBOL, How Intuit democratizes AI development across teams through reusability. Sometimes it is needed to convert packed decimal fields to numeric Or display formats for debugging or analysis purposes. The binary strings will be bypassed, the numeric strings will be processed based on their numeric type and the text strings will be converted from EBC to ASC based on a user selected conversion table. Processors such as the IBM 370 family, the PDP-10, the Motorola microprocessor family, and most of the various RISC architectures are big-endian. 02 OPERADOR-OUT PIC X. Explore The ASCII and EBCDIC Translation Tables. Services truncates the string at the occurrence of the first NULL, so we wont be 02 FIELD1-NUM PIC 9(06)V99. JCL Procedure: Instream, Catalogue, Nested. Thanks for contributing an answer to Stack Overflow! Required fields are marked *. The other two fields are already odd lengths, so when packed, with the sign, they can be stored in an even length amount of space. Big Endian - within a multi-byte numeric representation the most significant byte has the lowest address. How to convert packed decimal values to numeric values via File Master using COBOL copybooksThis document describes how packed decimal values (Computational-3) can be converted to numeric values via File Master using COBOL copybooks.The only method to get this done is to use a File Master Reformat data set, aka. are String with a length of 50. iDecimalPlaces (Integer): The number of implied decimal digits for the packed number. To learn more, see our tips on writing great answers. Get alphanumeric string redefined into two numeric fields to hold and process decimal part and integer part individually. available from SourceForge. Right now if a new opcode (or some other constant) is added to dwarf2.h, then various places must be updated: gcc, gdb, and binutils all have copies of functions to convert, e.g. One copybook for the source data structure and one for the new data structure. Caveat, this was just freehand, I haven't tried compiling it. When you write a packed field to a WORK file, the output record will contain the field in packed format. Copyright 1987-2023SimoTime Technologies and ServicesAll Rights Reserved. Since this example uses an unsigned number the conversion is the same as a simple move. 02 TIPCAM-OUT PIC S9(9)V9(6) COMP-3. 02 FEC-AA PIC X(2). 01 WS-ZONED-DECIMAL PIC S9 (11)V99. Also, like zoned numbers, packed numbers can have implied decimal The sign indication is dependent on your operating environment. Why do many companies reject expired SSL certificates as bugs in bug bounties? The Micro Focus Web Site It should be V999. The next Joe, it is WS-EDITED-NUMBER from the REDEFINES which is being MOVEd, so no spaces. Connection to the file created in the previous step and an OLEDB connection to our byte [] pd = args [0] .getBytes () will build a byte array = {0x11, 0x23, 0x4D} this will result in -11234. previous tip about importing mainframe data, you will remember that the Visual Explore The File Status Return Codes to interpret the results of accessing VSAM data sets and/or QSAM files. the expense of increased code complexity. if itab-menge has a value of 2.00, i need to convert that value to ' 200'. else that would make our package end with an error. Help? This allowed programmers to economize space by using half of the size for numerical Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call or check the web site at http://www.simotime.com, 104, Packed Field, Explicit Decimal Point, 204, Binary Field, Explicit Decimal Point. Downloads and Links to Similar Pages Now we are ready to execute the SSIS package and after it completes we can perform SimoTime Technologies was founded in 1987 and is a privately owned company. The type is specified using a specific character selected from the table below. tip: If you want to enrich your SSIS packages and make them look more professional, Little Endian - within a sixteen or thirty-two bit word the bytes at lower addresses have lower significance. If you take a look at the This document will describe and demonstrate the conditional processing of individual string types within a data structure based on a COBOL copy file that defines the data structure. I believe, the receiving fields should be 'STRING's too. For more information about the Hex-Dump format refer to the Hexadecimal Dump Format section of this document. Next is a table that reviews the functions and procedures used in this tip. I need to convert the values of packed decimal fields in itab to numeric type. Parent topic: Reformatting records with fixed fields. The following is the WORKING-STORAGE definition for the source field. How to convert 'PD' to 'ZD'. . will be occupying 2 bytes and the corresponding Easytrieve declaration is. This link requires an Internet Connection. Converts a string from EBCDIC to ASCII and vice versa. See comp-3, above. Why do many companies reject expired SSL certificates as bugs in bug bounties? 01 DATAREC1NEW. After pressing enter you have to assign the "FROM" fields to the "TO" fields. I am very glad that these tipshad helped you! Explore The Edited for Display format for numeric data strings. What is the purpose of this D-shaped ring at the base of the tongue on my hiking boots? REFFILE. Why is this sentence from The Great Gatsby grammatical? Asusually, I could find out a way to achieve it! I am unsure how to interpret the decimal place and sign. This test case will show the process for converting a zoned-decimal-numeric format to a display format. Book Description This book is intended to support ISPF application programmers to become professional in the smart programming of ISPF . A typical job script will contain multiple job steps executed in a predefined sequence. The spaces really do you a favor by causing the SOC7 (Numeric Exception) on the intermediate arithmetic fields. The following links may be to the current server or to the Internet. arithmetic on it. Would the magnetic fields of double-planets clash? Radial axis transformation in polar kernel density estimate. COMP-3 variable contains any of the digits 0 through 9, a sign. Does ZnSO4 + H2 at high pressure reverses to Zn + H2SO4? Refer to Why don't you just add 10 to the comp-3 field, why make it more difficult. COBOL Comp-3 is a binary field type that puts ("packs") two digits into each byte, using a notation called Binary Coded Decimal, or BCD. You can download the SSIS package and the sample text file used for this The source field content is already in a display format. Moving packed-decimal (PIC S9(11)V99 COMP-3) to zoned-decimal (PIC S9(11)V99) is completely valid - providing the comp-3 data is properly signed numeric. Since we are going to perform Move packed field to X (05) (here I got value as x'0123450000') Converting packed to string:-. Atlast divide the decimal-total by 1000 and add it to integer-part. Spaces also are pretty good at "disguising" themselves as "zoned"/"display" numerics (zeros), it is on when they get in the "sign" left-most "half" of the right-most byte that they "might" (depending on other things) cause a S0C7. Although it only requests 18 digits (15+3), it gets 19 to make it an even length field with the sign (one digit added to the front to make it 10 bytes long on the file). Refer to By: Daniel Farina | Updated: 2015-01-20 | Comments (7) | Related: More > Integration Services Data Flow Transformations. We need some sample data in a text file to load into our previously created table. I included two functions to handle data conversion: Translate and To change this to readable format, you need to convert these numbers into ZONED Decimal (ZD) format. The hexadecimal information is (highlighted in green) The possible translated, displayable EBCDIC characters are (highlighted in blue). REFFILE. FIELD-NAME-2 PIC S9(3)V9(8) COMP-3. The following (NBRCVTJ1.jcl) is a sample of the ZOS oriented JCL needed to run this job in a Mainframe-oriented environment. And then, do the calculation with WS-NUMBER. This test case will show the process for converting a packed-numeric format to a display (or zoned-decimal) format. If you are using a COBOL program, just move the packed decimal variable into a numeric field and then try to write to output file. Try it and see what gives you the answer you want. IF THERE IS ANY OTHER METHOD TO ADD ONE TO THE 1OTH DIGIT OF VALUE IN A PACKED DECIMAL FIELD WITHOUT CONVERTING IT INTO NUMERIC. Numeric formats quite often require a conversion to another numeric format or data type prior to being printed, displayed or exported to a non-mainframe or non-COBOL environment. The number of digits in this field equals 2(5) - 1 or 9. Why are Suriname, Belize, and Guinea-Bissau classified as "Small Island Developing States"? 02 FILLER PIC X(72). Please suggest. The Source Field is defined as a Zoned-Decimal (or USAGE IS DISPLAY) and the result fields are "USAGE IS DISPLAY" or a numeric edited field. And Please suggest any other way to achieve the same! The following (NBRCVTJ2.jcl) is a sample of the ZOS oriented JCL needed to run this job in a Mainframe-oriented environment. For example, I have a 2 character field with value of PR. 01 WS-BINARY PIC S9 (11)V99 COMP. Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the icon. The following is the WORKING-STORAGE definition for the source field. The following is an example of actual COBOL source code. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems. The IBM Mainframe and the COBOL programming language support a variety of numeric formats and each has its advantages and disadvantages. Yes, the above program uses an additional variable in the middle to convert numeric format to display format, but that is exactly how the language was designed. For detailed information on DFSORT's numeric conversion parameters, see z/OS DFSORT Application Programming Guide. For example to store an numeric field of value 987 we would required 3 +1 divided by 2 = 2 Hence an Comp-3 field of length 2 bytes can store a value of +999 to -999 as the limit. The Source Field is defined as a Zoned Decimal field with 6 digits and 3 decimal positions. The following is the WORKING-STORAGE definition for the source field. The combined scores of. See method getMainframePackedDecimal in http://jrecord.cvs.sourceforge.net/viewvc/jrecord/jrecord/src/net/sf/JRecord/Common/Conversion.java?revision=1.2&view=markup, for an example of converting packed decimal in java (it is part of the jrecord project jrecord.sf.net). This represents a number +6150000 with picture clause of S9(7) COMP-3. On the Advanced view we are going to add four columns named Name, Address, Using DFSORT OUTREC options you can achieve the same. Therefore, when the field is used in the calculation specifications, the result field must be nine positions long. The naming of a job script is determined by the Operating System. Thanks for contributing an answer to Stack Overflow! 02 FEC-DD PIC X(2). . What video game is Charlie playing in Poker Face S01E07? Raja, If done correctly, as Gilbert's is, I don't see how you'll S0C7. If it is not, there will be an 0c7. Making statements based on opinion; back them up with references or personal experience. You'll have to transfer from first non-blank, byte at a time, ignoring ".", into a numeric (N) field that is redefined as A with the OCCURS. Add a comment. The session will describe three of the popular numeric formats used with COBOL and IBM Mainframe systems. WRITE WORK does not allow format specifications nor edit masks. The actual representation which we want is: To achieve this, the SYSIN of SORT should be: Drop a comment below if you face any problem using the above example. The following (NBRCVTJ3.jcl) is a sample of the ZOS oriented JCL needed to run this job in a Mainframe-oriented environment. On this link you can So an 7 digit numeric number would require 7 +1 = 8 / 2 = 4 byte in size. The following (nbrcvts1.sh) is the Bash Shell Script needed to run this job on a Linux or UNIX System using GnuCOBOL. rev2023.3.3.43278. Move X (05) to packed field S9 (10) COMP-3. My requirement is: i have fields of type packed decimal in my internal table itab. Notice that the second byte is a binary zero, also known as a For this test case the COBOL programs were compiled and executed on a Linux (Ubuntu) System using GnuCOBOL. The fewer decimal positions of the result field will be rounded because of the ROUNDED keyword on the ADD statement. The only method to get this done is to use a File Master Reformat data set, aka. This way we can have the decimal portion of the number separated from the full number. Another instance of Visual 02 IMPME-OUT PIC S9(13)V9(2) COMP-3. Lemme know what do you think. Staging Ground Beta 1 Recap, and Reviewers needed for Beta 2, How do I convert an integer value to decimal value in COBOL. Now, on the Script Tab, press the Edit Script button. Re: convert 1 BYTE binary to decimal in cobol. Explore the COBOL Connection for more examples of COBOL programming techniques and sample code. Not the answer you're looking for? CCURE 9000 AC9001 Installer/Maintainer Student Guide Appendix A 106. fPerformance Exam 1 (PE1) The scoring for Performance Exam 1 (PE1) is based on a three-part score. This test case will show the process for converting a packed-numeric format to a display format. Enter 2 and 3 in the TO section of the panel, for example: CA File Master Plus -- Reformat your.CONVERT.LIB(REFORMAT), ------------------------------------------------------------------------------. to handle the imported data for columns Category and Balance as binary data. Redefine the 2-byte alphanumeric variable as PIC S9 (04) COMP. The three most common mainframe numeric encoding formats are Zoned-Decimal, Packed-Decimal and Binary. > example, the single byte may contain X'A8'. Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform. adding custom .NET code. As provided this code handles the case by wrapping to zero. The following is the WORKING-STORAGE definition for the result field.