Questions tagged [packed-decimal]

A convention for storing numerals, one per half-byte, with the final half-byte being an indicator of the sign. Common values for the sign are C (positive) D (negative) and F (unsigned, treated as positive)

A convention for storing numerals, one per half-byte, with the final half-byte being an indicator of the sign. Common values for the sign are C (positive) D (negative) and F (unsigned, treated as positive). Rare, but possible, other values for the sign are A (positive), B (negative) and E positive.

See BCD for what looks like a packed-decimal, but only containing numerals (no signs).

39 questions
0
votes
1 answer

how can I convert a packed decimal format (S370Fpd5) in R?

Can the Packed Decimal Format S370Fpd5 be converted with R or Python? Below are examples with the actual output after ascii conversion, the expected ouptut and also in HEX format. ACT OUTPUT EXP OUTPUT HEX ....@ 647 00 00 00 00 00 00 00 00…
0
votes
0 answers

Sorting pd fileld in vb file using dfsort in jcl

I have a vb file length of 2504. I need to sort the field (234,7) Field declaration- S9(13) comp-3. Since it is a vb file I did like below. //Sysin dd* Sort fields= (238,7,pd,A) /* But it's not sorting properly . Pls help .. Thank you!!
0
votes
1 answer

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

I am trying to 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, see below example : Double Value : 00000.6775 Converted to Packed Decimal : ^@^FS,^@ Is this…
Arjun
  • 38
  • 1
  • 1
  • 5
0
votes
2 answers

CPU usage C Packed struct vs Unsigned Long Long operations

I need to do some operations with 48 bit variables, so I had two options: Create my own structure with 48 bit variables, or Use unsigned long long (64 bits). As the operations will not overflow 48 bits, I considered that using 64 bit variables…
liwuen
  • 330
  • 2
  • 17
0
votes
1 answer

Read a packed decimal (Comp-3) number value which is 8 characters; but holds a 13 digit number and convert to 13 digits numeric value

I am seeking code to read a text file which is in packed decimal (Comp -3) numeric value which was created in main frames system and is 8 characters, but holds a 13 digit number in packed decimal format. I came across below code private Decimal…
VR1256
  • 1,266
  • 4
  • 28
  • 56
0
votes
1 answer

EBCDIC unpacking comp-3 data returns 40404** in Java

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…
Rajesh
  • 69
  • 1
  • 6
0
votes
2 answers

Unable to unpack comp 3 to numeric in java

I referred a code on the internet to unpack comp 3 to numeric in java. I tried to pass a sample comp3 file to the code but I didn't get the proper unpacked data. I got some weird numbers. I am new to this concept(comp 3) so can you guys help me on…
0
votes
1 answer

Unpacking COMP-3 digit using Record Editor/Jrecord

I have created layout based on cobol copybook. Layout snap-shot: I tried to load data also selecting same layout, it gives me wrong result for some columns. I try using all binary numeric type. CLASS-ORDER-EDGE DIV-NO-EDG OFFICE-NO-EDG …
Rahul Patel
  • 307
  • 1
  • 9
  • 27
0
votes
1 answer

How to convert a Simple Java String to EBCDIC with packed decimal format

i have to convert all the data in file to EBCDIC with packed decimal format. all the data in the file is in simple text format. As per my knowledge we will need to convert the ASCII to EBCDIC Cp1047 or some other format first and then apply “packed…
Abhijit Marne
  • 65
  • 2
  • 3
1 2
3