Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call AS/400 CL program from PC 1

Status
Not open for further replies.

bigfoot

Programmer
May 4, 1999
1,779
US
Is it possible to call an AS/400 Cl program from my PC thru ODBC?

I need to run an RPG program to create the data file before I read it.

Thanx
 
I'm not sure about OBDC, but I think you can run programs on the 400 using an FTP script run from the PC, and then transfer the file over to the PC:

Code:
open S1234567
user AS_400_USER
pass password
cd lib_400
lcd c:quote call pgm(parm1 parm2)
binary
get file (replace
quit


If the AS/400 file needs to be converted into another format, you can use the CPYTOIMPF command to convert it to a comma-delimited file in the IFS and then transfer it from the IFS to your PC.



"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
The advantage of using FTP is that you can do that with any Windows PC (Client Access not required). I use Rumba. I have found FTP the easiest (and fastest) way to transfer files.


"When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return."

--Leonardo da Vinci

 
My AS/400 does not have FTP set up on it, and my systems admin does not know how.
 
ftp won't work either. I need to know that the program completed.

The api does not seem to work either.


I tryed this approach. I am stumped. I need to run an rpg program to copy a file from the old system 36 format to a file with a dds spec on it, so I have to call it from the pc.

rndcmd won't work either because I never know when it's finished.
 
I tried the ftp example, but I can't seem to get it to work either. I set up the ftp ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top