An application that uses the iSeries™ Access for Windows® Remote Command/Distributed Program Call function uses objects.
Each of these objects are identified to the application through a handle:
There is not a separate object for commands. The command string is sent directly to the command request.
A command is a character string that is to be run on the iSeries system. Because it is a simple object (a character string) no additional object will need to be created in order to run a command. The command string simply is a parameter on the cwbRC_RunCmd API.
A program is a complex object that is created with the cwbRC_CreatePgm API, which requires the program name and the library name as parameters. The handle that is returned by this function can have 0 to 35 parameters associated with it. Parameters are added with the cwbRC_AddParm function. Parameters types can be input, output, or input/output. These parameters need to be in a format with which the iSeries program can work (that is, one for which no data transform or data conversion will occur). When all of the parameters have been added, the program handle is used with the cwbRC_CallPgm API on the command request object. The APIs that are associated with the program object are: