It is sometimes useful to select the rows to unload by determining if the rows exist in another table (for example, if you have a production application that identifies rows to be unloaded over the weekend for later transfer to a non-Db2 application).
Example
//SYSIN DD * UNLOAD DATA FORMAT(DSNTIAUL) UNLOADDN(SYSREC) SELECT * FROM BMC.PRODUCTION_TBL WHERE RECID IN (SELECT RECID FROM ROWS2UNLD)