demoapp

About This Space

Demo application for Profound.js


Last updated on July 17, 2024

Public Permissions:   View   Run   Comment  

Profound.js Example Application

Before setting up the Node.js modules on IBM i, we suggest you try setting up and running this application from your own machine first.

References

Setup

Follow these instructions after you have cloned the repository.

ILE setup

You will need to copy both ILE/INQ05R.rpgle and ILE/INQ05D.dspf into a source-physical file on IBM i:

> CRTSRCPF FILE(YOURAPP/QRPGLESRC) RCDLEN(112)
> CRTSRCPF FILE(YOURAPP/QDDSSRC) RCDLEN(112)

> CPYFRMSTMF FROMSTMF('ILE/INQ05R.rpgle') TOMBR('/QSYS.lib/YOURAPP.lib/QRPGLESRC.file/INQ05R.mbr') MBROPT(*ADD)
> CPYFRMSTMF FROMSTMF('ILE/INQ05D.dspf') TOMBR('/QSYS.lib/YOURAPP.lib/QRPGLESRC.file/INQ05D.mbr') MBROPT(*ADD)

You must also create the tables used by the programs in this example on IBM i:

> RUNSQLSTM SRCSTMF('ILE/productsp.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/products1l.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/products2l.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/prodfeatp.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/featuresp.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/categp.sql') COMMIT(*NONE) NAMING(*SQL)
> RUNSQLSTM SRCSTMF('ILE/orders.sql') COMMIT(*NONE) NAMING(*SQL)

Next, you must

  1. compile the Rich Display file (INQ05D) from the Profound UI Designer.
  2. compile the RPG program (INQ05R) using CRTBNDRPG PGM(YOURAPP/INQ05R) SRCFILE(YOURAPP/QRPGLESRC). For debugging reasons, you could also use the OPTION(*EVENTF) DBGVIEW(*SOURCE) parameters.
  3. create the proxy object for the PRODDSP Node.js module using CRTPJSPRXY PGM(YOURAPP/PRODDSP)

Node.js setup

Before you start the Profound.js server, you need to install all the package dependancies.

  1. cd c:\pjsinstall - change this depending on where you install Profound.js
  2. npm install - this will fetch all the required packages.
  3. node updatepui - this will download a copy of the htdocs for you.

Running the application

If you're running Profound.js on your own machine that is not IBM i, you must use the PJSMYIP command to point all Profound.js requests to your local machine.

  1. Start your Profound.js server (If you're running on your own machine: node start)
  2. From Genie: CALL INQ05R
  3. This program, INQ05R, is the RPG application that calls PRODDSP.
  4. When selecting on a product from the list on the left of the display, it will call PRODDSP which is the Node.js application.

Be the first to comment:      

Comments

Write Preview Markdown: bold italic code link
Post

More Spaces By sihyeon (@sihyeon)

Filters:

Popular Recent

4

test4

185

0

0

Rich Display application

175

0

0

tefasdf/a

171

0

0

self

167

0

0

simple crud

169

0

0

test version

174

0

0

test2

201

0

0

erer

173

0

0

TESTING

189

0

0

rs

179

0

0

Voting application

171

0

0