View previous topic :: View next topic
|
Author |
Message |
pritamdebnath
New User
Joined: 01 Dec 2006 Posts: 5 Location: Houston, TX
|
|
|
|
Hi,
Is there a way/sample code to ftp a file directly via a CICS COBOL program? I do not want to create a batch job which, in turns, ftps the file. I need it to be done directly from CICS.
Thanks,
Pritam |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
I do not want to create a batch job which, in turns, ftps the file. I need it to be done directly from CICS. |
WHY ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Before you even begin to try to implement, make sure that this is permissable on your system.
Quote: |
I need it to be done directly from CICS. |
Why do you believe this is a "need" rather than a "want"? User requirements should dictate "need" - not programmer preference. . .
As long as the required action happens, the user will be happy. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The easiest way is to submit a batch job. CICS does not have any application programming interface for FTP.
You may -- but I haven't confirmed this -- be able to write Java code to invoke FTP in your CICS region. If your site does not have Java installed in your CICS regions, that would obviously be a requirement that would rule out this possibility.
There might be vendor products on the market to do this -- I haven't done any research so I wouldn't know one way or the other. If there are, your site may have to spend some tens of thousands of dollars on such a product, depending upon the vendor.
Your only other option is to study the RFC documents on FTP and write your own CICS sockets interface to FTP to establish the control and data connections, transfer the data, handle the responses, and close out the connections. This requires a LOT of work but a skilled CICS programmer could probably get it done in a couple of months; an unskilled CICS programmer could take much, much longer. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
I am sure the team responsible for CICS performance would love this. |
|
Back to top |
|
|
pritamdebnath
New User
Joined: 01 Dec 2006 Posts: 5 Location: Houston, TX
|
|
|
|
Thanks for all the replies.
To answer the question of "need" vs "want" - It is the user's requirement to ftp a file from CICS. Actually we (the application team) even considered the option of an email using TCPSMTP .... but the user wants an ftp.
Also currently our system is really overloaded with large volume of data and hence batch jobs are frequently not getting enough CPU/IO and are waiting for execution in the job queue for a long time ... we are already facing a tough time handling that ... so we do not want to increase the already existing load on the batch process by submitting a batch job from CICS to do the ftp .... this is the whole reason for me doing the research for a feasibility of an ftp directly from CICS
We have a 3rd party software which, according to varying parameters and control blocks, writes an output to different media, such as email, printers etc. May be I can contact them to see if we can tweak the control blocks to send ftp also.
Hope this explains the need for this . Please do let me know if you have any suggestion .... Thanks again for the responses |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
It is the user's requirement to ftp a file from CICS |
I suspect the user requirement is that the file be sent. Why should a user be involved with mechanics?
Quote: |
but the user wants an ftp |
Surely not unreasonable, but this does not dictate the ftp run in CICS.
Quote: |
Also currently our system is really overloaded with large volume of data and hence batch jobs are frequently not getting enough CPU/IO and are waiting for execution in the job queue for a long time ... we are already facing a tough time handling that |
So the real issue is that due to one performance you/someone is willing to introduce a probably worse problem. Keep in mind that when CICS needs more resources they will probably be taken from the already suffering batch environment.
Quote: |
May be I can contact them to see if we can tweak the control blocks to send ftp also. |
If this is not already implemented, it will not be a "tweak". Re-read what Robert posted earlier. . .
Sounds like there needs to be an investment in tuning or a hardware upgrade. . . |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Running an FTP session from a CICS region will probably add more to the system load than a batch job would -- since the FTP transfer would be running at the priority of the CICS region, not the priority of a batch job. Furthermore, a batch initiator could be set up specifically for these jobs which would speed up the batch processing.
Your third party software may be the best bet based on what you've said. |
|
Back to top |
|
|
|