Hi Guillermo,

Instead of using RCMD, why not simply use FTP's MKDIR command?

You have CL calling QShell calling SQL to write a record to a file. That seems overly complex to me. Why not use QShell to simply echo the command to the file? or if you struggle with echo, why not use rfile? SQL just seems overblown for this.

Or use a real programming language instead of CL so you can write directly to the FTP script?

Incidentally... the problem with your statement is that you don't have the quotes escaped properly. But you obviously already figured that out.


On 4/20/2010 12:47 PM, 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.

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.