Accessing and updating data for iSeries Objects

A list object for a list of iSeries™ spool files is created. After setting the desired filter criteria, the list is opened. A parameter object is created which will be used to change the output priority for each spooled file in the list.

After storing the desired output priority value of "9" in the parameter object, a loop is entered. Each object in the list is examined in turn, and if a spooled file is found to have more than 10 pages then its output priority is changed.

In this example, all spooled files for device P3812 that have 10 or more pages have their output priority changed to 9 so that they will not print before smaller files.

Accessing and updating data for iSeries objects (Summary)

(R)  CWBSO_CreateListHandle      Create a list of iSeries objects

(O)  CWBSO_SetListFilter         Set list filter criteria

(R)  CWBSO_CreateErrorHandle     Create an error object

(R)  CWBSO_OpenList              Open the list (automatically starts
                                 a conversation with the iSeries server)

(O)  CWBSO_DisplayErrMsg         Display error message if error occurred

(R)  CWBSO_CreateParmObjHandle   Create a parameter object

(R)  CWBSO_SetParameter          Set new value for object attribute
                                 or attributes

(R)  CWBSO_WaitForObj            Wait until first object is available

. . . Loop through all objects
.
. (R)  CWBSO_GetObjHandle         Get an object from the list
.
. (R)  CWBSO_GetObjAttr           Read data for a particular attribute
.
. (R)  CWBSO_SetObjAttr           Update an attribute on the iSeries server
.
. (R)  CWBSO_DeleteObjHandle      Clean up object handle
.
. (R)  CWBSO_WaitForObj           Wait for next object in list
.
..............


(R)  CWBSO_DeleteParmObjHandle   Delete the parameter object

(O)  CWBSO_CloseList             Close the list

(R)  CWBSO_DeleteErrorHandle     Delete error object

(R)  CWBSO_DeleteListHandle      Delete list (automatically ends the
                                 iSeries conversation)
Note: By using the code examples, you agree to the terms of the Code license and disclaimer information.