Page 1 of 1

Cobol Batch Socket Calls

PostPosted: Wed Jan 14, 2009 8:27 pm
by johncooperii
Hello All

I am looking for suggestions and/or options for a process I am trying to develop, but for the life of me have not been able to find what I need so I thought I would join the forums here and see what if your guys/gals could offer me some options.

What I would like to be able to do is initiate a TCP/IP socket call from a Cobol batch process (MVS) to a offsite vendor server to retrieve some tracking information back and process it. Please note this is not a Cobol CICS process but rather a batch process.

I am not famliliar with the specifics of TCP/IP programming within Cobol so I was hoping someone might be able to offer some pointers or direction to somewhere that might offer help, a users programming manual would be great...just kidding but you know what I mean. :D

Anyway here is some system information that I can offer so that any help points me in the right direction.

Operating System: z/OS Version 1.7
IBM Mainframe Model : 2096-S07 Capacity Model Q04
IBM Enterprise COBOL for z/OS 3.4.1

Please respond back if you need any further information regarding my request.

Thanks and Take Care
John Cooper

Re: Cobol Batch Socket Calls

PostPosted: Thu Jan 15, 2009 3:23 am
by dick scherrer
Hello John and welcome to the forum,

a users programming manual would be great...just kidding but you know what I mean.
As i've said too many times. . . " a blind squirrel finds an acorn once in a while" :)

See if this helps:
http://vse2pdf.com/coolstuff/

This is from the above link:
http://vse2pdf.com/coolstuff/bsttez03.txt

In you are going to use ftp to accomplish the transfer, ftp can be called from cobol. . .

I don't have the link handy, but there is also an IBM Redbook on tcp/ip programming. If you need it, i'll try to find it.

Re: Cobol Batch Socket Calls

PostPosted: Fri Jan 16, 2009 12:01 am
by johncooperii
Hey thanks for the feedback, I have been looking over the links you provided and the information has been helpful in providing a good starting point.

I do have one further question though. Most of the stuff appears to elude to a Cobol CICS process and not a Cobol batch process.

The company I work at uses MVS Cobol and the process I need to enhance is during a nighly batch run to create shipping labels to be appiled to cartons that our distribution centers will use the next morning. During this nightly batch process I will need to somehow make a socket/some kind of call to a vendor supplied server to retrieve tracking information which will then be sent back to my Mainframe MVS Cobol batch program.

Is there something somewhere that gives an example for making a socket call using this "EZASOKET" that is mentioned throughout the documentation in the links you provided. Unless I have missed it so far all I am seeing appears to pertain to CICS and not a true Cobol batch program.

Again, thanks for your help and anything else you can suggest would be most welcome

Take Care
John Cooper

Re: Cobol Batch Socket Calls

PostPosted: Fri Jan 16, 2009 1:17 am
by dick scherrer
Hello,

Again, thanks for your help and anything else you can suggest would be most welcome

Why not simply run a standalone ftp step to retrieve the vendor data? Why complicate things by embedding this in some cobol program?

For the learning experience, it might be beneficial figuring out how to do this in cobol, but if you want this up and running, the standalone will be much more smoothly done. Of the few hundred batch jobs that i've seen/worked with that upload or download data to unix/windows, none invoke the file transfer from within a cobol program.