Hi,
Sorry I'm on a real learning curve with SQL/RPG at the moment so sorry to bother you all.
I have just created the following RPG procedure:
Then use the following to compile;
CRTSQLRPG PGM(BLBTSTLIB2/SUBGEQIV2) SRCFILE(QRPGLESRC)
but i get the following compile errors:
Everything seems in sequence and I've used the return????
What am I doing wrong?
Thanks
Huddy
Sorry I'm on a real learning curve with SQL/RPG at the moment so sorry to bother you all.
I have just created the following RPG procedure:
Code:
0001.00 0002.00 p subgeqiv2 b export 0003.00 d subgeqiv2 pi 0004.00 d branchCode 2p 0 const 0005.00 d fromCurCode 2p 0 const 0006.00 d fromAmount 15p 2 const 0007.00 d toCurCode 2p 0 const 0008.00 0009.00 d rtnAmount s 15p 2 0010.00 d baseCode 2p 0 0011.00 d baseAmount s 15p 2 0012.00 d spotRate s 12 8 0013.00 d inverted s 1 0014.00 0015.00 /free 0016.00 if fromCurCde = 0 or fromAmount = 0; 0017.00 retAmount = 0; 0018.00 endif; 0019.00 0020.00 if fromCurCde = toCurCde; 0021.00 retAmount = fromAmount; 0022.00 return retAmount; 0023.00 endif; 0024.00 0025.00 Exec SQL select s99bcc into :baseCode 0026.00 from sdf99P where s99brc = :branchCode; 0027.00 0028.00 Exec SQL select cfsprt into :spotRate 0029.00 from cflep where cfccd = :baseCode; 0030.00 baseAmount = fromAmount / spotrate 0031.00 0032.00 Exec SQL select cfsprt into :spotRate 0033.00 from cflep where cfccd = :toCurCode; 0034.00 retAmount = baseAmount * spotrate 0035.00 return retAmount; 0036.00 0037.00 /end-free 0038.00 p e
CRTSQLRPG PGM(BLBTSTLIB2/SUBGEQIV2) SRCFILE(QRPGLESRC)
but i get the following compile errors:
* QRG2001 Severity: 30 Number: 38
Message . . . . : Form-Type entry invalid or out of sequence.
Specification ignored.
* QRG7023 Severity: 40 Number: 1
Message . . . . : The Compiler cannot determine how program can
terminate. Program will loop.
Message . . . . : Form-Type entry invalid or out of sequence.
Specification ignored.
* QRG7023 Severity: 40 Number: 1
Message . . . . : The Compiler cannot determine how program can
terminate. Program will loop.
Everything seems in sequence and I've used the return????
What am I doing wrong?
Thanks
Huddy
Comment