Friday, June 5, 2015

Deploy a local COBOL/CICS program to TXSeries 7.1


Deploy a local COBOL/CICS (TXSeries 7.1) program

  1. From RDZ workspace, select *.ibmcob*, right click the selection and click Copy.
  2. In TXSeries CICS region, right-click in the bin folder and select Paste.
  3. The COBOL executables are copied to the CICS region.

Thursday, May 7, 2015

Compile Options



Property Group

A property group is a set of property values that you can define for local COBOL and PL/I projects or specific remote systems. Once a property group is created and configured, it can be shared among various systems and resources that you would like the properties to be applied to. 
  1. Edit a Property Group
    Right-click a project and select Property Group/Edit Associated Property Group

  2. Info tab 

  3. Categories tab

  4. COBOL tab

  5. Link tab

Local COBOL compile options




Local COBOL/CICS compile options


Local COBOL/CICS/DB2 compile options


References



References

Note:
You can install RDz 8.36 on Windows 7.
However, the COBOL/PL1 compiler will not install.
  1. IBM Information Center
  2. Rational Developer for System z  V8.0.3 Infocenter
  3. Rational Developer for System z Trial
  4. Topics on Version 7 of IBM Rational Developer for System z and IBM WebSphere Developer for System z

Tuesday, May 5, 2015

Compile and run a local COBOL/CICS App


We will be using a sample COBOL/CICS program provided by the tool (RDz).

Topics

  1. Select the sample COBOL/CICS program
  2. Set the appropriate compile options for TXSeries 7.1

Select the sample COBOL/CICS program

  1. Select File\New/Example
  2. Select Workstation\COBOL Sample with CICS and click Next.
  3. Enter the following information and click Finish.  When you click Finish, the COBOL source code is automatically compiled.
    - Project name - COBOLCICSLocal
    - Use default - check
    - COBOL CICS Sample Property Group - check

  4. Review the compiled listing and fix any errors if any.

Edit the associated Property Group tabs and set the following:

  1. Categories tab
  2. COBOL tab
    SYSLIB = C:\OPT\CICS\INCLUDE
    CICS Options
    Check the Checkbox
    CICS Options = CICSNT -lIBMCOB -adesvp
  3. Link tab
    Select DLL
    Link Options =
     /de c:\opt\cics\lib\cicsprIBMCOB.lib


Saturday, May 2, 2015

Compile and run a local COBOL App


What you will get

When you run this COBOL application, a window will prompt you to Enter a name or Q to quit.

Tools/Equipment used

  1. IBM Rational Developer for System z with Java V8.0.3
  2. Windows XP SP3
  3. Lenovo Thinkpad W530

Application Details

This application consists of two COBOL programs:
  1. StartApp COBOL program
  2. PrintApp COBOL program
The StartApp COBOL program source code

       Identification Division.
       Program-ID.  StartApp.

       Data Division.
       Working-Storage Section.

       01 Program-pass-fields.
          05 Temp-name         Pic x(30).

       01 Program-other-fields.
          05 Input-name         Pic x(30).
          05 Char-count         Pic 99 Value ZEROS.

       01 Program-flags.
          05 Loop-flag          Pic 9(01).
             88 Loop-done       Value 1.

       Procedure Division.

           Initialize Program-pass-fields
                      Program-other-fields
                      Program-flags.

           Perform until Loop-done
               Display " "
               Display "Enter a name or Q to quit:"
               Move Spaces to Input-name
               Accept Input-name
               IF Input-name = Spaces
                 Move "Q" to Input-name
               End-IF

               Move 1 to Char-count
               Inspect Input-name Tallying Char-count For Leading Spaces
               Move Input-name(Char-count: 30 - Char-count) to Temp-name

               If function upper-case (Temp-name) = "Q"
                     or Temp-name = Spaces
                  Set Loop-done to true
               Else
                  Call 'PrintApp' using Program-pass-fields
               End-if
           End-perform.

           Goback.              

The PrintApp COBOL program source code

       Identification Division.
       Program-ID.  PRINTAPP.

       Data Division.
       Working-Storage Section.
       01 Work-Parms.
          05 In-Len               PIC S9(4) BINARY.
          05 Char-count           Pic 99 Value ZEROS.
          05 Out-Name             PIC X(100).

          Linkage Section.
       01 Recvd-Parms.
          05 In-name         Pic x(30).


       Procedure Division using Recvd-Parms.
             Move spaces to Out-Name.

             Move 0 to Char-count
             Inspect Function Reverse(In-Name)
                Tallying Char-count For Leading Spaces
             Compute In-Len = 30 - Char-count

             Move "Thanks to " to Out-Name (1:10).
             Move In-name(1:In-Len) to Out-Name(11:In-Len)
             Move " for succeeding!" to Out-Name ((11 + In-Len):16).
             Display Out-name.
             Goback.                                                                      

Let's get started

We will be using IBM Rational Developer for System z with Java V8.0.3 to build, compile, and test this app.

We will be using a sample COBOL program provided by the tool (RDz).
  1. Select File\New/Example

  2. Select Workstation COBOL\COBOL Sample 1
  3. NOTE: COBOL Sample 1 contents
    COBOL Sample 1 contains 2 COBOL programs.  When an application consists of 2 or more COBOL programs, you have to nominate one of them as the entry point by clicking the desired program and selecting Nominate as entry point on the pop-up menu.

  4. Enter the following information and click Finish.  When you click Finish, the COBOL source code is automatically compiled.
    - Project name - localCOBOL
    - Use default - check
    - COBOL Sample Property Group - check

  5. Test the compiled COBOL program by selecting StartApp.exe and double-clicking it.


  6. Enter a name or Q to quit and hit Enter key.