I have used the unpack data logic provided in below link for java How to unpack COMP-3 digits using Java? But for the null data in source it returns 404040404 like on Java unpack code. I understand this was space in ebcdic, but how to unpack by handling this space or to avoid it.
EBCDIC unpacking comp-3 data returns 40404** in Java
520 Views Asked by Rajesh At
1
There are 1 best solutions below
Related Questions in JAVA
- Add image to JCheckBoxMenuItem
- How to access invisible Unordered List element with Selenium WebDriver using Java
- Inheritance in Java, apparent type vs actual type
- Java catch the ball Game
- Access objects variable & method by name
- GridBagLayout is displaying JTextField and JTextArea as short, vertical lines
- Perform a task each interval
- Compound classes stored in an array are not accessible in selenium java
- How to avoid concurrent access to a resource?
- Why does processing goes slower on implementing try catch block in java?
- Redirect inside java interceptor
- Push toolbar content below statusbar
- Animation in Java on top of JPanel
- JPA - How to query with a LIKE operator in combination with an AttributeConverter
- Java Assign a Value to an array cell
Related Questions in MAINFRAME
- difference between passing control to different program using return() and calling a program using xctl
- Getting output queue via FTP of a Mainframe (zOS)
- SELECT operator
- authentication between mainframe system and .net web service
- Register a copied application to registry
- I have a variable with PIC S9(4). Whether I use COMP or COMP-3 here?
- Converting a numeric to packed-decimal in Stored Procedure
- EBCDIC to ASCII not working Properly
- Send text file from Mainframe to IBM MQ
- Submit another JCL as a step from main JCL based on RC of the previous step {via Internal Reader}
- Accessing Mainframe datasets using FTP form Python
- Access a VSAM File from Rexx
- How to print decimal points in cobol?
- Procedure was expanded as instream procedure definition
- When a sql returns more than one value, what value will be stored in the host variable
Related Questions in EBCDIC
- Site code to enable UTF-8 to EBCDIC encoding
- EBCDIC to ASCII not working Properly
- Internal EBCDIC support for ANTLR 3.1.3?
- Are there ANTLR .stg template files available in different encodings?
- How to unpack COMP-3 digits using Java?
- Converting EBCDIC to ASCII in java
- Converting EBCDIC to persian characters in c#
- How do I transform byte to bits using SSIS?
- How to export VSAM file content to viewable in windows?
- Senda Data in Socket C#, format EBCDIC
- ISO8583 for Amex
- How to convert character set to unicode in db2 query
- How to read EBCDIC data with a non standard codepage, and not mess up numbers?
- How to detect if a Unicode char is supported by EBCDIC in .NET 4.0?
- BASH Script to find a string in a file by position, match, then modify that position and insert if it exists
Related Questions in PACKED-DECIMAL
- How to unpack COMP-3 digits using Java?
- SQL How to get COMP-3 Packed Decimal?
- How to avoid that "x0d" is interpreted as a newline character?
- Convert a double value to Packed decimal COBOL format PIC S9(5)V9(4) COMP-3/Packed decimal COBOL format PIC S9(3)V9(4) COMP-3 format in JAVA
- WRBTR field calculation inside CASE throws error for max decimal places
- how can I convert a packed decimal format (S370Fpd5) in R?
- Read packed decimal and convert to numeric in spring boot
- COBOL Comp-3 In Java
- Define returning type as packed number for method
- COBOL DATATYPE CONVERSION: Convert date in DDMMYY to a packed decimal of 3-bytes
- Sorting pd fileld in vb file using dfsort in jcl
- Physical storage of COBOL PACKED-DECIMAL field on Little Endian machines
- Unable to unpack comp 3 to numeric in java
- How to read packed decimal / packed integer format in R
- EBCDIC unpacking comp-3 data returns 40404** in Java
Related Questions in COMP-3
- Is there an existing gem or script that converts comp-3/packed decimal format to number?
- SQL How to get COMP-3 Packed Decimal?
- Create a Mainframe COMP-3 fields using Oracle SQL
- In COBOL, how to convert sign comp-3 value to a readable format along with sign
- How to unpack comp3 files to readable format?
- COMP-3 data unpacking in Java (Embedded in Pentaho)
- Cobol COMP-3 value changes after write to dataset
- Unpacking EBCDIC Packed Decimals (COMP-3) in an ASCII Conversion
- How to build dataframe from cobol and ebcdic file with COMP fields using Cobrix?
- Unable to unpack comp 3 to numeric in java
- How do I move a PIC X field to a PIC S9 COMP-3 field in COBOL?
- conversion of a binary put in a comp -3 field Cobol
- how to convert decimal to Packed decimal/COMP-3
- Converting comp-3 back to a human readable format
- EBCDIC unpacking comp-3 data returns 40404** in Java
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
There are two problems that we have to deal with. First, is the data valid comp-3 data and second, is the data considered “valid” by older language implementations like COBOL since Comp-3 was mentioned.
If the offests are not misaligned it would appear that spaces are being interpreted by existing programs as 0 instead of spaces. This would be incorrect but could be an artifact of older programs that were engineered to tolerate this bad behaviour.
The approach I would take in a legacy shop (assuming no misalignment) is to consider “spaces” (which are sequences of 0x404040404040) as being zero. This would be a legacy check to compare the field with spaces and then assume that 0x00000000000f as the actual default. This is something an individual shop would have to determine and is not recognized as a general programming approach.
In terms of Java, one has to remember that bytes are “signed” so comparisons can be tricky based on how the code is written. The only “unsigned” data type I recall in java is char which is really two bytes (unit 16) basically.
This is less of a programming problem than it is recognizing historical tolerance and remediation.