ESP Workload Automation

Expand all | Collapse all

question on the new uss file trigger functionality

Steve Carrobis

Steve CarrobisMay 10, 2017 02:42 PM

Michael Bieganski

Michael BieganskiMay 10, 2017 03:20 PM

  • 1.  question on the new uss file trigger functionality

    Posted May 10, 2017 02:29 PM

    Hello forum folks,

    To anyone out there using the newly available uss type dstrig job types.

    I know it's not in any doc I've seen (so kinda know the answer already but gotta ask),

    Can you use wildcards with in the dsname doof-.txt USS  like you can with other types of dstrigs?

    (I cannot get that to fire)

    And most importantly, if a job ftp's to dsname doof.txt USS will that fire the trigger.

    (I could not get that to work either...and users ftping into our uss would be the most valuable)

    thanks,



  • 2.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 02:42 PM

    is this autosys ? 



  • 3.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 03:20 PM

    sorry I shoulda specified that, no...its esp v11.4



  • 4.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 03:54 PM

    Hi Mike, 

    The USS file trigger information is out on the DOCOPs site. Below is a link to the section on DATASET triggers.  

    DSTRIG Command: Define Event-Level Data Set Triggers - CA Workload Automation ESP Edition - 11.4 - CA Technologies Docum… 

     

    The doc updates for the USS enhancement can be found at the support.ca.com under ESP 11.4. Then scroll down to the enhancements section and the correct update.

     

    The manual specifically states that wildcards can be used. It mentions the statement below also.

    "The wildcard hyphen must not immediately follow the period separating the qualifiers."  

     

    Let me know if you still need me to try it out. 

     



  • 5.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 04:19 PM

    Hi Don, I only tried these new uss dstrigs at the appl level.

    Since I see no examples of uss jobs with wildcards, I'm wondering if the references to wildcarding in the doc you cite

    are for the other types of file triggers in that dstrig section, other than uss types.

    Can you  can get yours to work at the appl level?

    Can you confirm that if one is updating to path /usr/yada/dufus.txt via an ftp job, that the

    uss file trigger code can catch that as well?  (I ran ftp jobs that did put to dufus.txt and it just sat there.  thx

     

    DSTRIG USS.TEST
    /* wildcarding did not seem to work                   */
     DSNAME '/u/a#biega/do-.out' USS    /* wildcards nogo */
       RELEASE (xyz)
      RUN ANY
    ENDJOB

    nor did this work:

    DSTRIG USS.TEST
    /* wildcarding did not seem to work                 */
     DSNAME '/u/a#biega/do-.-' USS    /* wildcards nogo */
       RELEASE (xyz)
      RUN ANY
    ENDJOB



  • 6.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 04:37 PM

    Hi Mike, 

    In my case it did not work either. I did not use FTP to update the dataset since I thought that may affect the outcome. I got the same result. 



  • 7.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 04:50 PM

    that's a pity if wildcards are not legal for only these types of triggers.

    (also if one cannot update/create a file via ftp then that would remove about 75% of the usefulness for our guys.

    mostly users are sftp'ing files from unix boxes etc to the uss on the mainframe.  It would have been a very elegant way

    of signaling a uss file's activity if it would honor ftp as the updater via dstrig.

    alas...

     

    thanks for trying though Don! I greatly appreciate the effort. 



  • 8.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 04:58 PM

    Hi Mike

    In my test the USS file triggers work fine when updated by FTP.  It doesn't work if there are wildcards. 



  • 9.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 05:15 PM

    If I can get at least the ftp to work I'd be very happy with that.

    Can you send what/how you got ftp to work?

    Did it work at the event-dstrig level AND the appl dstrig level?

    This is what I tried that was unsuccessful: (appl level dstrig)

     

    JOB A#BIEGA8                                      
      DATASET 'A#BIEGA.FTP.CNTL'                      
      MEMBER PEC1JSS3                                 
      RUN ANY                                         
    ENDJOB                                            
                                                      
    the above job a#biega8 has these ftp cmds                   
    MODE B                                            
    TYPE E                                            
    GET '/u/u997mb0/dufus.txt'  +                     
      '/u/a#biega/dufus.txt' (R                       
    CLOSE                                             
    QUIT                                              
    Which did transfer the file aok  as the dufus.txt was updated

    but the dstrig just mocked me and didn't complete                   
                                                       
                                                      
    DSTRIG USS.TEST                                   
      DSNAME '/u/a#biega/dufus.txt' USS JOB(A#BIEGA8) 
      RUN ANY       

    RELEASE (A#BIEGA1)                                  
    ENDJOB                                            



  • 10.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 06:16 PM

    i WAS able to get the uss dstrig to work when defined at the event level after updating the uss file via an ftp batch job,

    (but still not able to get it to work at the appl level dstrig.)

     

    EVENT ID(A#XYZ.USSTEST2) SYSTEM(JSTM) REPLACE
    COM TRY AND FTP INTO DUFUS.TXT
    COM must do CAPS OFF on cmd line to keep path lowercase
    INVOKE 'TSGEN.JST03DA.PROC(JSTTEST)'
    DSTRIG /u/a#biega/dufus.txt USS

     

    the above worked.

     

    this didn't:

    DSTRIG USS.TEST                                   
      DSNAME '/u/a#biega/dufus.txt' USS JOB(A#BIEGA8) 
      RUN ANY       

    RELEASE (A#BIEGA1)                                  
    ENDJOB 

     

    .........half a loaf!!



  • 11.  Re: question on the new uss file trigger functionality

    Posted May 10, 2017 06:22 PM

    I haven't messed with this yet. In my case I don't have the "JOB(A#BIEGA8) " statement. 

    DSNAME '/u/a#biega/dufus.txt' USS JOB(A#BIEGA8) 

     

    I am not updating the USS file with a "JOB" . 

     

     



  • 12.  Re: question on the new uss file trigger functionality

    Posted May 11, 2017 11:03 AM

    This is why my hair is gray....Now all the ftp updating jobs are working and causing the uss dstrig to fire, whether it's event level, appl level with or without job(a#biega)......I changed nothing!...no bounces of the ESP stcs, no ipls, no change to the esp procs....just what was sitting there idling yesterday is now working when I trigger them.

    I guess I should be happy, and I am kinda...but perplexed why none of the ftps were working yesterday.

     

    So, I'll leave this for now unless I find some other head-scratchers.  No wildcarding allowed apparently, but getting ftp to work (at least right now) is huge boost for us.

    Thanks for your help with this!



  • 13.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 06, 2024 09:15 AM

    Hello Mike,

    Did you find any way to include wildcard in the DSTRIG with USS file trigger?

    We want an event trigger that will trigger automatically if a file is placed in mainframe unix server. DSTRIG USS file trigger is working if the file name is static. When the file name dynamically changes with date in 3rd place, then the wildcard "-" doesnot work as you mentioned .

    Could you please let me know if you found any way?




  • 14.  RE: Re: question on the new uss file trigger functionality

    Broadcom Employee
    Posted Mar 06, 2024 09:49 AM

    Hi Chinnu,

    Unfortunately, the USS file name can't use wildcard. You may post an idea for future enhancement consideration.

    One possible workaround is to use the USS DSTRIG in ESP Proc, and use the composed date variable as part of the path on DSNAME.

    Hope this helps,

    Lucy





  • 15.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 07, 2024 11:54 AM
    Edited by Chinnu MNK Mar 07, 2024 12:02 PM

    Hi Lucy,

    Thank you for your reply.

    Could you please provide me few example esp proc with wildcard character in DSTRIG uss type trigger?

    And when I tried DSTRIG in esp proc,I found the event was not triggered when the file was placed in the USS path.

    Our requirement: when a file is placed in the zOS Unix server, our event should be triggered automatically(i.e) based on the file activity.Also, the file name will be like below example:

    Ex : A.b.c.Dddmmyy.file where the 4th qualifier will change with current date and the file should be triggered.When a file is placed directly in mainframe server we were able to achieve that.But as the file is placed in zOS Unix server, uss type DSTRIG supports only static file trigger.

    Thanks in advance.

    Chinnu.




  • 16.  RE: Re: question on the new uss file trigger functionality

    Broadcom Employee
    Posted Mar 07, 2024 12:17 PM
    Edited by Lucy Zhang Mar 07, 2024 12:18 PM

    Hi Chinnu,

    Sure, following is an example for your reference:
    APPL DSTRIG
    ............
    DSTRIG USSFILE                                                       
       RUN DAILY                              
       DSNAME /a/zhali13/t%ESPADD.est1  USS RENAME             
    ENDJOB                    

    Note:  variable %ESPADD will be resolved to the day when the event is triggered when the application is created.

    And the event needs to be triggered BEFORE the USS activity occurs. For example, if the activity should occur after 1AM, then you can add below in the event, so that it will fire at 1AM:
    SCHEDULE 1AM DAILY

    Hope this helps,

    Lucy               




  • 17.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 11, 2024 12:53 PM

    Hi Lucy

    I tried the USS TRIG in application level and it is not working for me.

    I tried the below,

    APPL DSTRIGT WAIT

    INVOKE 'NAME'

    JCLLIB 'NAME'

    DSTRIG USS FILE

    RUN DALY

    DSNAME  /A/B/FILE.NAME USS

    RELEASE JOBA

    ENDJOB

    JOB JOBA

    RUN DAILY

    ENDJOB

    AND THE EVENT AS

    EVENT ID(NAME) SYSYTEM(NAME)

    SCHEDULE 01.00 DAILY

    INVOKE 'ESPPROC PDS NAME'

    Could you please let me know what is the mistake I am committing here.

    Thank you in advance.

    Regards

    Chinnu




  • 18.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 11, 2024 12:55 PM

    I tried this with a static file without wildcard and still the DSTRIG did not work as expected.

    But the DSTRIG is working fine for static file triggering at event level.




  • 19.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 11, 2024 04:28 PM

    Hi Lucy,

    I tried the USS DSTRIG in a ESP Proc and the file is not getting triggered.The DSTRIG is working fine with static file at Event level, but not working when defined at application level.

    I defined as below

    APPL DSTRIGT 

    INVOKE ' XXX.YYY.ZZZ'

    JCLLIB 'PDS.NAME'

    DSTRIG USS FILE

       DSNAME '/al/bl/file.txt USS

       RUN DAILY

       RELEASE JOBA

    JOB JOBA

       RUN DAILY 

    ENDJOB

    Event id(name)  system(name) replace

    Schedule 00.00 daily 

    Submit 'pds name'

    Could you please let me know the error I am doing here?

    I just tried without wildcard, and that too was not working.

    Thanks in advance.

    Regards,

    Chinnu.




  • 20.  RE: Re: question on the new uss file trigger functionality

    Broadcom Employee
    Posted Mar 11, 2024 05:30 PM

    Hi Chinnu,

    Firstly you should use INVOKE instead of SUBMIT in the event definition, like:
    INVOKE 'ESPPROC PDS NAME(PDSMEM)'

    Secondly the DSTRIG name should not have spaces, so:
    DSTRIG USS FILE

    Should be:
    DSTRIG USSFILE

    Please adjust as above, and run simulation and see if it has no errors.

    If it still doesn't work, you may open a support case to provide more related information.

    Hope this helps,

    Lucy




  • 21.  RE: Re: question on the new uss file trigger functionality

    Posted Mar 12, 2024 05:57 PM

    Hi Lucy,

    Thank you for your help.It worked and I was able to trigger the event.

    But I am having few questions,

    1. Can we trigger the DSTRIG only once.(i.e. if after the event ran at scheduled time and then the file got placed,the event would have completed) ...if in case 2 files will be placed on the same day.will it work.
    2. I tried with %ESPADD,it didnot work.Should I include the path in brackets in the DSNAME.
    3. If the event /the file can be triggered only once...is there a way to achieve multiple DSTRIG on the same day

    Your help is highly appreciated. 

    Thank you and regards

    Chinnu




  • 22.  RE: Re: question on the new uss file trigger functionality

    Broadcom Employee
    Posted Mar 14, 2024 05:04 PM

    Hi Chinnu,

    See my comments below:
    1. Can we trigger the DSTRIG only once.(i.e. if after the event ran at scheduled time and then the file got placed,the event would have completed) ...if in case 2 files will be placed on the same day.will it work.
    Answer: the event can be triggered multiple times, like every 1 hour or 5 minutes. 
    2. I tried with %ESPADD,it didnot work.Should I include the path in brackets in the DSNAME.
    Answer: I don't see how %ESPADD is used in your ESP Proc, you will need a '.' if there are chars after that, otherwise they will all be considered part of the variable name.
    3. If the event /the file can be triggered only once...is there a way to achieve multiple DSTRIG on the same day
    Answer: If the file match may occur multiple times and possibly concurrent. Another possible way is to make sure the file name is the SAME; and in ESP Proc, an agent wob can be added to rename it AFTER the event is triggered by the file activity. 

    It seems you need more help than just a direction. So I would suggest that you open a support case and work with us directly.

    Hope this helps,

    Lucy




  • 23.  RE: Re: question on the new uss file trigger functionality

    Broadcom Employee
    Posted Mar 06, 2024 09:53 AM

    Hi Mike,

    I got the chance to review the chain of this old post. 

    I wonder if the "bad" or "unsuccessful" FTPs were done to the wrong LPAR. 

    When I worked with another customer for a similar problem, they had the USS folder mounted to multiple LPARs. If the FTP was done to the LPAR where no ESP resides, then ESP wouldn't be able to detect the activity.

    Hope this may give you some hints. 

    Lucy