Skip to main content Skip to complementary content

Step 2: Setting the command to enable the output stream feature

Now you will use tJava to set the command for creating an output file and a directory that contains the output file.

Procedure

  1. Drop a tJava component onto the design workspace, and double-click it to open the Basic settings view to set its properties.
    Screenshot of the component basic settings.
  2. Fill in the Code area with the following command:
    new java.io.File("C:/myFolder").mkdirs(); 
    globalMap.put("out_file",new java.io.FileOutputStream("C:/myFolder/customerselection.txt",false));
    Information noteTip:

    The command you typed in this step will create a new directory C:/myFolder for saving the output file customerselection.txt. You can customize the command in accordance with actual practice.

  3. Connect tJava to tFileInputDelimited using a Trigger > On Subjob Ok connection.
    This will trigger the subJob that starts with tFileInputDelimited when tJava succeeds in running.
    Screenshot of the Job in the Designer.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!