search cancel

How to use ESPFTFILE when it contains blanks?

book

Article ID: 54091

calendar_today

Updated On:

Products

Workload Automation Agent DSERIES- SERVER CA Workload Automation DE - System Agent (dSeries)

Issue/Introduction

Description:

A file trigger is storing a random file name in %ESPFTFILE. The problem is the next job, a text monitor, does not like the space in %ESPFTFILE. How can we get around it?

Solution:

Here is a workaround: use another variable to add the single quotes on both sides of %ESPFTFILE. See the example below:

TEXT_MON text1
   AGENT WIN_PROD
   FILENM = 'TEXT'   /* this is a value to avoid the error in generation phase */
   if ESP_APPL_PROC = 1 then -   /* ESP_APPL_PROC = 1 means it's Process phase when the TEXT_MON will be processed */
   FILENM = "'" + %ESPFTFILE + "'"   /* Add single quotes for %ESPFTFILE */
   TEXTFILE %FILENM
   TEXTSTRING GOOD
   SEARCHRANGE LINE FROM(1)
   RUN DAILY
ENDJOB
 

Environment

Release: WKLASA09300-6.1-ESP-Workload Automation-System Agent-for z/OS USS
Component: