Here are some of my templates favorites:
O control options with my standard option and binding directories for reusable code.
ctl-opt Debug( *Yes ) Option( *SrcStmt : *NoDebugIO : *SecLvl ) DftActGrp( *No ) ActGrp( *STGMDL )
BndDir('MYHTTPAPI':'QC2LE':'MYCOMMON':'MYMOBILE':'ORDERINFO' : 'MYJDBC' : 'MYBASE64')
alwnull(*UsrCtl)
;
O PSDS for my standard program system data structure, external described
dcl-ds PSDS ExtName('MYPSDS') PSDS alias qualified end-ds;
O Documentation header for new program with our company standard
**free
// ================================================================================
// PROGRAM NAME: xxxxxxxxxx
// AUTHOR......: Kenneth A. Killian
// DESCRIPTION.: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
// ================================================================================
// M O D I F I C A T I O N H I S T O R Y
// ---------------------------------------------------------------
// 99/99/9999 C000 Kenneth A. Killian Proj: xxxxxxxxx
// > Initial Creation
// =================================================================================
O Code snippet to check for valid test box for RPG-UNIT (This one is a snippet)
assert( Verify_non_Production_IBMi_Box() : 'Not allow on PRODUCTION IBM i');
o I also have a template, which probably should be snippet. Which is a shell to set up brand new RPG-Unit
**free
ctl-opt NoMain Debug( *Yes ) option( *SrcStmt : *NoDebugIO : *SecLvl)
BndDir( 'RUTESTCASE' : 'MYRUSERV' : 'MYCOMMON')
;
// ================================================================================================
// PROGRAM NAME: XXXXXXXXXX
// AUTHOR......: Kenneth A. Killian
// DESCRIPTION.: RPG-Unit Test Case for XXXXXXXXXX
// Use library: RPGUNIT -->
http://rpgunit.sourceforge.net/
// Notes.........: This is NOT a complete Test-Unit Plan!
// It is merely a starting point.
// Please feel free to add more testing scenarios!
// ================================================================================================
// M O D I F I C A T I O N H I S T O R Y
// -------------------------------------------------------------------------------
// 00/00/0000 C000 Kenneth A. Killian Proj: 00000
// > Initial Creation
// ================================================================================================
/include RPGUNIT1,TESTCASE
/include myruserv
dcl-proc test_something export;
// insert testing code here
assert( Verify_non_Production_IBMi_Box() : 'Not allow on PRODUCTION IBM i');
end-proc;
---------------------------------------------------------------------------------
I happen to use mostly templates, since I learned that first. And it comes up fast.
I really like the snippets. Since you can give your snippets names.
Most of my code is new, so I use code assist instead. So, I do not use code-snippets all that much...
Enjoy!
Ken Killian
-----Original Message-----
From: WDSCI-L <wdsci-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of gio.cot via WDSCI-L
Sent: Saturday, April 18, 2020 8:42 AM
To: wdsci-l@xxxxxxxxxxxxxxxxxx
Cc: gio.cot <gio.cot@xxxxxxxxxxx>
Subject: [WDSCI-L] Template and Snippets in RDI
Hi all
I'm quite new in RDI and i'm try to use also Template and Snippets.
Question: i would be interested to know which are your favourite Template and Snippets that you have created and used ?
Thanks in advance
Gio
As an Amazon Associate we earn from qualifying purchases.