Preserving integrity of binary files

The Dependency Based Build Integration uses several preference and user build settings to ensure the integrity of EBCDIC-encoded binary files during transfer to the remote system for a user build operation. These settings offer several options for specifying characteristics of EBCDIC-encoded binary files. Learn how to set up Wazi Developer for Eclipse for successful transfer of binary files during a user build operation.

About this task

When tools such as Dependency Based Build and Engineering Workflow Management for z/OS copy source code between a host system and a local repository, the files must be converted from one character encoding to another. There are some situations in which characters do not map correctly between different character encodings. For example, when a new-line character is converted to a brand new line, transferred files would have additional empty records compared to the original file. Files that contain such non-roundtrippable characters are modified and marked as binary. For more information about these types of situations, see Managing non-roundtrippable characters in Migrating data sets to git.

To successfully transfer EBCDIC-encoded binary files to the remote system for a user build operation, the Dependency Based Build Integration needs the following information about the files:
  • The content type: text or binary.
  • The file encoding on the remote system.
  • The file record length.
The Dependency Based Build user build operation can obtain this information from several sources:
  • It can traverse a project to obtain file attribute information.
  • It can obtain file content type and encoding information from a Git attributes file that you specify in the user build configuration wizard or in the Team > Git > Remote Integration preferences page.
    Restriction: Record length information for binary files migrated by Dependency Based Build cannot be obtained from the Git attributes file. When Dependency Based Build migrates non-roundtrippable files, it removes the record length information from the files. This data must be provided manually so that the files can be edited inWazi Developer for Eclipse.
  • It can obtain default record length information for a file name pattern that is specified in the Team > Remote Integration preferences page.
  • It can obtain file attribute information from the file properties. These properties can be specified for each file, or inherited from the folder or project where the file is located.

Use the following procedure to set these options and learn how they work together to provide file attributes to the user build operation.

Procedure

To set up Wazi Developer for Eclipse to obtain file attribute information for user build file transfers:

  1. Set preferences that determine how the user build operation determines the record length of binary file transfers:
    1. Open the Preferences window and navigate to Team > Remote Integration.
      Remote Integration
    2. Use this table to define default record lengths for file name patterns on the local system. By default all local binary files have a record length of 80. Click the Add, Remove, Up, and Down buttons to edit and reorder the table rows.
    3. Select the Enable local file specification of attribute information option to enable local override of the default record lengths. When this option is enabled, you can use the Local Content Details page of the file Properties window to set the file content type (text or binary), the remote encoding, and the record length for binary files.
  2. To set persistent file transfer attributes for a local file on the Local Content Details page, right-click a file name and select Properties. Then, select Local Content Details from the navigation pane.
    For each attribute, you can use the default value, select a specific value (Other), or derive the value from one of these sources:
    • System Default: the file inherits its attributes from the system defaults.
    • Team Attribute: the content type and remote encoding are determined by the team attribute information, such as the information provided by Git or Enterprise Workflow Management.
    • File Type: the content type is determined by matching a file type defined on the Remote Systems > Files Preferences page.
    • Workspace Preference: This option applies to binary file record length only. When this option is selected, the binary file inherits its record length from the table on the Team > Remote Integration Preferences page.
    • Project Setting: This option applies to binary file record length only. When this option is selected, the binary file inherits its record length from the Local Content Details page of the project's Properties window. To navigate to this page, right-click a project, select Properties, and then select Local Content Details in the navigation pane.
    Local Content Details
  3. Set preferences that determine how the Git attributes file is composed for user build file transfers.
    This procedure determines how the Configure User Build Use project traversal to compose attributes option is implemented for a user build. Project traversal option
    1. Open the Preferences window and navigate to Team > Git > Remote Integration.Git Remote Integration
    2. In the Attributes file field, specify the name of the Git attributes file to be composed by project traversal.
    3. Optional: Select these options for processing the Git attributes file that is created:

      Enable scanning of attributes file for changes: When this option is selected, the product monitors the attributes file to detect changes to files and file encoding and content type information in the Git repository. When changes are detected, the product updates the persistent properties of the local files with these changes.

      Local encoding and content type attributes take precedence over scanned attributes: When this option is selected, any encoding and content type information that is specified on the Local Content Details page of the local file Properties window takes precedence over settings detected in the attributes file.
      Note: To specify local encoding and content type information on the Local Content Details page, you must enable the Team > Remote Integration > Enable local file specification of attribute information preference setting.
  4. To display the file attributes for transferred files when you configure a user build, select the Show file transfer information option in the Configure User Build wizard. For more information about this wizard, see Starting a user build.