Skip to content

Instantly share code, notes, and snippets.

@chukShirley
Last active December 17, 2015 20:29
Show Gist options
  • Save chukShirley/d3b17685c5d586e7e0d9 to your computer and use it in GitHub Desktop.
Save chukShirley/d3b17685c5d586e7e0d9 to your computer and use it in GitHub Desktop.
Handling Integer Data Types
*************** Beginning of data *************************************
PGM PARM(&PED) //other params
DCL VAR(&PED) TYPE(*INT) LEN(4)
// other params
CALL PGM(SCRAPNEW/PLRFMLCRTR) PARM(&PED) //other params
ENDPGM
****************** End of data ****************************************
*************** Beginning of data *************************************
H Debug DatEdit(*MDY/) Option(*SrcStmt:*noDebugIO)
D peddler S 9B 0
C *entry plist
C parm peddler
/free
Exec sql
insert into scrapnew/pricing_formulas(peddler) values(:peddler);
*inlr = *on;
Return;
public function create($data)
{
// $data->peddler = 1234567
// Add parameters
$params = [
// Peddler ID
$this->toolkitService->AddParameterZoned(
'both', 7,0, 'peddlerId', 'peddlerId', $data->peddler
),
// ... other params ...
];
// Call program
$result = $this->toolkitService->PgmCall(
'PLRFMLCRTC', 'SCRAPNEW', $params, null, null
);
// ... error checking and return value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment