Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejavascript
  pjs.define("prid", { type: "packed decimal", length: 5, decimals: 0, initValue: 105 });
 
pjs.define("prname", { type: "char", length: 30 });
  pjs.define("prdesc", { type: "char", length: 60 });

  pjs.connect("*LOCAL");
 
  var c1 = pjs.allocStmt();
  pjsc1.executeDirect(c1, "select prid, prname, prdesc from demolib/productsp order by prid");



if (SQLSTATE == '00000') {
    pjs.fetch(c1, prid, prname, prdesc);
 
  while (SQLSTATE == '00000'c1.hasMoreRows()) {
 
    //Do workProcess withfetched variablesdata here..
 
    pjs.fetch(c1, prid, prname, prdesc);
    }
 
}
  pjsc1.close(c1);


  pjs.disconnect();