How to create CL file from Java class

25 pts.
Tags:
CL
DB2/400
Java classes
i m creating a .sh file on the fly from my java code to perform db2 export operation in the code given below. Can I do the same in as/400 to create a cl file on the fly . path = new File(batchfilepath+".sh"); path.delete(); path.createNewFile(); String exitString = "No"; PrintWriter print = new PrintWriter(new FileWriter(path)); print.println("echo file created"); print.println("db2 CONNECT TO "+database+" USER "+user+ " USING "+pwd); print.println("echo done with connection"); print.println("db2 EXPORT TO " + putfile + " OF DEL " + methodN + " MESSAGES " + msgfile + subModule + " " + exportString); print.println("db2 disconnect "+database); print.println("chmod a+r "+putfile); if(exitString.equalsIgnoreCase("yes")) print.println("exit"); print.close();

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can create a CL file and then compile the file if you wish. But you won’t get it to do the same thing.

First, CL doesn’t support SQL, so creating a CP program isn’t what you want to do. Second, EXPORT isn’t a supported SQL statement on the platform, so EXPORT possibly isn’t what you want to do.

Please describe what you want to accomplish.

Tom

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following