/** * \brief List jobs example 2 * * This example shows how to list all queued jobs of the current user. * * Filter criteria: * * *

* * * \author Mihael Schmidt * \date 18.04.2009 */ H dftactgrp(*no) actgrp(*caller) H bnddir('MY_BND_DIR') *------------------------------------------------------------------------- * Prototypes *------------------------------------------------------------------------- /copy LLIST_H /copy LUTIL_H *------------------------------------------------------------------------- * Variables *------------------------------------------------------------------------- D qualJobName DS likeds(tmpl_qualifiedJobName) inz D list S * D i S 10I 0 /free // list all active jobs of the current user qualJobName.jobName = '*ALL'; qualJobName.userName = '*CURRENT'; qualJobName.jobNumber = '*ALL'; list = lutil_listJobs(qualJobName : '*JOBQ'); // check if we have at least one job if (not list_isEmpty(list)); // iterate through the returned jobs. // the qualified job name is returned for i = 0 to list_size(list) -1; qualJobName = %str(list_get(list : i)); dsply qualJobName; endfor; else; dsply 'no jobs queued for the current user'; endif; // clean up list_dispose(list); *inlr = *on; return; /end-free