?
Solved

call a AS/400 CL within a VB

Posted on 2003-03-14
3
Medium Priority
?
748 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month8 days, 22 hours left to enroll

764 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