SESSION:

Just found this little gem.  In the WHERE condition of a CMS query, the “SESSION:” tag  references the current user connection.  So, to get the Connection object for the current session, use:

select *
  from ci_systemobjects
 where si_id = session:si_id

Continue reading

IProgramBaseEx

I just discovered IProgramBaseEx.  It is similar to IProgramBase but includes a reference to the IInfoObject of the active program object instance.  With this, you can get the current instance name, scheduling info, and other instance data.  You can also update the instance in real time to add the SI_PROGRAM_CAN_FAIL_JOB property, which can be used to get program objects to fail (on purpose).

Easier maintenance of Program Objects

Program Objects are very useful, but a PItA to maintain in the CMS.  For some reason, there is no option in the CMC to enable updating a program object’s source file once it is added to the CMS.  Updating the program requires navigating to the file’s location in the FRS and manually replacing the file.  If the FRS is locked down (as it should be), then updating becomes even more difficult. Continue reading