
IBM i / AS400 COBOL CreateProgram
CertifiedCreate (compile) a COBOL program on IBM i
IBM i / AS400 COBOL CreateProgram
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.
type: io.kestra.plugin.cobol.CreateProgramExamples
Compile a COBOL program from a downloaded source
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
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
host *Requiredstring
IBM i hostname
The hostname or IP address of the IBM i (AS/400) system.
library *Requiredstring
IBM i library
The target library where the compiled program will be created (e.g., FINLIB).
password *Requiredstring
IBM i password
The password for the IBM i user profile.
program *Requiredstring
Program name
The name for the compiled program object (e.g., CALCINT).
user *Requiredstring
IBM i user profile
The user profile to authenticate with on the IBM i system.
compileOptions string
Additional compile options
Extra options to pass to CRTCBLPGM (e.g., DBGVIEW(*ALL)).
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
sourceInline string
Inline COBOL source code
The COBOL source code provided directly as a string. Either sourceInline or sourceUri must be provided, but not both.
sourceUri string
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.
Outputs
compileMessages array
Compile messages returned by the IBM i system
io.kestra.plugin.cobol.MessageOutput
IBM i message ID (e.g., CPF9801)
Message severity level
Message text
programPath string
IFS path of the created program object