You are not logged in.
I've got some flatfiles that have COMP-3 packed numbers. I don't have the possibility to run a program on the mainframe and change it there.
Is there any way to convert these to 'normal' numbers in talend?
With a Perl project, you can use a tPerlRow component with the following code:
use Convert::IBM390 qw(unpackeb packeb); @output_row = @input_row; ($output_row[field]) = unpackeb('p4', $input_row[field]);
See Convert::IBM390 documentation on CPAN about the pattern used to extract field in unpackeb function.
What is the Cobol Copybook definition of the field?
Hmm. That looks easy Unfortunatly my project is Java but luckily i found a class that can do it. I found it here:
cobolConversion V0.0.3 package
I read the file with fixed width columns. The packed columns with byte type, length 2. I pass the column data directly to a conversion method. Don't forget to uncheck trimming for the fields..
This is the copybook:
05 TAB-CODE PIC X(1) VALUE "D".
05 VWC PIC X(2).
05 JAAR PIC X(1).
05 DOCNR PIC X(4).
05 FILLER PIC X(23).
03 FAA-VNR-TELLER PIC S9(3) COMP-3.
03 FAB-POSTNR-TELLER PIC S9(3) COMP-3.
03 FAD-VLAG-INSCHR PIC X(1).
I was looking for code or routine to read copy book from MVS system using Talend3.0 tp apply transcodification to data stream. , please if you have it ,can you please send it my ID.