i am writing the code in which paricular operation should be performed after perticular interval of time bt i am not getting how to provide that interval(i,e delay)
Announcement
Collapse
No announcement yet.
How to provide delay in ilerpg.
Collapse
X
-
Re: How to provide delay in ilerpg.
Probably this will help you
Regards
SaiTo every equation there is a solution....
Regards
Sai.
-
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
www.code400.com
Comment
-
Re: How to provide delay in ilerpg.
Originally posted by dhuesman View PostIf you're using the "sleep" procedure, did you add the C Binding directory?
Following is an example:
H DFTACTGRP(*NO) BNDDIR('QC2LE')
I have a default H spec data area as :
&HDEBUG DATEDIT(*MDY) OPTION(*NODEBUGIO : *SRCSTMT) Truncnbr(*yes)
&HDftactGrp*NO)
?? weird.Bill
"A good friend will bail you out of jail,
A true friend would be sitting beside you saying,
'Wow, that was fun.'"
Comment
-
Re: How to provide delay in ilerpg.
to clear the concept of 'delay', i have written a pgm which displays the incrimented value of a variable after every 5sec.
PHP Code:H DFTACTGRP(*NO) BNDDIR('QC2LE')
FDELAYD CF E WORKSTN
DSLEEP PR 10I 0 EXTPROC('SLEEP')
DSeconds 10U 0 Value
C EVAL OUT = 1
C REPEAT TAG
C DOW *IN03=*OFF
C WRITE DSP01
C CallP Sleep(0005)
C EVAL OUT=OUT+1
C GOTO REPEAT
C ENDDO
C EVAL *INLR=*ON
PHP Code:A DSPSIZ(24 80 *DS3)
A R DSP01
A CF03(03 'EXIT')
A 9 22'COUNTER.......:'
A OUT 3S 0O 9 38
*RNF5409 The prototyped call returns a value which is lost when CALLP is used.
Errors were found during the binding step.Thanks,
Abhishek KUMAR
Comment
-
Re: How to provide delay in ilerpg.
It's telling you that you cannot use CALLP to call the procedure since a return parameter is expected.
Do this instead:
Code:H DFTACTGRP(*NO) BNDDIR('QC2LE') FDELAYD CF E WORKSTN DSLEEP PR 10I 0 EXTPROC('SLEEP') DSeconds 10U 0 Value Dw_Value S 10I 0 C EVAL OUT = 1 C REPEAT TAG C DOW *IN03=*OFF C WRITE DSP01 C [B] EVAL w_Value = Sleep(0005) [/B] C EVAL OUT=OUT+1 C GOTO REPEAT C ENDDO C EVAL *INLR=*ON
You don't stop playing games because you get old, You get old because you stop playing games!
Comment
-
Re: How to provide delay in ilerpg.
Originally posted by MikeS View PostIt's telling you that you cannot use CALLP to call the procedure since a return parameter is expected.
Do this instead:
Code:H DFTACTGRP(*NO) BNDDIR('QC2LE') FDELAYD CF E WORKSTN DSLEEP PR 10I 0 EXTPROC('SLEEP') DSeconds 10U 0 Value Dw_Value S 10I 0 C EVAL OUT = 1 C REPEAT TAG C DOW *IN03=*OFF C WRITE DSP01 C [B] EVAL w_Value = Sleep(0005) [/B] C EVAL OUT=OUT+1 C GOTO REPEAT C ENDDO C EVAL *INLR=*ON
GOTO and TAG EWWW...I'm not anti-social, I just don't like people -Tommy Holden
Comment
Comment