
The os400 module have these functions.
Returns a Program object.
Name should be the name of the program (uppercase).
Lib is the library, the special value *LIBL is supported.
Parmeters should be a tuple of parameter descriptions.
There is a limit of 10 parameters.
Each parameter description shold be a tuple with the following fields:
Type(string), length(int), decimals(int, optional).
The following types are valid:
'c' String. ('c',20)
'i' Binary(Integer). ('i', 4) Length is here number of bytes (4/8).
'f' Float. ('f', 4) Length is here number of bytes (4/8).
'd' packed decimal ('d',5,0)
'z' Zoned decimal ('z',5,0)
The Program object has the following methodes:
resolve - Do a new resolve.
To see values after the call use indexing. (print mypgm1[0])
You can also set the parameters this way, but normaly you don't want to.
Here is an example:
getprice = os400.Program('GETPRICE','*LIBL',(('c',10),('d',9,0)))
getprice('PART_A',0)
price = getprice[1]