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:
  1.      h  OPTION(*nounref : *nodebugio : *srcstmt) DFTACTGRP(*no) ACTGRP(*caller)
  2.  
  3.       *--------------------------------------------------
  4.       * Program:        TestStuff2
  5.       *
  6.       * Notes: "Callee" that receives the data structure passed from TESTSTUFF.
  7.       *        Runs in batch.
  8.       *--------------------------------------------------
  9. _____
  10.       * Global definitions
  11.       /define test_nms
  12.       /define NMS_Details_DS
  13.       /copy TFSCOPYSRC,NMS_PROTOS
  14.       /undefine test_nms
  15.       /undefine NMS_Details_DS
  16.  
  17.       * Program Prototype  (*Entry parms)
  18.      d TESTSTUFF2      PI
  19.      d  in_ds                              likeds(NMS_OrderDetails)
  20.      d                                     const
  21.  
  22.      d QCMDEXC         pr                  Extpgm('QCMDEXC')
  23.      d                             1024    Options(*varsize) Const
  24.      d                               15P 5 Const
  25.      d                                3    Options(*nopass) Const
  26.  
  27. test d result          s              9p 4
  28. test d test_ds         ds                  likeds(in_ds)
  29.  
  30. ____  *
  31.       * Begin Mainline Logic
  32.  
  33.       /free
  34.        // Set standard sql options.
  35.        EXEC SQL
  36.        SET OPTION  closqlcsr = *endmod,
  37.                       commit = *none,
  38.                       datfmt = *iso;
  39.  
  40. vvvvv  // ~~~~~~~~~~~~~~~~THE STUFF TO TEST GOES BETWEEN HERE... ~~~~~~~~~~~~~~~
  41.        result = in_DS.testP4point3 * 10000;
  42.        test_ds = in_ds;
  43.        // [use debug to examine in_ds]
  44.  
  45. ^^^^^  // ~~~~~~~~~~~~~~~~   ... and HERE ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  46.        *inLR = *ON;
  47.       /end-free
  48.  
  49.      C* End Mainline Logic
  50. ____  *--------------------------------------------------  
© 2004-2019 by midrange.com generated in 0.004s valid xhtml & css