Processing of COMP-3 Datatype

One Star

Processing of COMP-3 Datatype

Hello All,
I have a COBOL file structure which has a datatype " 9(3)COMP-3 " Can it be processed by Talend Open Studio 5.4.1?

Regards,
BSO.
Moderator

Re: Processing of COMP-3 Datatype

Hi,
You could try TalendHelpCenter:tFileInputEBCDIC.
In addition, talend provides users with TDM (data mapper)http://doc.talend.com/enterprise/talend_data_mapper/3.3/overview.php feature which will handle the more complex layouts that most COBOL copybooks use - REDEFINES, OCCURS, etc. (TDM is only available in Talend Enterprise Subscription Product).
http://doc.talend.com/enterprise/talend_data_mapper/5.4/
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Processing of COMP-3 Datatype

Hello Sabrina,
Thanks for your reply.
I am very new to this topic and exploring TOSDI 5.4.1.
According to my understanding
tEBCDIC component requires .xc2j and data file.
So i need to convert the cobol copybook to xc2j format before using tEBCDIC component.
-->Is there any talend component which converts cobol copybook to xc2j format?
If yes which is that TOSDI component? If no how can i convert it?
-->Is there any Sample job which shows
How the CopyBook having comp-3 Datatype is converted to xc2j format and tEBCDIC component uses this xc2j and data file for processing in TOSDI 5.4.1.
*Note: I am not using Talend Platform Edition.
Please correct me if my understanding is wrong.
Five Stars

Re: Processing of COMP-3 Datatype

if you are using enterprise talend then you can used metadata to create xc2j file but if you are using Open studio then you have to create xc2j manually using xc2j command line utility. then used same xc2j file to process EBCDIC file.
as far comp-3
columnname PIC S9(3,0)COMP-3.
it equivalent to BigDecimal(5,0);
hope this will help to process EBCDIC file.
One Star

Re: Processing of COMP-3 Datatype

Thanks Umeshrakhe,
I need below clarification.
-->How can i manually convert copybook to .xc2j format?
-->Is there any Pluging or Software to be installed to convert copybook to .xc2j format?
-->How you have achieved this and will that command line utility capable of handling COMP-3 Datatype ?
Five Stars

Re: Processing of COMP-3 Datatype

Thanks Umeshrakhe,
I need below clarification.
-->How can i manually convert copybook to .xc2j format?
-->Is there any Pluging or Software to be installed to convert copybook to .xc2j format?

-->How you have achieved this and will that command line utility capable of handling COMP-3 Datatype ?

Q1 ans : use http://cobol2j.sourceforge.net/manual.html url to generate .xcsj file.
Q2 ans : as far i know Talend does not support any direct plugin .
Q3 ans : using cobol2j utility you are able to process EBCDIC files and all type of datatypes including comp-3, comp-4 and so on.
One Star

Re: Processing of COMP-3 Datatype

Hello Umeshrakhe,
Sorry for bothering.
I followed the steps of your previous post.
I have used below link
http://sourceforge.net/p/cobol2j/feature-requests/_discuss/thread/8dae858f/
where i have used the copybook.cpy and data.ebcdic
and converted copybook.cpy to .xc2j file.
Now I fed the data.ebcdic and .xc2j to tFileInputEBCDIC.
I am struck with creating the schema for tFileInputEBCDIC.
How can i create schema for tFileInputEBCDIC.??
Is there any example that shows how to create schema by using .xc2j file or any other method.
Any example which shows clearly how the input CopyBook file looks like with corresponding datafile that can be used by tFileInputEBCDIC for creating schema in it.
I looked in several forum which says ,In TOSDI we have to create the schema manually.
I am using TOSDI 5.4.1 can anyone help me with the same?
One Star

Re: Processing of COMP-3 Datatype

Any help from Talend Support team???
Five Stars

Re: Processing of COMP-3 Datatype

