IBM i - Stored Procedure Call using node-red-contrib-db2-for-i

Stored Procedure call with Db2 for i

The node-red-contrib-db2-for-i node can be used for CRUD tasks using SQL. Here is an example of Db2 for i stored procedure call using a DB2 connection.

[{"id":"df6859c.2512b28","type":"inject","z":"88859684.2bcc8","name":"","topic":"Problem Status flow","payload":"Start","payloadType":"str","repeat":"","crontab":"","once":true,"onceDelay":"30","x":194,"y":85,"wires":[["4dad43d2.743024"]]},{"id":"4dad43d2.743024","type":"delay","z":"88859684.2bcc8","name":"Variable Delay","pauseType":"delayv","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"2","randomLast":"5","randomUnits":"seconds","drop":true,"x":277,"y":311,"wires":[["ffedee0.6745a1","bb4289dd.65cec8"]]},{"id":"ffedee0.6745a1","type":"function","z":"88859684.2bcc8","name":"msg.delay","func":"msg.delay = global.get(\"config.IntervalProblem\") * 60000;\n\nreturn msg;","outputs":1,"noerr":0,"x":276,"y":195,"wires":[["4dad43d2.743024"]]},{"id":"bba2e0b3.24a8","type":"comment","z":"88859684.2bcc8","name":"Remplissage RAPPRB","info":"","x":597,"y":151,"wires":[]},{"id":"1a0e0278.e80d56","type":"DB2 for i","z":"88859684.2bcc8","mydb":"d2567926.af2768","name":"CALL Stored Procedure","arraymode":true,"x":827,"y":191,"wires":[[]]},{"id":"bb4289dd.65cec8","type":"function","z":"88859684.2bcc8","name":"Call ZRAPPRW","func":"var filepath = global.get(\"constant.DirectoryDB\") + \"Problem.json\"\nfilepath.replace(\"/\",\"\\ \");\nmsg.filename = filepath;\n\nvar cmd = {};\nmsg.payload_save = msg.payload;\n\nmsg.payload = \"Call EURO4PRG.ZRapPrWC('PRB')\";\n\nreturn msg;","outputs":1,"noerr":0,"x":577,"y":191,"wires":[["1a0e0278.e80d56"]]},{"id":"d2567926.af2768","type":"DB2 for i Config","z":"","cnnname":"127.0.0.1","db":"*LOCAL","keepalive":true}]

Flow Info

Created 5 years, 1 month ago
Rating: not yet rated

Owner

Actions

Rate:

Node Types

Core
  • comment (x1)
  • delay (x1)
  • function (x2)
  • inject (x1)
Other

Tags

  • ibmi
  • db2
  • db2fori
  • as/400
  • sql
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option