< Previous | Next >

Lesson 9: Adding build artifacts and associating them with language definitions

You are now ready to define the artifacts your new project requires. You will create a COBOL source file, and then a file that contains the bind instructions for the link-editor. You will also associate these resources with language definitions.

Procedure

  1. Select the COBOL folder, right-click it to show the menu, then click New > zFile.
  2. Specify HELLO.cbl as the zFile name.
  3. Select the COBOL language definition.
  4. Click Finish.
  5. Double-click HELLO.cbl.
  6. Enter the following in the source editor and click File > Save. You can cut and paste from the following example.
    Important: The first character should start on the eighth column.
           IDENTIFICATION DIVISION.
           PROGRAM-ID. HELLO.
           PROCEDURE DIVISION.
           MAIN.
               DISPLAY 'Hello, world.'.
               STOP RUN.
  7. Select the LINK folder, right-click it to show the menu, then select New > zFile.
  8. Specify HELLO.lnk as the zFile name.
    Important: When you create zFiles, attributes of the zFile are set based on the file extension. After you create the zFile, ensure that the file attribute Line delimiter is set to Platform. If Line delimiter is not set to Platform, the file is transferred to z/OS in UTF-8 format. UTF-8 format is not readable by the compilers or Binder.

    To check the file attributes, right-click the file and select Properties. Select the Jazz Source Control option; the Line Delimiter field is at the end of the Jazz Source Control page. If you change the value, check the file in and deliver the change.

  9. Select the LINKEDIT language definition.
  10. Click Finish.
  11. Double-click HELLO.lnk.
  12. Enter the following in the source editor and click File > Save. You can cut and paste from the following example.
    Important: The first character should start on the second column.
     INCLUDE SYSLIB(HELLO)
     NAME HELLO(R)
  13. Switch to the Work Items perspective.
  14. Open the Pending Changes view.
  15. Check in and deliver all changes.
< Previous | Next >

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki