Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

call a AS/400 CL within a VB

Posted on 2003-03-14
3
Medium Priority
?
750 Views
Last Modified: 2008-02-01
I would like my VB program to execute an AS/400 CL.  The user will click on a command button that will call this CL.  This CL will copy a file to another file using CPYF. Our legency system is on AS/400.  
0
Comment
Question by:ocean123
3 Comments
 
LVL 1

Accepted Solution

by:
JH0401 earned 225 total points
ID: 8138607
I'm not sure, but this link might help.  Chapter 2 has a section on AS/400.  You can expand the chapter using the treeview on the left.  Good luck!
http://www.redbooks.ibm.com/redbooks/SG245183.html
0
 
LVL 2

Expert Comment

by:rzweifel
ID: 8138681
You can use ftp to call the CL program:

1) Create a file ftpfile.ftp:
open 10.1.1.1
USERNAME
PASSWORD
quote rcmd CALL PGM(MyLib/MyCLProgram)

Enter the correct IP address of you AS400 instead of 10.1.1.1 and a valid user name and password. MyLib is the AS400 library and MyCLProgram the name of the CL program to run.

2) Create a batch file that calls the ftp file above:
ftp -s:C:\ftpfile.ftp

Enter the correct path your your ftp file.

3) Call the above batch file from your VB program using a Shell command.

There may a nicer solution but I used this one before and it works.
0
 

Author Comment

by:ocean123
ID: 8301420
thanks for the help; I used ODBC for my connection
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question