× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Tue, 2010-04-20 at 10:47 -0700, Guillermo Payero wrote:
Hey guys,

this was probably discussed in an earlier topic, but I cannot find any reference about it.

I'm trying to program a small tool to FTP IFS files to other systems (we do this on an almost daily basis).
The program inserts line in an input file for a batch FTP session using STRQSH. The problem comes when I want to insert a line line this one

quote rcmd CRTDIR DIR('/dir1/dir2/dir3')
(directory tree depth is not know, and it is a variable)

STRQSH CMD('DB2 "INSERT INTO LIBRARY.FILE (FIELD) VALUES('CRTDIR DIR('/dir1/dir2/dir3'))"')

QSH reads the INSERT sentence from the first apostrophe to the one after DIR(, so it fails inserting the line.

Type two single quotes each place that you want a single quote within a
single-quoted literal. And, unless my eyes are crossing, you want to
close the quotation on the string within DIR(). Thus ...

ïSTRQSH CMD('DB2 "INSERT INTO LIBRARY.FILE (FIELD)
VALUES(''CRTDIR DIR(''''/dir1/dir2/dir3'''')'')"')

Kinda ugly, isn't it?

Cheers,
Terry.


Do you know an alternative way to do this?

Thanks in advance!

Regards






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.