We have a Generic file trigger.
We want to capture the filename (without the directory) in a variable, to pass into another wob.
We can’t get the variable ‘ftrig’ to resolve correctly…
Pretty sure it is getting set correctly in the REXX, but not sure what we are doing wrong to move a variable between ESP REXX ESP
So if the file that causes the trigger is:
/home/cindy05/ftp_fileA.txt
In the cpy2xiq WOB, we would want ARGS to look like:
ARGS /home/cindy05/ftp_fileA.txt /home/cindy05/backup/ftp_fileA.txt.complete
FILE_TRIGGER TEST_CREATE
AGENT inbtlsap17
FILENAME '/home/cindy05/ftp_file*.txt' CREATE
RUN NOW
RELEASE REXXSET
ENDJOB
JOB REXXSET LINK PROCESS
REXXON PROC
xftrig = CLANGVAR('%ESPFTFILE')
xftrig = TRANSLATE(xftrig,' ','/')
wds = WORDS(xftrig)
xftrig = WORD(xftrig,wds)
"ftrig='"xftrig"'" /*allows ftrig to be used outside of rexx*/
REXXOFF
RELEASE (cpy2xiq)
ENDJOB
UNIX_JOB cpy2xiq
AGENT inbtlsap17
CMDNAME /bin/mv
ARGS %ESPFTFILE /home/cindy05/backup/%ftrig..complete
user cindy05
RUN NOW
ENDJOB
Any suggestions would be great. I’m sure it is something simple we have overlooked.
Thanks
Sal