|
Hello!
The following is the source for the ADDDUR CL command:
Opc Miembro Tipo Texto
TESTADDUR CLP Example Using ADDDUR
COMPILED WITH: ALLOW(*IPGM *BPGM)
0001.00 PGM
0002.00 DCL VAR(&MYDATE) TYPE(*CHAR) LEN(6)
0003.00 DCL VAR(&TOMORROW) TYPE(*CHAR) LEN(6)
0004.00 RTVJOBA DATE(&MYDATE)
0005.00 ADDDUR DATE(&MYDATE) DURATION(-4) RTNDATE(&TOMORROW)
0006.00 SNDMSG MSG('DATE ---> : ' *CAT &MYDATE ) TOUSR(D9045)
0007.00 SNDMSG MSG('DATE DURATION: ' *CAT &TOMORROW) TOUSR(D9045)
0008.00
0009.00 ENDPGM
****************** Fin de datos ***********************************
The following is the source for the ADDDUR CMD command:
Opc Miembro Tipo Texto
ADDDUR CMD COMMAND FOR ADD A DURATION TO A DATE
0019.00 ADDDUR: CMD PROMPT('ADD A DURATION TO A DATE')
0020.00
0021.00 PARM KWD(DATE) TYPE(*DATE) DFT(*JOBDATE) +
0022.00 SPCVAL((*TODAY 000000) (*SYSDATE 000000) +
0023.00 (*TOMORROW 000001) (*YESTERDAY 000002) +
0024.00 (*JOBDATE 000003) (*JOBRUN 000003) +
0025.00 (*SBMDATE 000004)) PROMPT('BASE DATE')
0026.00
0027.00 PARM KWD(DURATION) TYPE(*INT4) DFT(1) +
0028.00 LISTDSPL(*INT4) PROMPT('NUMBER OF DAYS TO +
0029.00 ADD')
0030.00
0031.00 /* RETURNED DATE IS ALWAYS IN JOB DATE FORMAT */
0032.00 PARM KWD(RTNDATE) TYPE(*CHAR) LEN(6) RTNVAL(*YES) +
0033.00 CHOICE('RTN FORMAT: JOB DATE FORMAT') +
0034.00 PROMPT('CL VAR. RETURN DATE')
0035.00
****************** Fin de datos **********************************
The following is part of the source ILE RPG for the ADDDUR PGM:
Opc Miembro Tipo Texto
ADDDUR RPGLE ADDDUR
0006.00 D ADDDUR PR
0007.00 D inDate 7A Const
0008.00 D nDur 5I 0 Const
0009.00 D rtnDate 6A
0010.00
0011.00 D ADDDUR PI
0012.00 D inDate 7A Const
0013.00 D nDur 5I 0 Const
0014.00 D rtnDate 6A
0015.00
0016.00 D Today S D Inz(*SYS)
0017.00 D JOBDate S D Inz(*JOB)
0018.00 D Job S 26A
0019.00 D IntrnlJobID S 16A
0020.00 D SBMDate S 8-a
Visualizar Fuente Modulo
Programa: ADDDUR Biblioteca: ESPD62S Modulo: ADDDUR
1 H OPTION(*NODEBUGIO:*SRCSTMT)
2 H DFTACTGRP(*NO)
**
**
5
6 D ADDDUR PR
7 D inDate 7A Const
8 D nDur 5I 0 Const
9 D rtnDate 6A
10
11 D ADDDUR PI
12 D inDate 7A Const
13 D nDur 5I 0 Const
14 D rtnDate 6A
15
Mas...
Depuracion
INDATE = '1050228'
Visualizar Fuente Modulo
Programa: ADDDUR Biblioteca: ESPD62S Modulo: ADDDUR
1 H OPTION(*NODEBUGIO:*SRCSTMT)
2 H DFTACTGRP(*NO)
3 **
4 **
5
6 D ADDDUR PR
7 D inDate 7A Const
8 D nDur 5I 0 Const
9 D rtnDate 6A
10
11 D ADDDUR PI
12 D inDate 7A Const
13 D nDur 5I 0 Const
14 D rtnDate 6A
15
Mas...
Depuracion
NDUR = -1
Why initial value (NDUR)does not match data type of field?
Can you help me?
Un abrazo cordial, Cesar A. Mendoza Gomez Calle Buen Retiro 216 Chalet 22 - Lima 33 - Peru Phone: +(511) 434-2024 Mobile: +(511) 985-42410
----------------------------------------------------------------------
Express yourself instantly with MSN Messenger! MSN Messenger Download today it's FREE!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.