Using a Hashed File Stage

You can use a Hashed File stage to extract or write data, or to act as an intermediate file in a job. The primary role of a Hashed File stage is as a reference table based on a single key field.

Each Hashed File stage can have any number of inputs or outputs. When you edit a Hashed File stage, the Hashed File Stage dialog box appears. This dialog box can have up to three pages (depending on whether there are inputs to and outputs from the stage):

  • Stage. Displays the name of the stage you are editing. This page has a General tab, where you can enter text to describe the purpose of the stage in the Description field and specify where the data files are by clicking one of the option buttons:
    • Use account name. If you choose this option, you must choose the name of the account from the Account name list. This list contains all the accounts defined in the Table Definitions > Hashed folder in the repository. If the account you want is not listed, you need to define a table definition. Alternatively, you can enter an account name or use a job parameter. For details about how to create a table definition, or how to define and use job parameters, see Making your jobs adaptable.
    • Use directory path. If you choose this option, you must specify a directory path containing the UV account. The directory must be a UniVerse account and is used for UniVerse accounts that do not appear in the UV.ACCOUNT file. If the hashed file is hosted locally by the InfoSphere® Information Server engine, you need to specify the IBM® InfoSphere DataStage® project directory as the directory path, for example, C:\IBM\InformationServer\Server\Projects\Dstage. The directory is specified in the Directory path field. You can enter a path directly, click Browse... to search the system for a suitable directory, or use a job parameter.
    • SQL NULL value. Determines what character represents the SQL null value in the hashed file corresponding to this stage. If your system will be using the Euro symbol, select the Special (allow Euro) option from the list. Select Auto detect to have InfoSphere DataStage determine what represents SQL null.
    • UniVerse Stage Compatibility. Select this check box to ensure that any job conversions will work correctly. With this option selected, the date or time will be represented in ISO format (depending on the Extended type) and numerics will be scaled according to the metadata. (The job conversion utility is a special standalone tool - it is not available in the Designer client.)
  • Inputs. This page is only displayed if you have an input link to this stage. Specifies the data file to use and the associated column definitions for each data input link. This page also specifies how data is written to the data file.
  • Outputs. This page is displayed only if you have an output link to this stage. Specifies the data file to use and the associated column definitions for each data output link.

Click OK to close this dialog box. Changes are saved when you save the job.

If a Hashed File stage references a hashed file that does not already exist, use the Director Validate Job feature before you run the job, and InfoSphere DataStage will create it for you. To validate a job, choose Job > Validate from the Director client. The Job Run Options dialog box appears. Click Validate.