Michael_Coxson_5769

Verifying queue and folder exist in JCL

Discussion created by Michael_Coxson_5769 on May 9, 2016
Latest reply on May 9, 2016 by Michael_Coxson_5769
As a function of creating a script to automatically generate a job and associated schedule I would like to build in checks to ensure that the user-defined queue and folder to create the job in exist prior to start.  I cannot seem to locate JCL that can test for this.  For the folder check I could hodgepodge a test object move with MOVE_OBJECT and check for the 20567 return code (removing the object from the folder afterward if it returns a 0), but I cannot find a way to test for whether a queue exists.  The GET_UC_SETTING command can confirm if a queue *does* exist, but the job aborts if a queue name is passed that does not exist.

Is there a more elegant way to test for these within JCL?

Outcomes