DouglasDarbyshire604362

File Name from FileList might be getting a stray charchater

Discussion created by DouglasDarbyshire604362 on Nov 20, 2017
Latest reply on Nov 20, 2017 by Wolfgang_Brueckler_1288
I'm running the following code:
:SET &HND#=PREP_PROCESS_VAR(VARA.FILELIST.CKEX.1)
:PROCESS &HND#
:   SET &RET1# = GET_PROCESS_LINE(&HND#,,STR_SUB_VAR)
:   PRINT "&RET1#"
:ENDPROCESS
:SET &RET1# = STR_RTRIM(&RET1#)
:SET &RET1# = STR_TRIM(&RET1#)
:SET &PPAYPATH# = STR_CAT("\\SERVER\SERVERShare\PROD\History\Payments\", &RET1#)
:PRINT &PPAYPATH#
:SET &OUT1# = SEND_MAIL("ddarbyshire@ndbh.com","*TEST* NDBH Positive Pay File for &$PHYS_DATE_MM_DD_YY_s#","Attached is the NDBH Positive Pay file.","&PPAYPATH#")

The sendmail is sending the URL but not the physical file when I have seen this before there is a character in string that the sendmail does not like I either need to strip off any leading or following chars.  I've found some references on community to older scripts but I do not see files they reference in 12.0 version I'm using.  When I print string I get the following which is what I want.  
\\SERVER\SERVERShare\PROD\History\Payments\pay_20171120_233743Copy.txt

Outcomes