can you post your xc2j file? if you open xc2j file you will find it is XML file wherein source data type and destination datatypes with length mention. right now, I don`t have any suitable example for you that's way I am requesting you to provide sample of xc2j. file.
One Star

Re: Processing of COMP-3 Datatype

Hi ,
Below is my .xc2j file

<?xml version="1.0" encoding="UTF-8"?>
<FileFormat ConversionTable="Cp037"
dataFileImplementation="IBM i or z System" distinguishFieldSize="32" newLineSize="0">
<RecordFormat cobolRecordName="REC-A" distinguishFieldValue="0">
<FieldsGroup DependingOn="" Name="REC-A-HEADER" Occurs="1">
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-01" Occurs="1" Picture="X(04)" Signed="false" Size="4"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-02" Occurs="1" Picture="X(02)" Signed="false" Size="2"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-03" Occurs="1" Picture="X(08)" Signed="false" Size="8"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-04" Occurs="1" Picture="X(03)" Signed="false" Size="3"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-05" Occurs="1" Picture="9(06)" Signed="false" Size="6"
Type="9" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-06" Occurs="1" Picture="X" Signed="false" Size="1"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-07" Occurs="1" Picture="9(05)" Signed="false" Size="5"
Type="9" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-08" Occurs="1" Picture="X(02)" Signed="false" Size="2"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-09-REC-TYPE" Occurs="1" Picture="X" Signed="false"
Size="1" Type="X" Value=""/>
</FieldsGroup>
<FieldsGroup DependingOn="" Name="REC-A-DATA" Occurs="1">
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-10" Occurs="1" Picture="X(35)" Signed="false"
Size="35" Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-11" Occurs="1" Picture="X" Signed="false" Size="1"
Type="X" Value=""/>
</FieldsGroup>
</RecordFormat>
<RecordFormat cobolRecordName="REC-B" distinguishFieldValue="0">
<FieldsGroup DependingOn="" Name="REC-B-HEADER" Occurs="1">
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-01" Occurs="1" Picture="X(04)" Signed="false" Size="4"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-02" Occurs="1" Picture="X(02)" Signed="false" Size="2"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-03" Occurs="1" Picture="X(08)" Signed="false" Size="8"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-04" Occurs="1" Picture="X(03)" Signed="false" Size="3"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-05" Occurs="1" Picture="9(06)" Signed="false" Size="6"
Type="9" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-06" Occurs="1" Picture="X" Signed="false" Size="1"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-07" Occurs="1" Picture="9(05)" Signed="false" Size="5"
Type="9" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-08" Occurs="1" Picture="X(02)" Signed="false" Size="2"
Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-09-REC-TYPE" Occurs="1" Picture="X" Signed="false"
Size="1" Type="X" Value=""/>
</FieldsGroup>
<FieldsGroup DependingOn="" Name="REC-B-DATA" Occurs="1">
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-10" Occurs="1" Picture="X(30)" Signed="false"
Size="30" Type="X" Value=""/>
<FieldFormat Decimal="0" DependingOn="" ImpliedDecimal="true"
Name="FLD-11" Occurs="1" Picture="X" Signed="false" Size="1"
Type="X" Value=""/>
</FieldsGroup>
</RecordFormat>
</FileFormat>

Below is the structure of copybook
01 REC-A.
03 REC-A-HEADER.
05 FLD-01 PIC X(04).
05 FLD-02 PIC X(02).
05 FLD-03 PIC X(08).
05 FLD-04 PIC X(03).
05 FLD-05 PIC 9(06).
05 FLD-06 PIC X.
05 FLD-07 PIC 9(05).
05 FLD-08 PIC X(02).
05 FLD-09-REC-TYPE PIC X.
03 REC-A-DATA.
05 FLD-10 PIC X(35).
05 FLD-11 PIC X.
01 REC-B.
03 REC-B-HEADER.
05 FLD-01 PIC X(04).
05 FLD-02 PIC X(02).
05 FLD-03 PIC X(08).
05 FLD-04 PIC X(03).
05 FLD-05 PIC 9(06).
05 FLD-06 PIC X.
05 FLD-07 PIC 9(05).
05 FLD-08 PIC X(02).
05 FLD-09-REC-TYPE PIC X.
03 REC-B-DATA.
05 FLD-10 PIC X(30).
05 FLD-11 PIC X.

I dont have data file for this as i have downloaded this copybook from below path
http://sourceforge.net/p/cobol2j/feature-requests/_discuss/thread/8dae858f/
And even i dont know whether the xc2j file generated is correct for the copy book or any other manipulation has to be done in .xc2j file?

Using the xc2j file and and the data file in above link as an input to tFileInputEBCDIC what should be the schema structure that has to be defined in tFileInputEBCDIC componennt?
Regards,
BSO
One Star

Re: Processing of COMP-3 Datatype

does anyone implement occurs 0 to n times in TAlend copybook?
if it's not possible in tfileinputEBCIDIC then any alternate solution?