IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

FTP from CICS


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pritamdebnath

New User


Joined: 01 Dec 2006
Posts: 5
Location: Houston, TX

PostPosted: Sat May 22, 2010 2:22 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Sat May 22, 2010 2:56 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat May 22, 2010 3:25 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sat May 22, 2010 3:26 am
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Sat May 22, 2010 5:10 am
Reply with quote

I am sure the team responsible for CICS performance would love this.
Back to top
View user's profile Send private message
pritamdebnath

New User


Joined: 01 Dec 2006
Posts: 5
Location: Houston, TX

PostPosted: Sun May 23, 2010 9:17 pm
Reply with quote

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 icon_smile.gif. Please do let me know if you have any suggestion .... Thanks again for the responses
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun May 23, 2010 10:32 pm
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Sun May 23, 2010 10:37 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Using API Gateway from CICS program CICS 0
No new posts Calling an Open C library function in... CICS 1
No new posts How to 'Ping' a CICS region in JCL CICS 2
No new posts Parallelization in CICS to reduce res... CICS 4
No new posts How to avoid duplicating a CICS Web S... CICS 0
Search our Forums:

Back to Top