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.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

Additional compile options

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

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