Skip to content

Instantly share code, notes, and snippets.

Avatar

Roberto De Pedrini Faq400 Faq400Git

View GitHub Profile
View F4GETFLDS - Get Field Description (API QUSLFLD)
//------------------------------
// F4GETFLDS Get Field Description
// If you need fields info from a DSPF o PRTF
// you can't use QSYS2.SYSCOLUMNS view ... so
// this utility will create a FAQ400.IVDDALLF0F table
// with fields info from a file (table, index,
// dspf or prtf)
// References:
// http://www.think400.dk/apier_9.htm#eks0007
// https://www.mcpressonline.com/programming/apis/
@Faq400Git
Faq400Git / SPAWNTST1_RPGLE.TXT
Last active Feb 4, 2022
ILE RPG - Spawn and PASE test
View SPAWNTST1_RPGLE.TXT
* --------------------------------------------
* SPAWNTST1 Testing Scott Klement SPAWNPASE
* running some simple command and
* scripts in QP2SHELL environment
+
* Original code from Scott Klement (SPAWNPASE)
*
*
*
* This demonstrates connecting pipes to a spawned job, and
View Google Translator API and DB2 for i HTTP_POST HTTPPOSTCLOB.sql
-- Google Translator (API Key Roberto.depedrini@faq400.com)
create variable faq400.GV_GoogleAPIKey varchar(100) default('xxxxxxxxxxxxxxx'); -- YOUR API KEY Here!
create variable faq400.GV_URL varchar(256);
create variable faq400.GV_HEADER varchar(1000);
create variable faq400.GV_HEADERJSON varchar(1000);
create variable faq400.GV_BODY varchar(32000);
-- A simple Word table
drop table qtemp.FruitNames;
@Faq400Git
Faq400Git / GAMEOFLF_DSPF
Created Apr 13, 2020
The Game Of Life - SQLRPGLE and 5250 John Conway's Tribute
View GAMEOFLF_DSPF
A*%%TS SD 20200413 144425 FAQ400 REL-V7R2M0 5770-WDS
A* Surce preso da esempio
A* http://www.rpgpgm.com/2016/05/example-subfile-program-using-modern-rpg.h
A*%%EC
A DSPSIZ(27 132 *DS4)
A CHGINPDFT(HI CS)
A PRINT
A INDARA
A CA03(03 'F3=Exit')
A R DUMMY
@Faq400Git
Faq400Git / Data-Into-Multi-Objcets-Arrays
Created Mar 20, 2020
DATA-INTO - JSON MultiObject with Arrays
View Data-Into-Multi-Objcets-Arrays
-----------------------------------------------------------------------------------------------------------------------------------
Thist Gist is part of iJSON-FAQ-007: Data-Into-Multi-Object-Arrays (https://blog.faq400.com/it/programmazione/json-ibmi-faq-howto/)
-----------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------
JSON Example with Multi Objects and Arrays
-------------------------------------------
{
"success": true,
"header": null,
@Faq400Git
Faq400Git / gist:b8b5fe283ffa993940115137da33e745
Created Mar 13, 2020
Simple AUDIT trigger SQL DB2 FOR i
View gist:b8b5fe283ffa993940115137da33e745
-------------------------------------------------------------
-- THIS MATERIAL IS PART OF MY POST BLOG
-------------------------------------------------------------
--------------------------------
-- FIRST CREATE AN AUDIT TABLE
---------------------------------
CREATE OR REPLACE TABLE sampledb.Employee_AuditLog (
MYKEY VARCHAR(300),
EVENT CHAR(1),
@Faq400Git
Faq400Git / gist:72431bdeb7998b081cce3b29cb0fe89a
Last active Apr 26, 2020
Get Euro Exchange Rates from ECB/BCE WebService
View gist:72431bdeb7998b081cce3b29cb0fe89a
ctl-opt dftactgrp(*no) ;
//-----------------------------------------------------------------------*
// TS_BCE: Get Exchange Rate from ECB/BCE Web Service
// This source is part of Faq400 Blog's post
// https://blog.faq400.com/it/?p=2648
//-----------------------------------------------------------------------*
dcl-pr qCmdExc ExtPgm('QCMDEXC');
@Faq400Git
Faq400Git / testparm.js
Created Feb 16, 2020
Passing parameters to a Node.js application with parameters
View testparm.js
// Load the http module to create an http server.
var httpServer = require('http');
// Configure our HTTP server to respond with Hello World to all requests.
var server = httpServer.createServer(function (request, response) {
response.writeHead(200, {"Content-Type": "text/html"});
response.write("<h1>Node.js testing parms</h1>");
response.write("<UL>");
process.argv.forEach(function (val, index, array) {
response.write("<LI>Parameter Number "+ index + ' value ' + val+ "</LI>");
});