Skip to content

Instantly share code, notes, and snippets.

View RainerRoss's full-sized avatar
🏠
Working from home

Rainer Ross RainerRoss

🏠
Working from home
  • Rainer Ross IT-Consulting
  • Munich, Germany
View GitHub Profile
@RainerRoss
RainerRoss / Send_Mail_with_Node.js
Last active August 27, 2022 12:17
Send_Mail_with_Node.js
//------------------------------------------------------------------------------//
// Node.js Modules // //
//------------------------------------------------------------------------------//
const nodemailer = require('nodemailer');
const http = require('http');
const port = 8080;
//------------------------------------------------------------------------------//
// Antwort des HTTP-Servers // //
@RainerRoss
RainerRoss / PTRARRAY.RPGLE
Created July 19, 2020 10:08
Code for the Array based on pointers in RPG AS400 powered by Sam John
ctl-opt dftactgrp(*no) main(main);
//------------------------------------------------------------------//
// Code for the Array based on pointers in RPG AS400 from Sam John //
// https://www.myeasyclasses.com/2020/07/ //
// code-for-array-based-on-pointers-in-rpg.html //
//------------------------------------------------------------------//
dcl-proc main;
dcl-s ArrayData char(10) dim(10) based(ptr1);
dcl-s ptr1 pointer;
@RainerRoss
RainerRoss / PRFHDL.RPGLE
Last active March 20, 2022 17:55
ProfileHandle
//------------------------------------------------------------------//
// QSYGETPH - Get Profile Handle //
//------------------------------------------------------------------//
dcl-pr getPrfHdl extpgm('QSYGETPH');
User like(GblUser) const; // User
Password like(GblPassword) const; // Password
Handle like(GblHandle); // Profilehandle
Apierr like(DsApierr) const; // API-Error
Pwdlen like(GblPwdlen) const; // Password-Length
@RainerRoss
RainerRoss / regex.rpgle
Last active March 20, 2022 18:09
regexForEmail
ctl-opt main(main) dftactgrp(*no) alloc(*teraspace);
//------------------------------------------------------------------//
// //
// Test - Regex - EMail //
// //
//----------------- //
// R.Ross 07.2020 * //
//------------------------------------------------------------------//
// Send Program Message //
//------------------------------------------------------------------//
ctl-opt dftactgrp(*no) alloc(*teraspace) option(*nodebugio:*nounref)
main(main) actgrp('MACHINE') bnddir('WEBSRVUTL');
//------------------------------------------------------------------//
// //
// Webservice Maschinen JSON-Format with JSON_ARRAYAGG //
// //
//----------------- //
// R.Ross 03.2019 * //
//------------------------------------------------------------------//
// Prototypes //
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Uploader mit Vorschau</title>
<link rel="stylesheet" href="http://cdn.webix.com/edge/webix.min.css">
<style>
.picture_selector .webix_image {
background-size: contain;
border: 1px solid #A4BED4;
ctl-opt dftactgrp(*no);
//------------------------------------------------------------------//
// //
// Einlesen einer CSV-Datei und Verarbeiten mit Split() //
// //
//----------------- //
// R.Ross 05.2019 * //
//------------------------------------------------------------------//
// SQL-Options //
//------------------------------------------------------------------//
SELECT my_cube.rate_time, my_cube.currency, my_cube.rate
FROM
XMLTABLE(
-------------- Declare Namespaces ----------------------
XMLNAMESPACES(
DEFAULT 'http://www.ecb.int/vocabulary/2002-08-01/eurofxref',
'http://www.gesmes.org/xml/2002-08-01' AS "gesmes"
),
-------------- Row Expression --------------------------
'gesmes:Envelope/Cube/Cube/Cube'
ctl-opt dftactgrp(*no) alloc(*teraspace) option(*nodebugio:*nounref)
main(main) actgrp('GETXML') bnddir('WEBSRVUTL');
//------------------------------------------------------------------//
// //
// Get XMLInput from HTTP-Server and send XMLOutput to HTTP-Server //
// //
//----------------- //
// R.Ross 09.2018 * //
//------------------------------------------------
ctl-opt dftactgrp(*no) actgrp('ADDME') pgminfo(*pcml:*module);
//------------------------------------------------------------------//
// SOAP-Webservice //
//------------------------------------------------------------------//
//------------------------------------------------------------------//
// Parameter //
//------------------------------------------------------------------//
dcl-pr addme;