Hi all...
I have a 4gl program which puts a value returned from a cursor in to an echo command string variable. When the string is "run", the value of "reg.home_phone" is supposed to be written into a text file. This code plays well other records, but there's a problem using it with this particular record. Here we go:
----------
let emailmessage6 = "echo ",reg.home_phone," >> /hr/addresschangetemp.txt"
run emailmessage6
----------
The problem is, the value returned in reg.home_phone is a phone number formatted like this: (909)555-9999. Looks like bash doesn't like the () chars because I get this error:
----------
bash: -c: line 1: syntax error near unexpected token '(909)'
bash: -c: line 1: `echo (909)555-9999 ' >> /hr/addresschangetemp.txt
----------
How can I protect the () chars? Also, there's no guarantee () will appear in every reg.home_phone record.
Thanks!!!
ixnay5
I have a 4gl program which puts a value returned from a cursor in to an echo command string variable. When the string is "run", the value of "reg.home_phone" is supposed to be written into a text file. This code plays well other records, but there's a problem using it with this particular record. Here we go:
----------
let emailmessage6 = "echo ",reg.home_phone," >> /hr/addresschangetemp.txt"
run emailmessage6
----------
The problem is, the value returned in reg.home_phone is a phone number formatted like this: (909)555-9999. Looks like bash doesn't like the () chars because I get this error:
----------
bash: -c: line 1: syntax error near unexpected token '(909)'
bash: -c: line 1: `echo (909)555-9999 ' >> /hr/addresschangetemp.txt
----------
How can I protect the () chars? Also, there's no guarantee () will appear in every reg.home_phone record.
Thanks!!!
ixnay5