H*****************************************************************
H* calculate hours different two date format.
H*****************************************************************
HDATFMT(*ISO)
H*****************************************************************
DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords++++++++++++++++++++++++++
d DCC1 S Z
d DCC2 S Z
D DS
DName+++++++++++ETDsFrom+++To/L+++IDc.Keywords++++++++++++++++++++++++++
DY6 1 6S 0
Dhh 1 2S 0
Dmm 3 4S 0
Dss 5 6S 0
C*****************************************************************
C* Main Line Routine
C*****************************************************************
C*
C *ENTRY PLIST
CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq.
C PARM d1 8 0
C PARM t1 6 0
C PARM d2 8 0
C PARM t2 6 0
C PARM hourx 7 0
c*
CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq
C MOVEL D1 DC1 8
C MOVEL T1 TC1 6
C*
C MOVEL D2 DC2 8
C MOVEL T2 TC2 6
C*
c movel *blanks DAT1 26
c eval DAT1= %subst(dC1:1:4) + '-' +
C %subst(dC1:5:2) + '-' +
C %subst(dC1:7:2) + '-' +
C %subst(TC1:1:2) + '.' +
C %subst(TC1:3:2) + '.' +
C %subst(TC1:5:2) + '.000000'
C movel dat1 dcc1
C*
c movel *blanks DAT2 26
c eval DAT2= %subst(dC2:1:4) + '-' +
C %subst(dC2:5:2) + '-' +
C %subst(dC2:7:2) + '-' +
C %subst(TC2:1:2) + '.' +
C %subst(TC2:3:2) + '.' +
C %subst(TC2:5:2) + '.000000'
C movel dat2 dcc2
C*
C z-add 0000 HOURS 9 0
C z-add 0000 HOURx 7 0
C DCC1 SUBDUR DCC2 HOURS:*mn
c* calculate the minutes.
c eval(h) hourx = hours/60
C*
C*
CL0N01Factor1+++++++Opcode&ExtFactor2+++++++Result++++++++Len++D+HiLoEq.
C SETON LR
C RETURN
****************** End of data *****************************************
foreverjj 回复于:2003-11-04 16:29:17 |
看不明白,能否解释一下? |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/