Skip to content

Instantly share code, notes, and snippets.

View Faq400Git's full-sized avatar

Roberto De Pedrini Faq400 Faq400Git

View GitHub Profile
//------------------------------
// 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 February 4, 2022 22:12
ILE RPG - Spawn and PASE test
* --------------------------------------------
* 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
-- Google Translator (API Key [email protected])
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 April 13, 2020 15:44
The Game Of Life - SQLRPGLE and 5250 John Conway's Tribute
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 March 20, 2020 22:49
DATA-INTO - JSON MultiObject with 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 March 13, 2020 10:59
Simple AUDIT trigger SQL DB2 FOR i
-------------------------------------------------------------
-- 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 April 26, 2020 12:03
Get Euro Exchange Rates from ECB/BCE WebService
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 February 16, 2020 16:01
Passing parameters to a Node.js application with parameters
// 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>");
});