RXS_JobLog()

This subprocedure is used to easily output messages to the job log. A single character field can be passed in to output in a direct and unmodified fashion, or the API can be called with multiple character data parameters and utilize character replacement.

To perform character replacement, you’ll need to include one or more placeholders, indicated by the following string: %s

Each Replacement# parameter will replace the corresponding %s. For example, Replacement1 will replace the first %s, while Replacement6 will replace the sixth %s present in the string.

Subprocedure Prototype

D RXS_JobLog...
D                 PR                  Extproc('RXS_JobLog')
D                                     Opdesc
 
D   Output                            Like(RXS_Var32Kv_t) Const
D                                     Options(*Varsize)

Simple character data message to be printed to the job log, or a formatted character data string to use with replacements.

D   Replacement1...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement2...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement3...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement4...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement5...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement6...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement7...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement8...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement9...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

D   Replacement10...
D                                     Like(RXS_Var1Kv_t) Const
D                                     Options(*Varsize: *Nopass)

Optional: Used as a replacement in the formatted character data string passed in Output.

Example Code

*--------------------------------------------------------------
* This example uses RXS_JobLog() in the most simple form to just
* write a basic character string to the job log.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /copy QRPGLECPY,RXSCB

D JobLogMsg       S                   Like(RXS_Var1Kv_t)
 /free
 
   JobLogMsg = 'Hello world!';
   RXS_JobLog( JobLogMsg );

   //Job Log Output: Hello world!

   *INLR = *ON;
 /end-free
*--------------------------------------------------------------
* This example uses RXS_JobLog() with a tring which contains a
* single replacement placeholder.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /copy QRPGLECPY,RXSCB

D JobLogMsg       S                   Like(RXS_Var1Kv_t)
 /free

   JobLogMsg = 'Hello %s!';
   RXS_JobLog( JobLogMsg : 'Bob');

   //Job Log Output: Hello Bob!

   *INLR = *ON;
 /end-free
*--------------------------------------------------------------
* This example uses RXS_JobLog() with a string which contains
* multiple replacement placeholders.
*--------------------------------------------------------------
H DFTACTGRP(*NO) BNDDIR('RXSBND') ACTGRP(*CALLER)

 /copy QRPGLECPY,RXSCB

D JobLogMsg       S                   Like(RXS_Var1Kv_t)
 /free

   JobLogMsg = 'Hello %s! Your lucky number is: %s';
   RXS_JobLog( JobLogMsg : 'Bob' : %Char(7) );

   //Job Log Output: Hello Bob! Your lucky number is: 7

   *INLR = *ON;
 /end-free