midrange.com code scratchpad |
Name:
Member TESTSTUFF2
|
Scriptlanguage:
Plain Text
|
Tabwidth:
4
|
Date:
05/30/2012 02:44:10 pm
|
IP:
Logged
|
|
Description:
Test code for passing data structure to a submitted job.
This sqlrpgle program is the receiver of the passed data structure.
Compiled at 7.1
|
Code:
- h OPTION(*nounref : *nodebugio : *srcstmt) DFTACTGRP(*no) ACTGRP(*caller)
-
- *--------------------------------------------------
- * Program: TestStuff2
- *
- * Notes: "Callee" that receives the data structure passed from TESTSTUFF.
- * Runs in batch.
- *--------------------------------------------------
- _____
- * Global definitions
- /define test_nms
- /define NMS_Details_DS
- /copy TFSCOPYSRC,NMS_PROTOS
- /undefine test_nms
- /undefine NMS_Details_DS
-
- * Program Prototype (*Entry parms)
- d TESTSTUFF2 PI
- d in_ds likeds(NMS_OrderDetails)
- d const
-
- d QCMDEXC pr Extpgm('QCMDEXC')
- d 1024 Options(*varsize) Const
- d 15P 5 Const
- d 3 Options(*nopass) Const
-
- test d result s 9p 4
- test d test_ds ds likeds(in_ds)
-
- ____ *
- * Begin Mainline Logic
-
- /free
- // Set standard sql options.
- EXEC SQL
- SET OPTION closqlcsr = *endmod,
- commit = *none,
- datfmt = *iso;
-
- vvvvv // ~~~~~~~~~~~~~~~~THE STUFF TO TEST GOES BETWEEN HERE... ~~~~~~~~~~~~~~~
- result = in_DS.testP4point3 * 10000;
- test_ds = in_ds;
- // [use debug to examine in_ds]
-
- ^^^^^ // ~~~~~~~~~~~~~~~~ ... and HERE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- *inLR = *ON;
- /end-free
-
- C* End Mainline Logic
- ____ *--------------------------------------------------
|
|
|