CL for AS400 To FTP file To PC

17985 pts.
Tags:
AS/400
AS/400 FTP
CL programming
iseries v5r4
Hi Guys, I am just wondering if anyone of you know any CL that can be used to ftp from as400 to a pc.. The current issue that we have now is that a user will run the query, then i would like the CL/Script to actually ftp/transfer the file to a pc automatically. the file will be in an outq of the system. Not only that, the script will always be running and if anytime that the script detects the file in the outq, it will directly ftp the file to the pc straight away. if anyone have the script/cl,is it possible to share with me? thanks in advance

Software/Hardware used:
AS400 V5r4

Answer Wiki

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

Hi Tom,

it is actually transferring spool file to the pc in text format.

as for setting up the pc ftp site and etc, it is already done by me.

the pc is already in a secured area and only can be use by the 2 system administrators.

Jason

Discuss This Question: 12  Replies

 
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
  • TomLiotta
    ...the file will be in an outq of the system. Not only that, the script will always be running and if anytime that the script detects the file in the outq... FTP? From an "outq"? FTP doesn't transfer spooler entries. Those are printer files, not data files. Yes, you can more or less convert print lines into data file records; but why would you want to? Why not just transfer the data that was used to generate the report rather than processing the data to print a report that will be turned into data that will be FTPed? That's especially because you apparently need to include an *OUTQ monitor in the mix. It seems like you're taking a long way around what should be a direct process. And do you have a FTP server installed, configured and running on the PC? How has it been secured? Who starts it and maintains it? How will your CL know when the remote FTP server is available? Seems to me that it'd by much simpler just to use the CPY command to copy the data straight to the PC or to a shared drive that the PC maps to. Tom
    125,585 pointsBadges:
    report
  • Splat
    If you follow Tom's suggestion & FTP the data, you'll be making things easier on yourself. If you have a need to keep the output data segregated by occurrence, use a multiple member file to store the data, adding members as necessary. Using CPYSPLF to convert your output queue entry will require you have the identifying information for that entry (job, spool file, spool file number) if it's not from the same job.
    7,455 pointsBadges:
    report
  • tjgm88
    Hi Jason, I have a suite of programs which I developed to perform this task. To paste them all on this page would be too much. If you like and if acceptable please give your email and I shall respond. Gopal
    995 pointsBadges:
    report
  • jinteik
    Hi Tjgm88 my email is jinteik@gmail.com thanks in advance. really appreciate your help
    17,985 pointsBadges:
    report
  • TomLiotta
    ...suite of programs.. If a query provides the data, there might be no need for programs at all. The query might be encapsulated in a VIEW. A scheduled CPYTOIMPF command can then put the data wherever needed, e.g., on to whatever PC wants it. There already appears to be a program that has all of the necessary business logic no matter how complicated it might be. It might be cloned to write to a temporary file instead of detail print lines. (Or the existing program might have the temporary file added to it.) Why install a FTP server and do everything needed to maintain it ,and then in a "suite of programs" that may also need to be maintained, not to mention the controlling infrastructure to get it all to work with proper timing and authority, do the work that could be done with little more than a possible minor program change and a scheduled command? I have to admit I'm confused. Tom
    125,585 pointsBadges:
    report
  • DoneThat
    Hi Tjgm88 my email is garylavery@aol.com. Tom: One of the reasons this would be helpful is for an installation like mine. I have no compiler and the software is 3rd party. Runs well enough but everything I do is CL/SQL/MS Office VBA.
    830 pointsBadges:
    report
  • TomLiotta
    I have no compiler ... In that case, you will need to be sure that any "suite of programs" is (1) already compiled, (2) appropriate for your VRM, (3) allows external configuration to choose *OUTQs and jobs or spoolfile names and remote PC names and possibly user names, (4) doesn't require special user profiles or authorities, and (5) has documention on installation, configuration, startup, shutdown, scheduling, ownership, necessary PTFs, etc. What OS VRM are you running? Do you have Qshell installed? You might find that some simple CL plus the Qshell catsplf command works very nicely. Tom
    125,585 pointsBadges:
    report
  • tjgm88
    Hi DoneThat, Did you want me to forward the same I did to Jinteik?
    995 pointsBadges:
    report
  • Cathyli
    There is a efficient tool called Microsoft Online Services. It has benefits that access the latest technology, reduce on going IT costs, built-in security and reliability and supporting your business growth. Business solutions delivered on Microsoft Online Services and using it can increase productivity. More content click http://www.onlinesc.com or mail to Anna.li@onlinesc.com
    15 pointsBadges:
    report
  • Splat
    I'm thinking the 'response' from Cathyli is spam.
    7,455 pointsBadges:
    report
  • DoneThat
    Yes Tigm88 - please forward the programs to garylavery@aol.com Hi Tom: We are on V5R2. Runs well enough for what we do. You might find that some simple CL plus the Qshell catsplf command works very nicely. I have enough general programming skills to take a proposed solution and get it to work but developing a CL/Qshell solution from scratch is beyond my level (and my available time since all of that kind of work is off-hours). So I just take what's offered and see if I can apply it. If nothing else, I learn a little more with the effort.
    830 pointsBadges:
    report
  • TomLiotta
    We are on V5R2. Ouch. That even kills the useful Qshell catsplf utility that became available in V5R3. It could have been done with a single Qshell command in a basic CL program.. Note that this question is marked as Software/Hardware used: AS400 V5r4 Tom
    125,585 pointsBadges:
    report

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