ESP Workload Automation

Expand all | Collapse all

Wildcard on Dataset Trigger

  • 1.  Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:32 AM

    I need to setup dataset triggers using wildcards and I've tried using the "*" and it does not pick up the file, tried the '-' and same result. Here is an example of the filenames.

     

    E190.FCH.PICL.SIT.S0.D082418.E5020.DAT

    E190.FCH.PICL.SIT.S0.D082418.E5020.TBL

    E190.FCH.PICL.SIT.S0.D082418.E5020.INF

    E190.FCH.PICL.SIT.S0.D082418.E5020.EOT

     

    The 6th and 7th qualifier can change, I've tried DSNAME 'E190.FCH.PICL.SIT.S0.*.*.EOT' ANYCLOSE and it does not pick up the file but I can put in the entire dataset name like E190.FCH.PICL.SIT.S0.D082418.E5020.EOT and it works.

     

    Any ideas on how to wilcard this?

     

    Thanks,

    Sharon



  • 2.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:41 AM

    If the files are being copied with FTP you need to add the FTP to the DSTRIG statement

     

    DSTRIG E190.FCH.PICL.SIT.S0.D082418.E5020.DAT FTP(RECEIVE)

     

    If it is FTP make sure that the SMF record type is correct.

     

     

    Since we do not use the default we added the following in the ESP WARM file

     

    FTP SMF(<FTP SMF Record Type) 



  • 3.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:43 AM
      |   view attached

    This is not FTP. The file is picked if we specify the entire filename with no issues, it’s only trying to wildcard as the 6th & 7th qualifier can change.



  • 4.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:52 AM

    Have you tried enclosing in single quotes/tick marks?

     

    DSTRIG 'E190.FCH.PICL.SIT.S0.D082418.E5020.-' ANYCLOSE



  • 5.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:55 AM
      |   view attached

    The problem is with the 6th and 7th qualifier, those are the ones that will change, D082418 and E5020.



  • 6.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:53 AM

    Hi Sharon, 

    I have not tested this. 

    The example you gave shows 

    DSNAME 'E190.FCH.PICL.SIT.S0.*.*.EOT' ANYCLOSE

     

    The asterisk is only one character. I think it would look like this

    DSNAME 'E190.FCH.PICL.SIT.S0.******.*****.EOT' ANYCLOSE

     

    I am not sure on the " - " dash...

     

    Just a thought... 



  • 7.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 10:57 AM
      |   view attached

    I tried that also but it doesn’t like that on a simulation.

     

    ==>ESP906E INVALID DATA SET NAME, 'E190.FCH.PICL.SIT.S0.*****.****.EOT'

    ==>ESP1800I ABOVE ERROR OCCURRED ON FOLLOWING STATEMENT IN JOB CPCSPICL

    ==>ESP1007I DSNAME 'E190.FCH.PICL.SIT.S0.*****.****.EOT' ANYCLOSE



  • 8.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 11:09 AM

    When I put it at the event level I get this error. 

    DSTRIG 'POWD03.*.PRINT5' ANYCLOSE
    ESP2978E Asterisk not allowed in dataset name for DSTRIG



  • 9.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 11:18 AM
      |   view attached

    It seems it does not like the wildcard on either the event level or the job level and we have a requirement for this as basically depending on which file is created we run different jobs. Example below.

     

    E320.FCH.PICL.SIT.S0...DAT runs CD0320B5

    E320.FCH.PICL.SIT.S0...TBL runs CD0320B6

    E320.FCH.PICL.SIT.S0...INF runs CD0320B7

    E320.FCH.PICL.SIT.S0...EOT runs CD0320B8



  • 10.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 11:29 AM

    If I use the statement below at the Event level it works in my environment.

     

    I use hyphen for any value for the last node.

     

    DSTRIG 'E190.FCH.PICL.SIT.S0.D082418.E5020.-' ANYCLOSE 

     

    ESP Job Output
    11.24.14 FRI 24AUG18 ESP6070I DSTRIG:  EVENT SCHTESP.DSTRIGT TRIGGERED BY DATA SET E190.FCH.PICL.SIT.S0.D082418.E5020.DAT, JOB PCS1RJR



  • 11.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 11:32 AM
      |   view attached

    The last node is not the issue, it’s the 6th and 7th node that we need to wildcard.

     

    Thank you,

    Sharon



  • 12.  Re: Wildcard on Dataset Trigger
    Best Answer

    Posted Aug 24, 2018 12:42 PM

    Obviously reading and counting are not my strong suit.

     

    The Hyphen as the wildcard has to be at the end of the DSNAME.

     

    The following should work for you:

     

    DSTRIG 'E190.FCH.PICL.SIT.S0.-' ANYCLOSE   /* Hyphen at the end */

     

    But that will trigger off of more that what you want so you would need to add code to eliminate the unwanted data sets.

     

    We try to recommend that the differences in Data Set name should be as close to the end as possible to prevent these type of issues.

     

    Something like this (untested) may work for you, add this to what the Event invokes.

     

    RunCD0320B5 = 'JAN0180'      /* Initializde to past date           */
    RunCD0320B6 = 'JAN0180'      /* Initializde to past date           */
    RunCD0320B7 = 'JAN0180'      /* Initializde to past date           */
    RunCD0320B8 = 'JAN0180'      /* Initializde to past date           */


    REXXON
    /* ESP Variable substring notation %symbolic(start_pos:end_pos)     */
    /* The value to key off of starts in position 36 for 3              */

    LastNode = %ESPTRDSN(36:38)     
    SELECT                          
    WHEN LastNode = "DAT" THEN DO RunCD0320B5="'ANYDAY'"
    WHEN LastNode = "TBL" THEN DO RunCD0320B6="'ANYDAY'"
    WHEN LastNode = "INF" THEN DO RunCD0320B7="'ANYDAY'"
    WHEN LastNode = "EOT" THEN DO RunCD0320B8="'ANYDAY'"
    OTHERWISE NOP
    REXXOFF

    JOB CD0320B5
    .
    .
    RUN %RunCD0320B5

    ENDJOB

    JOB CD0320B6
    .
    .
    RUN %RunCD0320B6
    ENDJOB

    JOB CD0320B7
    .
    .
    RUN %RunCD0320B7
    ENDJOB

    JOB CD0320B8
    .
    .
    RUN %RunCD0320B8
    ENDJOB



  • 13.  Re: Wildcard on Dataset Trigger

    Posted Aug 24, 2018 12:48 PM
      |   view attached

    I do appreciate your help, I’ll look this over and see what I can get to work, I was hoping you could just wild card this but I’m not thinking you can in this case.

     

    Thanks,

    Sharon