View previous topic :: View next topic
|
Author |
Message |
bittu Warnings : 1 New User
Joined: 07 Jan 2007 Posts: 19 Location: Bangalore
|
|
|
|
Hi All,
My program is referncing a global temporary table which i will be dropping it by drop statement. My question is how do i give a time delay of say 3-5 mins to check whether the data is written into the global temp table and later its dropped.
Please send me the syntax for dropping the global temporary table with a time delay.
Thanks in advance |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
data is written into the global temp table and later its dropped. |
Something is missing here :-)
Usually the process flow is to read a permanent table,
for some reason ( not really important here ) create a temporary table
process the temporary table
drop the temporary table
since the table is temporary when You drop the table...
why do You care if the data has been written or not ??? |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
Below is one way to do it from batch. In CICS use DELAY.
Note: Your systems people may not be happy with you if you tie up a batch initiator with a job that spends most of its time sleeping. I received an angry call because someone used the logic below to sleep their program for an hour...
Code: |
WAIT CSECT
WAIT AMODE 31
WAIT RMODE ANY
EQUREG
SAVE (14,12),,'RH0WT &SYSDATE &SYSTIME'
LR R12,R15
USING RH0NWT,R12
L R3,0(,R1)
MVC INTERVAL,0(R3)
STIMER WAIT,BINTVL=INTERVAL
LM R14,R12,12(R13) RELOAD REGS,
XR R15,R15 BACK TO THE BOSS
BR R14
DS 0F
INTERVAL DS F
END WAIT
How to call from COBOL
01 WS-SLEEP-ROUTINE PIC X(8) VALUE 'WAIT'.
01 WS-TIME-INTERVAL PIC S9(9) COMP.
88 WS-SLEEP-1-HUNDRETH-OF-A-SEC VALUE +1.
88 WS-SLEEP-1-TENTH-OF-A-SEC VALUE +10.
88 WS-SLEEP-1-SECOND VALUE +100.
88 WS-SLEEP-1-MINUTE VALUE +6000.
88 WS-SLEEP-5-MINUTES VALUE +30000.
SET WS-SLEEP-1-MINUTE TO TRUE
CALL WS-SLEEP-ROUTINE USING WS-TIME-INTERVAL
|
|
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 Location: Ottawa Canada
|
|
|
|
Sorry - typo fix.
Code: |
WAITME CSECT
WAITME AMODE 31
WAITME RMODE ANY
EQUREG
SAVE (14,12),,'WAITME &SYSDATE &SYSTIME'
LR R12,R15
USING WAITME,R12
L R3,0(,R1)
MVC INTERVAL,0(R3)
STIMER WAIT,BINTVL=INTERVAL
LM R14,R12,12(R13) RELOAD REGS,
XR R15,R15 BACK TO THE BOSS
BR R14
DS 0F
INTERVAL DS F
END WAITME
|
|
|
Back to top |
|
|
|