Skip to content

Instantly share code, notes, and snippets.

View qpgmr-de's full-sized avatar

Daniel Gross qpgmr-de

View GitHub Profile
@qpgmr-de
qpgmr-de / PRINT.RPGLE
Last active May 6, 2020 19:13
IBM i full free ILE-RPG print procedure
dcl-proc print;
//--------------------------------------------
// usage:
// ...
// print('Message');
// ...
// /COPY PRINT
//--------------------------------------------
dcl-pi *N;
pMsg VarChar(5000) Const;
@qpgmr-de
qpgmr-de / CTLOPT.RPGLE
Created May 6, 2020 19:18
My personal full-free ILE-RPG control options
//---------------------------------------------------------
// usage:
// /COPY CTLOPT
// ...
//---------------------------------------------------------
ctl-opt Copyright('(C)2020 Daniel Gross, daniel@qpgmr.de');
ctl-opt CCSID(*CHAR:*JOBRUN);
ctl-opt Option(*SRCSTMT:*SHOWCPY:*NODEBUGIO:*NOUNREF);
ctl-opt DatFmt(*ISO) TIMFMT(*ISO);
ctl-opt PgmInfo(*PCML:*MODULE);
@qpgmr-de
qpgmr-de / JOBLOG.RPGLE
Last active May 6, 2020 20:17
IBM i full-free ILE-RPG joblog procedure
dcl-proc joblog;
//--------------------------------------------
// usage:
// ...
// joblog('message for the joblog');
// ...
// /COPY JOBLOG;
//--------------------------------------------
dcl-pi *N;
pMsg VarChar(250) Value;
conky.config = {
use_xft = true,
xftalpha = 0.1,
font = 'Sans:size=8',
own_window = true,
own_window_type = 'normal',
own_window_transparent = true,
own_window_hints = 'undecorated,below,sticky,skip_taskbar,skip_pager',
/******************************************************************************/
/* */
/* Command: CCEVENTF - EVFEVENT-File für RDi erzeugen */
/* */
/******************************************************************************/
CMD PROMPT('EVFEVENT-File für RDi erzeugen') +
ALLOW(*ALL) MODE(*ALL)
PARM KWD(ACTION) TYPE(*NAME) RSTD(*YES) DFT(*ALL) +
SPCVAL((*ALL) (*OPEN) (*WRITE) (*CLOSE)) MAX(1) +
@qpgmr-de
qpgmr-de / GETLASTSQL.SQLRPGLE
Created September 14, 2023 13:19
Retrieve the last SQL statement executed
**free
//**************************************************************
// Control options
//**************************************************************
ctl-opt dftactgrp(*no) actgrp(*new);
exec sql set option closqlcsr = *endmod;
exec sql set option commit = *none;
exec sql whenever not found continue;
exec sql whenever sqlwarning continue;
@qpgmr-de
qpgmr-de / slice.sql
Created September 15, 2023 16:23
SQL user defined tabler function to slice a string
create or replace function slice
(
input_string clob(1048576),
output_size int
)
returns table (
ordinal_position bigint,
element clob(1048576)
)