One of the most powerful features of Toolkit list handling is the Execute List function (YEXCOBJLST, YEXCDBFLST and YEXCMBRLST commands). These functions will execute on a nominated list of items any request string (including PDM user options) that you specify. You may indicate where in the request string you wish the names of the list items to be inserted. For example, to print the contents of all data areas in a library:
YBLDOBJLST OBJ(FRED/*ALL) OBJTYPE(*DTAARA)/* build list */ YEXCOBJLST RQSDTA(‘DSPDTAARA(&L/&O) OUTPUT(*PRINT)’) /* use it*/
In other words if the list FRED contained the qualified names of three data areas, XX/AA, YY/BB and ZZ/CC, then invoking the YEXCOBJLST command would be equivalent to specifying the following three commands:
DSPDTAARA DTAARA(XX/AA) OUTPUT(*PRINT) DSPDTAARA DTAARA(YY/BB) OUTPUT(*PRINT) DSPDTAARA DTAARA(ZZ/CC) OUTPUT(*PRINT)
By using the Toolkit Execute List functions, commands that are not generic can be made generic, and generic commands can be made to work on lists of items. See the respective command diagrams for further details.
|
Copyright © 2014 CA.
All rights reserved.
|
|