IBM i / AS400 COBOL CreateProgram

IBM i / AS400 COBOL CreateProgram

Certified

Create (compile) a COBOL program on IBM i

Uploads COBOL source to an IFS temporary file, then compiles using CRTCBLPGM via JTOpen CommandCall. Source can be provided inline or via a URI to a COBOL source file.

yaml
type: io.kestra.plugin.cobol.CreateProgram

Compile a COBOL program from a downloaded source

yaml
id: create_cobol
namespace: company.team

tasks:
  - id: download_source
    type: io.kestra.plugin.core.http.Download
    uri: https://repo.mybank.com/cobol/CALCINT.cbl

  - id: compile
    type: io.kestra.plugin.cobol.CreateProgram
    host: "{{ secret('IBM_HOST') }}"
    user: "{{ secret('IBM_USER') }}"
    password: "{{ secret('IBM_PASSWORD') }}"
    library: FINLIB
    program: CALCINT
    sourceUri: "{{ outputs.download_source.uri }}"

Compile a COBOL program from inline source

yaml
id: create_cobol_inline
namespace: company.team

tasks:
  - id: compile
    type: io.kestra.plugin.cobol.CreateProgram
    host: "{{ secret('IBM_HOST') }}"
    user: "{{ secret('IBM_USER') }}"
    password: "{{ secret('IBM_PASSWORD') }}"
    library: DEVLIB
    program: HELLO
    sourceInline: |
           IDENTIFICATION DIVISION.
           PROGRAM-ID. HELLO.
           PROCEDURE DIVISION.
               DISPLAY 'HELLO FROM KESTRA'.
               STOP RUN.
Properties

IBM i hostname

The hostname or IP address of the IBM i (AS/400) system.

IBM i library

The target library where the compiled program will be created (e.g., FINLIB).

IBM i password

The password for the IBM i user profile.

Program name

The name for the compiled program object (e.g., CALCINT).

IBM i user profile

The user profile to authenticate with on the IBM i system.

Additional compile options

Extra options to pass to CRTCBLPGM (e.g., DBGVIEW(*ALL)).

Reference (ref) of the pluginDefaults to apply to this task.

Inline COBOL source code

The COBOL source code provided directly as a string. Either sourceInline or sourceUri must be provided, but not both.

URI to a COBOL source file

A Kestra internal storage URI pointing to a COBOL source file. Use a preceding download task for remote sources. Either sourceUri or sourceInline must be provided, but not both.

Compile messages returned by the IBM i system

Definitions
idstring

IBM i message ID (e.g., CPF9801)

severityinteger

Message severity level

textstring

Message text

IFS path of the created program object