How to define USS file trigger
search cancel

How to define USS file trigger

book

Article ID: 39438

calendar_today

Updated On:

Products

ESP Workload Automation

Issue/Introduction

Steps to define USS file trigger in ESP.

Resolution

1. Ensure that SMF record 92 subtype 11 and subtype 14 are enabled on the ESP system.
2. Code the DSTRIG command (define event-level data set triggers). Use the operands for the USS file trigger.

Note: 

The USS file can be triggered after a file is closed after an update or renamed.  
The USS file trigger for renaming works only for USS File System paths with a maximum of 63 characters.
Type 92, subtype 11 records are generated when a USS file is closed after creation or after updating.  If a USS file is created, 
         but no bytes have been written, the SMF record is rejected and no triggering occurs. 
The folder to store the files can’t be /tmp/ directory, like /SYS1/tmp which is most likely mounted as TFS (D OMVS, F will show it). 
The temporary file system (TFS) is an in-memory physical file system that supports in-storage mountable file systems and is not written to DASD. 
       So in the SMF record field SMF92CBW, it shows no bytes being written. 
The command being issued to create/update/rename the files needs to specify the same path and file name with the same cases as on the DSTRIG/DSNAME. 
      Like:   ls –l >> /SYS1/usr/test 

Example:

EVENT ID(HLQ.PAYDLY) 
DSTRIG local/foo.sh USS 
INVOKE 'HLQ.ESP.PROCS(PAYDLY)' 
ENDDEF