Cobol Batch Socket Calls



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Cobol Batch Socket Calls

Postby johncooperii » Wed Jan 14, 2009 8:27 pm

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
johncooperii
 
Posts: 2
Joined: Wed Jan 14, 2009 8:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cobol Batch Socket Calls

 

Re: Cobol Batch Socket Calls

Postby dick scherrer » Thu Jan 15, 2009 3:23 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times

Re: Cobol Batch Socket Calls

Postby johncooperii » Fri Jan 16, 2009 12:01 am

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
johncooperii
 
Posts: 2
Joined: Wed Jan 14, 2009 8:07 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Cobol Batch Socket Calls

Postby dick scherrer » Fri Jan 16, 2009 1:17 am

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post