I run into some trouble when generating PUT Statements, because some of our member names contains special characters like $ and #. The $ always leads to variable substitution in cozsftp - even in single quotes.
Normally a single qoute preserves the given string - no variable substitution by the shell:
Using CozBatch just try
STDIN:
Code: Select all
//STEP04 EXEC COZBATCH
//STDIN DD *
echo PUT Member: $abc#ABC
echo 'PUT Member: $abc#ABC'
Code: Select all
PUT Member: #ABC
PUT Member: $abc#ABC
Using cozsftp this approach doesn't work!
STDIN:
Code: Select all
//STEP04 EXEC COZBATCH
//STDIN DD *
coz_bin="/opt/coz/bin"
remoteuser="myuser"
server="myserver"
$coz_bin/cozsftp -b- $remoteuser§$server<<EOB
put '//HLQ.MYPDS($abc#ABC)' '$abc#ABC'
quit
EOB
Code: Select all
cozsftp> put '//HLQ.MYPDS(#ABC)' '#ABC'
By the way: The code pages are set correctly, because the content is transfered and converted corretly to the target machine.
So, how can I handle theses special names correctly? Any help is welcome!