Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is there any command in Cobol (Batch Program) to DELAY

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sravindra_s

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Wed Jun 25, 2014 11:08 am    Post subject: Is there any command in Cobol (Batch Program) to DELAY
Reply with quote

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

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Wed Jun 25, 2014 11:39 am    Post subject: Reply to: Is there any command in Cobol (Batch Program) to d
Reply with quote

Language Environment Callable Service CEEDLYM.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Jun 25, 2014 7:31 pm    Post subject:
Reply with quote

Out of curiosity, why do you need the delay for a read operation? Are your reads timing out?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Thu Jun 26, 2014 10:03 am    Post subject:
Reply with quote

You can perform n times in between the read or calls and delay the execution
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu Jun 26, 2014 12:16 pm    Post subject: Reply to: Is there any command in Cobol (Batch Program) to d
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Thu Jun 26, 2014 6:08 pm    Post subject:
Reply with quote

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

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Mon Jun 30, 2014 2:36 pm    Post subject:
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Mon Jun 30, 2014 5:43 pm    Post subject: Reply to: Is there any command in Cobol (Batch Program) to d
Reply with quote

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

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Jun 30, 2014 5:48 pm    Post subject:
Reply with quote

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

New User


Joined: 29 Nov 2005
Posts: 8

PostPosted: Tue Jul 01, 2014 10:26 am    Post subject:
Reply with quote

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

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Jul 01, 2014 5:57 pm    Post subject:
Reply with quote

Great, now I have to send 2 donuts to India!
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Wed Jul 02, 2014 11:33 pm    Post subject:
Reply with quote

Quote:
Great, now I have to send 2 donuts to India!
icon_lol.gif icon_lol.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us