demoapp

About This Space

Demo application for Profound.js


Last updated on July 17, 2020

Public Permissions:   View   Open/Fork   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 drusso (@drusso)

Filters:

Popular Recent

Angular Application

107

0

0

This interactive app prompts the user for key fields to lookup a database record and displays the results

141

0

0

This is a full database maintenance CRUD application with view, change, add, and delete capabilities

262

0

0

Simple example of a real world business application

131

0

0

60

0

0

This workspace illustrates the basic setup of an HTML page that includes external JavaScript and CSS files

61

0

0

A demo of how to build and consume Web Services with and without parameters

230

0

0

A Hello World app with both dynamic output and input fields

71

0

0

Test file upload widget.

907

0

0