Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 11 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

In order for your modules to accept the parameters, you will need to define the module to have input parameters. In addition, you would need to set the refParm property to the variables that are being passed in. 

An example is below: 

function myModule(parm1, parm2) {
	pjs.define("parm1", { type: "char", length: 20, refParm: parm1 });
    pjs.define("parm2", { type: "packed", length: 7, decimals: 2, refParm: parm2 });
     
    //Continue pjs logic here.
}


You will also need to export the parameters and their definitions when exporting your module: 

An example is below: 

module.exports.run = myModule;
module.exports.parms = [
	{ type: "char", length: 20 },
	{ type: "packed", length: 7, decimals:2 }
];


After defining your module with the above, you should be able to pass the parameters to your module from the PJSCALL command or on the calls to a proxy program. 


  • No labels