View previous topic :: View next topic
|
Author |
Message |
sravindra_s
New User
Joined: 29 Nov 2005 Posts: 8
|
|
|
|
Hi All,
I am writing a cobol Batch TCP/IP program . where in " need to be able to set a delay on the call so we can throttle the call e.g. 30 milliseconds between calls. "
Meaning If my input file is having 3 records.
The Cobol program will read the first record once Connection to Port is established. After that the same first record needs to be talking to the port after a delay of 30 milliseconds . This will happen 10 times for the first record.
Then it reads the second record , process is repeated again till end of file.
we are doing Load Testing . |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Language Environment Callable Service CEEDLYM. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Out of curiosity, why do you need the delay for a read operation? Are your reads timing out? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
You can perform n times in between the read or calls and delay the execution |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Unless the secret part of the requirement was "su** of up the entire CPU", no you don't. How would you even know how many TIMES is 30ms? |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
If you think you need a delay in a batch program, the design is wrong -- period. Batch jobs are not supposed to need delays, and you could negatively impact your entire LPAR if you do so incorrectly. Redesign the process. |
|
Back to top |
|
|
sravindra_s
New User
Joined: 29 Nov 2005 Posts: 8
|
|
|
|
Thanks for the reply for my earlier query.
Mean time I was trying to connect to a port . But I am getting Below error.
60 ETIMEDOUT Connect The connection timed out before it
was completed. Ensure the server application is available.
How to solve this!!!!. Tried with different Port Number as well. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
Ensure the server application is available. |
there is NO guarantee that a delay will solve the server application availability
errors due to unavailable application should be pursued thru a different path
( management, operations control, ..., ... )
not by tweaking the code |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
I know it can be confusing dealing with ports and connections at first.
The error message tells you something very important. It's telling you that your program tried to reach out and connect with some server that waits for connections. It tried for 60 seconds, then gave up.
So, you need to make sure that the connection you are trying to make is valid from the perspective of the running program. Remember, the program is running on the mainframe, and has to reach that server from THERE. Just because you can ping it or whatever from your desktop, does NOT mean that the mainframe can see it.
You can be dealing with an invalid address, a firewall, different IP stacks, etc. So you have to start trying to isolate each factor and make sure it's correct.
So, start with the TSO command line and try to ping that server. I would bet doughnut money that you'll find your issue right away. Not two dozen doughnuts, but you know, like a 3/$2 kind of deal.
If you CAN ping it from the mainframe. Then it probably means the port is unreachable. So if the port can be reached from say, your desktop, then it must be a firewall.
The process here is just like any other problem. You need to think about what is actually happening, then break that down into testable chunks. Then test each of those chunks in isolation. |
|
Back to top |
|
|
sravindra_s
New User
Joined: 29 Nov 2005 Posts: 8
|
|
|
|
Thanks for your replies.
I had not passed the IP address to Half word Binary working storage variables to call IBM provided Connect socket program.
After which I connection successful message. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Great, now I have to send 2 donuts to India! |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Quote: |
Great, now I have to send 2 donuts to India! |
|
|
Back to top |
|
|
|