Warning
This component requires an Oracle JDK to be functional.
Component family |
File/Output |
Note that this component is deprecated. The EBCDIC handling capabilities are now fully |
Function |
The tFileOutputEBCDIC writes an |
|
Purpose |
This component writes an EBCDIC file with data extracted from |
|
Basic settings |
Property type |
Either Built-in or Repository. |
|
|
Built-in: No property data stored |
|
|
Repository: Select the repository |
|
Schema |
Select an option from the list to edit either the Built-in or NoteThis list is enabled when you select the Custom set Original Length in |
|
|
Built-in: Select this option to |
|
|
Repository: Select this option to |
|
File name |
Click […] to browse to or type |
|
Edit schema |
Click […] to edit the Built-in NoteThis button is enabled when you select the Custom set Original Length in Schema |
|
Xc2j file |
Click […] to browse to or type NoteThis field will be disabled and xc2j file will not be |
|
Custom set Original Length in Schema |
Select this check box to improve the speed of reading files. NoteWhen you select this check box, the Xc2j file field will be disabled and xc2j |
Advanced settings |
Create directory if not exist |
Select this check box to create a directory when the one you |
tStatCatcher Statistics |
Select this check box to gather the processing metadata at the Job |
|
Global Variables |
NB_LINE: the number of rows read by an input component or ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Usage |
Use this component to write an EBCDIC file and to output the data |
|
Log4j |
The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
Note
This scenario uses the [Copybook Connection]
wizard that guides users through the different steps to create a Copybook
connection and to retrieve the EBCDIC schemas. This wizard is available only for
users who have subscribed to one of the Talend solutions.
Otherwise, you need to drop the tFileInputEBCDIC
component from the Palette and set its basic
settings manually.
The following scenario is a three-component Job that aims at writing an EBCDIC-format
file using two delimited files with different schemas.
This Java scenario uses the [EBCDIC] Connection
wizard to set up a connection to the Copybook file and to generate an xc2j file, which
allows the retrieval and transformation of the different file schemas.
-
Create a connection to the Copybook file, which describes the structure of
your EBCDIC file. In this scenario, the Copybook connection is called EBCDIC.
For more information on how to
set up a Copybook connection, see Talend Studio
User Guide. -
Retrieve the file schemas. For
more information on how to retrieve schemas from the Copybook file, see
Talend Studio
User Guide.
Once the Copybook connection has been created and the schemas retrieved, using the
[EBCDIC] and [Schema] wizards, the new schemas appear under the node Metadata > Copybook. They
are called 01, 04 and
05.
To create an EBCDIC file based on two delimited files in Talend Studio :
-
Drop the following components from the Palette to the design workspace:
tFileInputDelimited (x2) and tFileOutputEBCDIC. -
To connect them together, right-click on each tFileInputDelimited component, select Row > Main in the contextual
menu and click on the tFileOutputEBCDIC
component. -
Double-click on the first tFileInputDelimited
component to display the Basic settings view
and set the component properties.
-
In the File Name field, browse to the
delimited file via the three-dot button […].
Warning
If the path of the file contains some accented characters, you will get an error
message when executing your Job. For more information regarding the procedures to
follow when the support of accented characters is missing, see the Talend
Installation and Upgrade Guide of the Talend solution you
are using.
-
In the Schema field, select Repository, then click the three-dot button and, when
prompted, select the schema corresponding to your file, under the Copybook node. -
In the Header field, set the number of fields
that are used as “headers”, 1 in this example. -
Set the properties for the second tFileInputDelimited component the same way as for the first
component. -
Double-click the tFileOutputEBCDIC component
to display the Basic settings view and set the
component properties:
-
In the Data file field, enter or browse to
the directory path and the EBCDIC file name that is to be created based on both
delimited files. -
In the Xc2j file field, enter or browse to
the path to the file allowing to extract the schema that describes the EBCDIC
structure file. -
Save your Job via Ctrl+S and click on the
Run view, select the Statistics and Exec time check
boxes then click Run to execute the Job.