Hi! Is there an API to run WRKJOBSCDE to outfile instead of to *PRINT.
Hi! Is there an API to run WRKJOBSCDE to outfile instead of to *PRINT.
Here's a link to the information you need. Search the books for WRKJOBSCDE API. http://publib.boulder.ibm.com/pubs/h...ne/v4r3eng.htm
Would suggest using the Work Management API List Job Schedule Entries (QWCLSCDE). Puts the entries into a user space. Very quick and easy to manipulate.
Another idea is to use the WRKJOBSCDE command with the output parm of *PRINT, then do a CPYSPLF command to copy the output to a file.
While WRKJOBSCDE OUTPUT(*PRINT) and CPYSPLF can sometimes get the job done, using this approach is not considered a formal programming interface that is necessarily maintained across releases (like is done for outfiles and APIs). Having the program access a printed report can introduce additional complexity such as the date format can change per run of report (CHGJOB DATFMT), the date separators can change per run (DATSEP), the time separators can change per run (TIMSEP), the column headings can change per run (different national languages in effect), the column locations can change per run (different national languages in effect or report format changes due to a new release or PTF), etc. Using the report approach is usually OK for one-time types of things; but can require rework when installing new releases, being used in a multi-national setting, etc.