View previous topic :: View next topic |
Author |
Message |
complex Beginner
Joined: 15 Sep 2003 Posts: 8 Topics: 4
|
Posted: Tue Mar 23, 2004 3:42 pm Post subject: Wait in COBOL |
|
|
Is there any inbuilt COBOL or LE feature which can allow an application program to wait for a specified time ? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Mar 23, 2004 4:01 pm Post subject: |
|
|
complex,
Cobol has a delay module named 'ILBOWAT0' which will delay the execuetion for specified period of time. The only problem is that it operates in 24 bit addressing mode. The wait-time is specified in terms of seconds. In the below example, the pgm sits for 45 secs.
Code: |
CBL DATA(24)
IDENTIFICATION DIVISION.
PROGRAM-ID. DELAY
DATE-COMPILED.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 WAIT-MODULE PIC X(08) VALUE 'ILBOWAT0'.
01 WAIT-TIME PIC S9(8) COMP VALUE 0.
PROCEDURE DIVISION.
MOVE +45 TO WAIT-TIME.
CALL WAIT-MODULE USING WAIT-TIME.
GOBACK.
|
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
complex Beginner
Joined: 15 Sep 2003 Posts: 8 Topics: 4
|
Posted: Tue Apr 06, 2004 10:27 am Post subject: |
|
|
Thanks for the info Kolusu.
I have another question , this may sound a bit amateurish - but what would happen if i link the ILBOWAT0 module from a 31 bit module ? |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Tue Apr 06, 2004 10:45 am Post subject: |
|
|
complex,
It just takes 2 secs to test out what happens with the wait-module is linked with 31 bit addressing mode.
If you link ILBOWAT0 with a 31 bit mode then the job will abend with u4038 with the following message:
Code: |
IGZ0033S An attempt was made to pass a parameter address above 16 megabyte to AMODE(24) program ILBOWAT0.
From compile unit DELAY at entry point DELAY at compile unit offset +000003F2 at entry offset +000003F2 at address 181213F2.
|
However there are ways of making it run above the line.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
WHITE Beginner
Joined: 03 Sep 2004 Posts: 8 Topics: 4
|
Posted: Fri Sep 03, 2004 10:28 pm Post subject: |
|
|
kolusu wrote: | complex,
It just takes 2 secs to test out what happens with the wait-module is linked with 31 bit addressing mode.
If you link ILBOWAT0 with a 31 bit mode then the job will abend with u4038 with the following message:
Code: |
IGZ0033S An attempt was made to pass a parameter address above 16 megabyte to AMODE(24) program ILBOWAT0.
From compile unit DELAY at entry point DELAY at compile unit offset +000003F2 at entry offset +000003F2 at address 181213F2.
|
However there are ways of making it run above the line.
Kolusu | Hi,
I assume this delay module is suppled along with the Cobol Compiler ILBOWAT0.
As you are aware that currrently Mainframe(Z/OS) operates on 64 bit addressing mode.
In that case will this work on Mainframe systems ?
Thanks
White. |
|
Back to top |
|
|
MikeBaker Beginner
Joined: 04 May 2004 Posts: 96 Topics: 9
|
Posted: Sat Sep 04, 2004 3:02 pm Post subject: |
|
|
ILBOWAT0 is not the name of any COBOL compiler. It is one of the modules supplied with the COBOL LE library. It can run on zOS just so long as it runs in 24 bit mode.
"zOS and 64 bit mode" does not mean that everything runs in 64 bit mode. There will still be plenty of things running in 24bit, others in 31bit, and other stuff will be stored above the 32 bit line. |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Tue Sep 14, 2004 5:07 pm Post subject: |
|
|
An easy way to keep one identifier under the line, you can define it EXTERNAL. That is what you can do with the field wait-time. To be sure not to get any conflict with an other program, define wait-time as <program-name>-wait-time. |
|
Back to top |
|
|
tattva Beginner
Joined: 02 Feb 2005 Posts: 97 Topics: 36
|
Posted: Sun Jan 08, 2006 10:37 am Post subject: |
|
|
Hi all,
Can any one provide some indepth info(like source code.. etc) about ILBOWAT0.
Just curious to know.
Thanks,
tattva |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sun Jan 08, 2006 10:52 am Post subject: |
|
|
Tattva,
ILBOWAT0 is a poorly documented(actually no Documentation) which is still a part of the LE run-time library. Why do you need the source code ?
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
THRIVIKRAM Beginner
Joined: 03 Oct 2005 Posts: 70 Topics: 34
|
Posted: Sun May 07, 2006 12:35 am Post subject: |
|
|
kOLUSU,
I got this error while using the DELAY progtam.
An attempt was made to initialize an AMODE24 application without usingthe ALL31(OFF) and STACK(,,BELOW)
run-time options.
As you said there are ways of overcoming this error.Can you please tell how to get rid of this. |
|
Back to top |
|
|
Crox Beginner
Joined: 29 May 2004 Posts: 52 Topics: 9
|
Posted: Fri Jan 29, 2016 1:59 am Post subject: define the parm EXTERNAL in the WORKING-STORAGE to pass |
|
|
Most of the sites are using default intallation parms which means that EXTERNA defintions are below the 16M line. By defining your A-mode 24 adressing parm as EXTERNAL, it will go ok. |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Fri Jan 29, 2016 9:21 am Post subject: |
|
|
Ah ha -- a time traveler. _________________ ....Terry |
|
Back to top |
|
|
Mickeyd Beginner
Joined: 02 Jan 2003 Posts: 27 Topics: 0
|
Posted: Fri Jan 29, 2016 10:04 am Post subject: |
|
|
first question why are you trying to do this?? you may get fired from your job if they find out your holding up a resource in a batch job |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Fri Jan 29, 2016 11:15 am Post subject: |
|
|
Mickeyd wrote: | first question why are you trying to do this?? you may get fired from your job if they find out your holding up a resource in a batch job |
Mickeyd,
From my experience it is to check if there is a resource deadlock (update/delete from a db2 table) and you just want to wait a few seconds and then attempt to access the resource once again and check if the resource is available rather than abending on the first attempt. My previous shop had a limit of 3 attempts and eventually it would abend if they failed. _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
William Collins Supermod
Joined: 03 Jun 2012 Posts: 437 Topics: 0
|
Posted: Fri Jan 29, 2016 11:36 am Post subject: |
|
|
I'm resisting the temptation to edit the topic title to 10-year wait in COBOL.
Welcome back, Crox. |
|
Back to top |
|
|
|
|